mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 03:20:11 +00:00
feat: Add kiosk mode for clean dashboard display
Add ?kiosk=1 URL parameter to hide the filter panel and section nav for a cleaner dashboard view. Useful for dedicated LCD displays or wallboard setups. Related to #917
This commit is contained in:
parent
cf577e715f
commit
2dc144f8dd
1 changed files with 37 additions and 23 deletions
|
|
@ -210,6 +210,15 @@ export function Dashboard(props: DashboardProps) {
|
|||
const { isMobile } = useBreakpoint();
|
||||
const alertsActivation = useAlertsActivation();
|
||||
const alertsEnabled = createMemo(() => alertsActivation.activationState() === 'active');
|
||||
|
||||
// Kiosk mode - hide filter panel for clean dashboard display
|
||||
// Usage: Add ?kiosk=1 to URL
|
||||
const kioskMode = createMemo(() => {
|
||||
if (typeof window === 'undefined') return false;
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
return params.get('kiosk') === '1' || params.get('kiosk') === 'true';
|
||||
});
|
||||
|
||||
const [search, setSearch] = createSignal('');
|
||||
const [isSearchLocked, setIsSearchLocked] = createSignal(false);
|
||||
const [selectedNode, setSelectedNode] = createSignal<string | null>(null);
|
||||
|
|
@ -940,7 +949,10 @@ export function Dashboard(props: DashboardProps) {
|
|||
|
||||
return (
|
||||
<div class="space-y-3">
|
||||
{/* Section nav - hidden in kiosk mode */}
|
||||
<Show when={!kioskMode()}>
|
||||
<ProxmoxSectionNav current="overview" />
|
||||
</Show>
|
||||
|
||||
{/* Unified Node Selector */}
|
||||
<UnifiedNodeSelector
|
||||
|
|
@ -953,7 +965,8 @@ export function Dashboard(props: DashboardProps) {
|
|||
searchTerm={search()}
|
||||
/>
|
||||
|
||||
{/* Dashboard Filter */}
|
||||
{/* Dashboard Filter - hidden in kiosk mode */}
|
||||
<Show when={!kioskMode()}>
|
||||
<DashboardFilter
|
||||
search={search}
|
||||
setSearch={setSearch}
|
||||
|
|
@ -975,6 +988,7 @@ export function Dashboard(props: DashboardProps) {
|
|||
onColumnToggle={columnVisibility.toggle}
|
||||
onColumnReset={columnVisibility.resetToDefaults}
|
||||
/>
|
||||
</Show>
|
||||
|
||||
{/* Loading State */}
|
||||
<Show when={connected() && !initialDataReceived()}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue