atmosphere explorer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add rkey timestamp to car explorer navigation

Juliet 41d3312d a12146a4

+22 -7
+22 -7
src/views/car/explore.tsx
··· 224 224 return v.type === "record" ? v.record : null; 225 225 })()} 226 226 > 227 - {(record) => ( 228 - <div class="group relative flex items-center justify-between gap-1 rounded-md border-[0.5px] border-transparent bg-transparent px-2 transition-all duration-200 hover:border-neutral-300 hover:bg-neutral-50/40 dark:hover:border-neutral-600 dark:hover:bg-neutral-800/40"> 229 - <div class="flex min-h-6 min-w-0 basis-full items-center gap-2 sm:min-h-7"> 230 - <span class="iconify lucide--file-json shrink-0 text-neutral-500 transition-colors duration-200 group-hover:text-neutral-700 dark:text-neutral-400 dark:group-hover:text-neutral-200" /> 231 - <span class="truncate py-0.5 font-medium">{record().key}</span> 227 + {(record) => { 228 + const rkeyTimestamp = createMemo(() => { 229 + if (!record().key || !TID.validate(record().key)) return undefined; 230 + const timestamp = TID.parse(record().key).timestamp / 1000; 231 + return timestamp <= Date.now() ? timestamp : undefined; 232 + }); 233 + 234 + return ( 235 + <div class="group relative flex items-center justify-between gap-1 rounded-md border-[0.5px] border-transparent bg-transparent px-2 transition-all duration-200 hover:border-neutral-300 hover:bg-neutral-50/40 dark:hover:border-neutral-600 dark:hover:bg-neutral-800/40"> 236 + <div class="flex min-h-6 min-w-0 basis-full items-center gap-2 sm:min-h-7"> 237 + <span class="iconify lucide--file-json shrink-0 text-neutral-500 transition-colors duration-200 group-hover:text-neutral-700 dark:text-neutral-400 dark:group-hover:text-neutral-200" /> 238 + <div class="flex min-w-0 gap-1 py-0.5 font-medium"> 239 + <span class="shrink-0">{record().key}</span> 240 + <Show when={rkeyTimestamp()}> 241 + <span class="truncate text-neutral-500 dark:text-neutral-400"> 242 + ({localDateFromTimestamp(rkeyTimestamp()!)}) 243 + </span> 244 + </Show> 245 + </div> 246 + </div> 232 247 </div> 233 - </div> 234 - )} 248 + ); 249 + }} 235 250 </Show> 236 251 </nav> 237 252