fix: sort last seen by time
All checks were successful
Publish and deploy / publish (push) Successful in 37s
Publish and deploy / deploy (push) Successful in 7s

This commit is contained in:
alina 🌸 2025-01-30 15:51:14 +03:00
parent da06d5a256
commit 85270bd435
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
2 changed files with 4 additions and 4 deletions

View file

@ -47,5 +47,5 @@ export async function fetchLastSeen() {
res.push(forgejoData)
}
return res
return res.sort((a, b) => b.time - a.time)
}

View file

@ -39,7 +39,7 @@ function LastSeenItem(props: { first?: boolean, item: TLastSeenItem }) {
<div class=":uno: max-w-full flex flex-col overflow-hidden sm:flex-row sm:items-center">
<div class=":uno: max-w-full w-min flex flex-row items-center overflow-hidden">
<Link
class=":uno: max-w-200px overflow-hidden text-ellipsis whitespace-nowrap lg:max-w-300px"
class=":uno: max-w-200px shrink-0 truncate lg:max-w-300px"
href={props.item.link}
target="_blank"
title={props.item.text}
@ -47,7 +47,7 @@ function LastSeenItem(props: { first?: boolean, item: TLastSeenItem }) {
{props.item.text}
</Link>
{props.item.suffix && (
<span class="whitespace-nowrap text-xs">
<span class="truncate whitespace-nowrap text-xs">
{props.item.suffix}
</span>
)}
@ -62,7 +62,7 @@ function LastSeenItem(props: { first?: boolean, item: TLastSeenItem }) {
</i>
</div>
<Show when={props.first}>
<div data-expand-label class=":uno: before:(ml-1em whitespace-nowrap text-xs text-text-secondary content-['<'] md:content-['(click_to_expand)'] sm:content-['(expand)'])" />
<div data-expand-label class="before:(ml-1em whitespace-nowrap text-xs text-text-secondary content-['<'] md:content-['(click_to_expand)'] sm:content-['(expand)'])" />
</Show>
</Dynamic>
)