Appearance
Top Bar
- File:
src/components/UI/Topbar.svelte
Overview
The global navigation bar rendered in src/routes/secure/+layout.svelte. It is built from @rkosafo/cai.components (Avatar, Button, Dropdown items, Modal, Tooltip, IconifyIcon) and provides:
- Logo — Hippo logo; navigates to
/secure/dashboard. - Nav links —
generateMenu(): Dashboard, Contacts (ifViewContacts), Calendar, Ledger (ifViewLedger). Desktop inline + mobile hamburger menu. - QR code — opens a
Modalwith Top Bar QR Code. - User details —
ContactAvatar+ name; dropdown with Settings, Admin (ifisAdmin), and Sign Out (onsignout→ confirmed by the secure layout). - Action buttons — chat toggle (permission
Chat, badge when there are notices), notifications bell, help link.
Behavior
- Active nav item is derived from the current route path (
isActive). - Chat toggle flips
appStore.showChat, which opens the chatDrawer. - Profile image URL is cache-busted with a timestamp.