11<script lang =" ts" >
2+ import { onMount } from ' svelte' ;
23import {
34 type Integration ,
45 integrationCategories ,
@@ -8,10 +9,18 @@ import {
89import IntegrationTile from ' $lib/marketing/IntegrationTile.svelte' ;
910import MarketingFooter from ' $lib/marketing/MarketingFooter.svelte' ;
1011import MarketingHeader from ' $lib/marketing/MarketingHeader.svelte' ;
12+ import { isUpToDate , liveVersions , loadLiveVersions } from ' $lib/marketing/versions' ;
1113
1214let activeCategory = ' all' ;
1315let query = ' ' ;
1416
17+ const VERSION_UPTODATE = ' Up-to-date' ;
18+ const VERSION_BEHIND = ' This version is slightly behind the core engine due to a delay' ;
19+
20+ onMount (() => {
21+ void loadLiveVersions ();
22+ });
23+
1524$ : filtered = integrations .filter ((integration ) => {
1625 if (activeCategory === ' community' && ! integration .community ) {
1726 return false ;
@@ -71,14 +80,30 @@ function clearFilters() {
7180 {#each [' desktop' , ' chrome' ] as id }
7281 {@const integration = integrations .find ((item ) => item .id === id )}
7382 {#if integration }
83+ {@const upToDate = isUpToDate ($liveVersions .harper , $liveVersions [integration .id ])}
84+ {@const titleText = upToDate ? VERSION_UPTODATE : upToDate === false ? VERSION_BEHIND : null }
7485 <a
7586 class =" grid grid-cols-[2.5rem_1fr_auto] items-center gap-[0.9rem] rounded-xl border-[0.5px] border-[rgba(28,26,22,0.1)] bg-white px-[1.1rem] py-[0.9rem] !text-[#1c1a16] no-underline transition-[transform,box-shadow,border-color] duration-150 hover:-translate-y-px hover:border-[#b06a1b] hover:shadow-[0_10px_24px_-16px_rgba(28,26,22,0.16)] hover:no-underline dark:border-white/10 dark:bg-white/5 dark:!text-white dark:hover:border-primary-300 max-[640px]:grid-cols-[2.5rem_1fr] [& _em]:max-[640px]:col-start-2"
7687 href ={integration .href }
7788 >
7889 <IntegrationTile {integration } size ={40 } />
7990 <span class =" flex min-w-0 flex-col" >
80- <strong class ="text-[0.94rem] leading-[1.25]" >{integration .name }</strong >
81- <small class ="overflow-hidden text-ellipsis whitespace-nowrap text-[0.8rem] leading-[1.4] text-[#807a6e] dark:text-white/55" >{integration .desc }</small >
91+ <div class =" flex items-center gap-1.5" >
92+ <strong class ="text-[0.94rem] leading-[1.25]" >{integration .name }</strong >
93+ {#if $liveVersions [integration .id ]}
94+ {#if upToDate != null }
95+ <span
96+ class =" inline-flex items-center rounded-full bg-[#f4f1ea] dark:bg-white/10 px-1.5 py-0.5 text-[0.68rem] font-mono font-medium text-[#6b6455] dark:text-white/80 border border-[#e4dfd3] dark:border-white/10 select-none"
97+ title ={titleText }
98+ >
99+ {$liveVersions [integration .id ]}
100+ </span >
101+ {/if }
102+ {/if }
103+ </div >
104+ <small class =" overflow-hidden text-ellipsis whitespace-nowrap text-[0.8rem] leading-[1.4] text-[#807a6e] dark:text-white/55" >
105+ {integration .desc }
106+ </small >
82107 </span >
83108 <em class ="whitespace-nowrap text-[0.78rem] font-extrabold text-[#b06a1b] not-italic dark:text-primary-300" >{ctaLabel (integration )} →</em >
84109 </a >
@@ -164,16 +189,32 @@ function clearFilters() {
164189 </div >
165190 {:else }
166191 {#each filtered as integration }
192+ {@const upToDate = isUpToDate ($liveVersions .harper , $liveVersions [integration .id ])}
193+ {@const titleText = upToDate ? VERSION_UPTODATE : upToDate === false ? VERSION_BEHIND : null }
167194 <a
168195 class =" grid grid-cols-[2.5rem_1fr_auto] items-center gap-[0.9rem] rounded-xl border-[0.5px] border-[rgba(28,26,22,0.1)] bg-white px-[1.1rem] py-[0.9rem] !text-[#1c1a16] no-underline transition-[transform,box-shadow,border-color] duration-150 hover:-translate-y-px hover:border-[#b06a1b] hover:shadow-[0_10px_24px_-16px_rgba(28,26,22,0.16)] hover:no-underline dark:border-white/10 dark:bg-white/5 dark:!text-white dark:hover:border-primary-300 max-[640px]:grid-cols-[2.5rem_1fr] [& _em]:max-[640px]:col-start-2"
169196 href ={integration .href }
170197 >
171- <IntegrationTile {integration } size ={40 } />
172- <span class =" flex min-w-0 flex-col" >
198+ <IntegrationTile {integration } size ={40 } />
199+ <span class =" flex min-w-0 flex-col" >
200+ <div class =" flex items-center gap-1.5" >
173201 <strong class ="text-[0.94rem] leading-[1.25]" >{integration .name }</strong >
174- <small class ="overflow-hidden text-ellipsis whitespace-nowrap text-[0.8rem] leading-[1.4] text-[#807a6e] dark:text-white/55" >{integration .platform }</small >
175- </span >
176- <em class ="whitespace-nowrap text-[0.78rem] font-extrabold text-[#b06a1b] not-italic dark:text-primary-300" >{ctaLabel (integration )} →</em >
202+ {#if $liveVersions [integration .id ]}
203+ {#if upToDate != null }
204+ <span
205+ class =" inline-flex items-center rounded-full bg-[#f4f1ea] dark:bg-white/10 px-1.5 py-0.5 text-[0.68rem] font-mono font-medium text-[#6b6455] dark:text-white/80 border border-[#e4dfd3] dark:border-white/10 select-none"
206+ title ={titleText }
207+ >
208+ {$liveVersions [integration .id ]}
209+ </span >
210+ {/if }
211+ {/if }
212+ </div >
213+ <small class =" overflow-hidden text-ellipsis whitespace-nowrap text-[0.8rem] leading-[1.4] text-[#807a6e] dark:text-white/55" >
214+ {integration .platform }
215+ </small >
216+ </span >
217+ <em class ="whitespace-nowrap text-[0.78rem] font-extrabold text-[#b06a1b] not-italic dark:text-primary-300" >{ctaLabel (integration )} →</em >
177218 </a >
178219 {/each }
179220 {/if }
0 commit comments