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:
4 files changed
+36
No files matched your search
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user