More app fixes 0.9.0 (#3054)

* initial set of fixes (toggle sidebar, profile pagination)

* more fixes, bump version

* fix lint:

* fix quick switcher ordering
This commit is contained in:
Geometrically
2024-12-22 20:03:58 -07:00
committed by GitHub
parent ef08d8e538
commit cae6f12ea0
52 changed files with 502 additions and 1501 deletions

View File

@@ -15,8 +15,14 @@ const getInstances = async () => {
recentInstances.value = profiles
.sort((a, b) => {
const dateA = dayjs(a.created > a.last_played ? a.last_played : a.created)
const dateB = dayjs(b.created > b.last_played ? b.last_played : b.created)
const dateACreated = dayjs(a.created)
const dateAPlayed = dayjs(a.last_played)
const dateBCreated = dayjs(b.created)
const dateBPlayed = dayjs(b.last_played)
const dateA = dateACreated.isAfter(dateAPlayed) ? dateACreated : dateAPlayed
const dateB = dateBCreated.isAfter(dateBPlayed) ? dateBCreated : dateBPlayed
if (dateA.isSame(dateB)) {
return a.name.localeCompare(b.name)
@@ -42,6 +48,7 @@ onUnmounted(() => {
<NavButton
v-for="instance in recentInstances"
:key="instance.id"
v-tooltip.right="instance.name"
:to="`/instance/${encodeURIComponent(instance.path)}`"
>
<Avatar
@@ -56,8 +63,8 @@ onUnmounted(() => {
>
<SpinnerIcon class="animate-spin w-4 h-4" />
</div>
<template #label>{{ instance.name }}</template>
</NavButton>
<div v-if="recentInstances.length > 0" class="h-px w-6 mx-auto my-2 bg-button-bg"></div>
</template>
<style scoped lang="scss"></style>