merge: hub notification badge slot

This commit is contained in:
Padreug 2026-05-02 10:13:21 +02:00
commit 86386b08b1

View file

@ -31,6 +31,8 @@ interface Module {
glow: string
envKey?: string
status?: string
/** Unread count for the corner badge. Wire to real data via #32. */
unread?: number
}
// Lower (root/red) upper (crown/violet)
@ -113,6 +115,15 @@ function notImplemented() {
<p class="text-sm font-semibold text-foreground drop-shadow">{{ m.label }}</p>
<p v-if="m.status" class="text-[9px] font-light text-muted-foreground">{{ m.status }}</p>
</div>
<!-- Notification badge wired to data once #32 lands. Hidden when unread is falsy/0. -->
<span
v-if="m.unread"
class="absolute top-1.5 right-1.5 min-w-[18px] h-[18px] px-1 rounded-full bg-red-500 text-white text-[10px] font-semibold flex items-center justify-center shadow ring-1 ring-background/60"
:aria-label="`${m.unread} unread`"
>
{{ m.unread > 99 ? '99+' : m.unread }}
</span>
</component>
</div>
</div>