aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-09-08 10:08:39 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-09-08 10:08:39 +0200
commite56aeac93bfd8cc05ddf229b7e51939fde41effd (patch)
treecc875e408299bfbdb5417fff8ff2388c5cfc3985 /src/lib/components
parentf6687db926e03eb44e5d72d321021f7738600357 (diff)
Replace routine status text chip with fixed-width glyph chip
Status becomes a 1.5rem rounded-square chip (ok=check, due=clock, late=!, veryLate=double !) keeping the green-to-red colors, moved to the start of each routine row; label and overdue stay in title.
Diffstat (limited to 'src/lib/components')
-rw-r--r--src/lib/components/StatusBadge.svelte15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/components/StatusBadge.svelte b/src/lib/components/StatusBadge.svelte
index babcbfa..3747270 100644
--- a/src/lib/components/StatusBadge.svelte
+++ b/src/lib/components/StatusBadge.svelte
@@ -18,9 +18,16 @@
? 'status bg-accent text-white'
: 'status bg-danger text-white',
);
+
+ const icon = $derived(
+ status === 'ok' ? '✓' : status === 'due' ? '◷' : status === 'late' ? '!' : '‼',
+ );
+
+ const label = $derived(
+ overdueDays > 0
+ ? `${STATUS_LABELS[status]} (${overdueDays} j)`
+ : STATUS_LABELS[status],
+ );
</script>
-<span class={className}>
- {STATUS_LABELS[status]}{#if overdueDays > 0}
- ({overdueDays} j){/if}
-</span>
+<span class={className} role="img" aria-label={label} title={label}>{icon}</span>