// App shell — the post-login frame: header bar, sidebar, content // region, and player bar. The content region shows the Discover Home, // Album detail, or Artist detail view, driven by NavState. // // Regions are delineated by their surface colors (chrome over the darker // content well); no hairline borders. import { Theme } from "../foundation/semantic-colors.slint"; import { NavState, ContentView } from "../state.slint"; import { Sidebar } from "Sidebar.slint"; import { HeaderBar } from "HeaderBar.slint"; import { PlayerBar } from "PlayerBar.slint"; import { HomeView } from "../discover/HomeView.slint"; import { AlbumPageView } from "../album/AlbumPageView.slint"; import { ArtistPageView } from "../artist/ArtistPageView.slint"; import { SettingsView } from "../settings/SettingsView.slint"; export component AppShell inherits Rectangle { callback open-album(string); callback open-artist(string); callback media-action(string, string, string); callback settings-bool(string, bool); callback settings-select(string, int); callback logout(); callback close-app(); background: Theme.surface-main; VerticalLayout { spacing: 0px; HeaderBar { logout => { root.logout(); } close-app => { root.close-app(); } } HorizontalLayout { vertical-stretch: 1; spacing: 0px; Sidebar { } // Content region — Home, Album, or Artist. Rectangle { horizontal-stretch: 1; background: Theme.surface-main; if NavState.view == ContentView.home: HomeView { album-clicked(id) => { root.open-album(id); } media-action(kind, id, action) => { root.media-action(kind, id, action); } } if NavState.view == ContentView.album: AlbumPageView { open-artist(id) => { root.open-artist(id); } media-action(kind, id, action) => { root.media-action(kind, id, action); } } if NavState.view == ContentView.artist: ArtistPageView { open-album(id) => { root.open-album(id); } media-action(kind, id, action) => { root.media-action(kind, id, action); } } if NavState.view == ContentView.settings: SettingsView { settings-bool(k, v) => { root.settings-bool(k, v); } settings-select(k, i) => { root.settings-select(k, i); } } } } PlayerBar { } } }