fix: dot color for sync status

This commit is contained in:
2026-08-31 22:07:29 +02:00
parent 474f11a8ca
commit 4edfb64723
+14 -11
View File
@@ -13,13 +13,6 @@ async function handleLogout() {
router.push('/login') router.push('/login')
} }
const stampLabel = computed(() => {
if (!authStore.isAuthenticated) return 'offline'
if (listsStore.isSyncing) return 'syncing'
if (listsStore.pendingCount > 0) return `${listsStore.pendingCount} pending`
return 'synced'
})
const stampClass = computed(() => { const stampClass = computed(() => {
if (!authStore.isAuthenticated) return '' if (!authStore.isAuthenticated) return ''
if (listsStore.pendingCount > 0 || listsStore.isSyncing) return 'stamp-pending' if (listsStore.pendingCount > 0 || listsStore.isSyncing) return 'stamp-pending'
@@ -46,15 +39,17 @@ const stampTitle = computed(() => {
v-if="listsStore.error" v-if="listsStore.error"
class="stamp stamp-danger" class="stamp stamp-danger"
:title="listsStore.error" :title="listsStore.error"
>sync error</span :aria-label="listsStore.error"
> role="img"
></span>
<span <span
v-else v-else
class="stamp" class="stamp"
:class="stampClass" :class="stampClass"
:title="stampTitle" :title="stampTitle"
>{{ stampLabel }}</span :aria-label="stampTitle"
> role="img"
></span>
<button v-if="authStore.isAuthenticated" type="button" class="logout" @click="handleLogout"> <button v-if="authStore.isAuthenticated" type="button" class="logout" @click="handleLogout">
Log out Log out
</button> </button>
@@ -121,6 +116,14 @@ const stampTitle = computed(() => {
flex-shrink: 0; flex-shrink: 0;
} }
.stamp-pending {
color: var(--c-warning);
}
.stamp-synced {
color: var(--c-success);
}
.stamp-danger { .stamp-danger {
color: var(--c-danger); color: var(--c-danger);
cursor: help; cursor: help;