This improves the UX for setting up unattended displays by:1. Automatically enabling visual Kiosk mode when a token has monitoring-only scope (unless explicitly disabled).2. Providing a ready-to-use 'Magic Link' (with ?token=...&kiosk=1) upon token creation.
Closes#1122
Adds a kiosk mode toggle button in the header next to the logout button.
Previously, users had to manually add ?kiosk=1 to the URL to enable
kiosk mode (which hides navigation and filters for wall displays).
Now users can:
- Click the toggle button to enter/exit kiosk mode instantly
- Button shows maximize icon when off, minimize icon when on
- Hover reveals 'Kiosk' or 'Exit' label
- Blue highlight when active for clear visual feedback
- State persists in sessionStorage like the URL param method
Implementation:
- Added setKioskMode() and subscribeToKioskMode() to url.ts for
programmatic control and reactive state tracking
- Added toggle button in AppLayout header with lucide icons
- Uses same sessionStorage key as URL param approach for compatibility
Previously, kiosk mode (?kiosk=1) was only read from URL params on each
render. When navigating to different sections or refreshing, the kiosk
param was lost and the filter panel would reappear.
Now kiosk mode is persisted to sessionStorage when detected from URL,
similar to how API tokens are handled. This makes it survive:
- Navigation between dashboard sections (Docker, Ceph, etc.)
- Page refreshes
- The URL cleanup that removes the token parameter
To exit kiosk mode, users can either:
- Close the browser tab (clears sessionStorage)
- Navigate to the URL with ?kiosk=false
Fixes follow-up bug reported in #1055