feat(kiosk): live Kiosk<->Desktop toggle in the NPB layout menu

Add a "Kiosk mode" / "Desktop mode" item to both PlayerBarSmall and
PlayerBar view menus (label from the new ShellState.kiosk-profile flag).
It fires media-action("npb-view","","toggle-profile"); Rust flips the
persisted ui_prefs.profile and swaps the shell in place via set_screen
(KioskShell/AppShell share state, so no restart). The toggle keys off the
current screen, not kiosk_profile_active(), so a QBZ_PROFILE env override
doesnt pin it. ShellState.kiosk-profile is seeded at window setup.

cc
This commit is contained in:
vicrodh committed 2026-07-10 21:17:12 -06:00
1 parent dc51c62c7f
commit f1d965b04e
4 files changed
+36

No files matched your search

+7
View File
@@ -790,6 +790,13 @@ export component PlayerBar inherits Rectangle {
root.media-action("npb-view", "", "immersive");
}
}
ContextMenuItem {
icon: @image-url("../assets/icons/hard-drive.svg");
label: ShellState.kiosk-profile ? @tr("Desktop mode") : @tr("Kiosk mode");
clicked => {
root.media-action("npb-view", "", "toggle-profile");
}
}
}
}
}