From 00d07b9153142648c321b4430fd7117bc3e6aeee Mon Sep 17 00:00:00 2001 From: npeter83 Date: Thu, 18 Jun 2026 04:01:19 +0200 Subject: [PATCH] fix(nav): numeric inbox badge with active-state contrast Show the unread count as a number on the collapsed nav rail (not just a dot), and invert the badge colours on the active row so it isn't an accent-on-accent red blob; centre the number on the circle. --- frontend/src/components/NavSidebar.tsx | 64 ++++++++++++++++---------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/frontend/src/components/NavSidebar.tsx b/frontend/src/components/NavSidebar.tsx index fc00842..f862adb 100644 --- a/frontend/src/components/NavSidebar.tsx +++ b/frontend/src/components/NavSidebar.tsx @@ -147,31 +147,47 @@ export default function NavSidebar({ "w-full flex items-center gap-3 rounded-lg px-2.5 py-2 text-sm transition"; const name = me.display_name ?? me.email.split("@")[0]; - const renderItem = ({ page: p, icon: Icon, label, badge }: NavItem) => ( - - ); + {!collapsed && {label}} + {show && !collapsed && ( + + {badge > 99 ? "99+" : badge} + + )} + + ); + }; return (