fix: sort last seen by time
This commit is contained in:
parent
da06d5a256
commit
85270bd435
2 changed files with 4 additions and 4 deletions
|
@ -47,5 +47,5 @@ export async function fetchLastSeen() {
|
|||
res.push(forgejoData)
|
||||
}
|
||||
|
||||
return res
|
||||
return res.sort((a, b) => b.time - a.time)
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue