feat(webui): kiosk (展示模式) for chrome-free wall displays (B2)
A session-sticky kiosk mode for showing the dashboard on a wall display: - Entry: `?kiosk=1` URL param (stripped after read) or a top-bar button (toggleable via topbarItems 'kiosk'). - Hides the sidebar + top bar (MainLayout) and any in-content edit entry marked data-kiosk-hide (the overview 编辑布局 toolbar) via an html[data-kiosk] CSS rule. - Exit: Esc key or a dim corner button. Purely cosmetic — never touches auth and issues no token. A new KioskProvider (sessionStorage-backed, mounted under LayoutProvider) owns the state. Completes the B2 dashboard/components batch.
This commit is contained in:
6 files changed
+134
-26
No files matched your search
@@ -110,8 +110,9 @@ export function OverviewPage() {
|
||||
<div className="flex flex-col gap-5">
|
||||
{/* Toolbar: edit toggle on both desktop (2D grid overlays) and mobile
|
||||
(single-column drag-sort panel). The sidebar nav is drag-sortable in
|
||||
edit mode on both — no separate editor panel. */}
|
||||
<div className="flex items-center justify-end gap-2">
|
||||
edit mode on both — no separate editor panel. Hidden in kiosk mode
|
||||
(data-kiosk-hide → CSS) so a wall display has no edit entry. */}
|
||||
<div data-kiosk-hide className="flex items-center justify-end gap-2">
|
||||
{editing && (
|
||||
<Button variant="ghost" size="sm" onClick={resetLayout} className="text-muted-foreground">
|
||||
<RotateCcw className="size-3.5" /> 恢复默认
|
||||
|
||||
Reference in new issue
Block a user