feat(kiosk): KioskShell touch shell + NavRail (P1, axis B)
Add AppScreen.kiosk mounting a KioskShell sibling of AppShell in the same AppWindow: a thin back bar + persistent PlayerBarSmall + a bottom NavRail of 6 tiles replace the HeaderBar/Sidebar, sharing every *State global verbatim. The NavRail routes through the SAME NavState routes the desktop uses (header-menu-navigate / request-settings / ContentView.search). Content reuses the real Home/Album/Artist/Favorites/Search/Settings views (verbatim subset of AppShell mounts) with the arithmetic content-height pattern to avoid the layout-collapse footgun. Rust lands the Kiosk screen post-login when the kiosk profile is active. Validated through the Slint 1.16.1 compiler (slintcheck stub); remaining routes + touch-interaction remap are P2/P3. cc
This commit is contained in:
4 files changed
+426
-3
No files matched your search
@@ -16,6 +16,7 @@ import { ThemeState } from "foundation/theme-state.slint";
|
||||
import { SplashScreen } from "splash/SplashScreen.slint";
|
||||
import { LoginScreen } from "login/LoginScreen.slint";
|
||||
import { AppShell } from "shell/AppShell.slint";
|
||||
import { KioskShell } from "shell/KioskShell.slint";
|
||||
import { Toast } from "primitives/Toast.slint";
|
||||
import { ShellState, MiniPlayerState, NowPlayingState, AppearanceState, UiScale, WindowControlActions } from "state.slint";
|
||||
import { MiniShell } from "miniplayer/MiniShell.slint";
|
||||
@@ -33,7 +34,7 @@ export { HomeState, HomeActions, RecentAlbumsState, DiscoverState, DiscoverActio
|
||||
|
||||
// Which top-level screen is shown. The app starts on `splash` while it
|
||||
// restores a saved session, then resolves to `shell` or `login`.
|
||||
export enum AppScreen { splash, login, shell }
|
||||
export enum AppScreen { splash, login, shell, kiosk }
|
||||
|
||||
export component AppWindow inherits Window {
|
||||
// "Show track in window title" (Appearance settings): when enabled and a
|
||||
@@ -179,6 +180,60 @@ export component AppWindow inherits Window {
|
||||
}
|
||||
}
|
||||
|
||||
// Kiosk touch shell — a sibling of AppShell (small-panel profile). Same
|
||||
// conditional-mount geometry pin as AppShell (a conditional child sizes to
|
||||
// preferred size, so width/height are bound explicitly). Forwards the same
|
||||
// callbacks to the AppWindow root.
|
||||
if root.screen == AppScreen.kiosk: KioskShell {
|
||||
width: root.width;
|
||||
height: root.height;
|
||||
open-album(id) => {
|
||||
root.open-album(id);
|
||||
}
|
||||
open-artist(id) => {
|
||||
root.open-artist(id);
|
||||
}
|
||||
open-purchase-album(id) => {
|
||||
root.open-purchase-album(id);
|
||||
}
|
||||
media-action(kind, id, action) => {
|
||||
root.media-action(kind, id, action);
|
||||
}
|
||||
header-menu-navigate(route) => {
|
||||
root.header-menu-navigate(route);
|
||||
}
|
||||
discover-view-all(e, t) => {
|
||||
root.discover-view-all(e, t);
|
||||
}
|
||||
settings-bool(k, v) => {
|
||||
root.settings-bool(k, v);
|
||||
}
|
||||
settings-select(k, i) => {
|
||||
root.settings-select(k, i);
|
||||
}
|
||||
settings-slider(k, v) => {
|
||||
root.settings-slider(k, v);
|
||||
}
|
||||
settings-string(k, s) => {
|
||||
root.settings-string(k, s);
|
||||
}
|
||||
settings-reset => {
|
||||
root.settings-reset();
|
||||
}
|
||||
settings-release-device => {
|
||||
root.settings-release-device();
|
||||
}
|
||||
logout => {
|
||||
root.logout();
|
||||
}
|
||||
close-app => {
|
||||
root.close-app();
|
||||
}
|
||||
recovery-login => {
|
||||
root.recovery-login();
|
||||
}
|
||||
}
|
||||
|
||||
// App-global in-app toast overlay. Declared last so it floats over
|
||||
// every screen (splash / login / shell). Driven by ToastState via
|
||||
// crate::toast.
|
||||
|
||||
Reference in new issue
Block a user