feat(qbz-slint): app shell frame
M1 progress. Adds the post-login shell: HeaderBar (nav tabs and search), Sidebar (playlists list and user card), PlayerBar (transport, now-playing, volume), and AppShell composing them with the content region as a placeholder. app.slint gains an AppScreen enum; clicking sign-in or start-offline navigates login -> shell (no real auth yet — that is M2). New layout foundation tokens (sidebar width, header/player-bar heights) plus border and hover semantic colors. cc
This commit is contained in:
9 files changed
+464
-5
No files matched your search
@@ -6,6 +6,12 @@
|
||||
|
||||
import { Theme } from "foundation/semantic-colors.slint";
|
||||
import { LoginScreen } from "login/LoginScreen.slint";
|
||||
import { AppShell } from "shell/AppShell.slint";
|
||||
|
||||
// Which top-level screen is shown. During M1 the screen switches on a
|
||||
// login-button click without real authentication; M2 ties the switch
|
||||
// to a real session.
|
||||
export enum AppScreen { login, shell }
|
||||
|
||||
export component AppWindow inherits Window {
|
||||
title: "QBZ";
|
||||
@@ -15,13 +21,15 @@ export component AppWindow inherits Window {
|
||||
min-height: 600px;
|
||||
background: Theme.surface-main;
|
||||
|
||||
in-out property <AppScreen> screen: AppScreen.login;
|
||||
|
||||
// Forwarded to the Rust layer, which maps them to typed AppCommands.
|
||||
callback sign-in-via-browser();
|
||||
callback use-system-browser();
|
||||
callback start-offline();
|
||||
callback open-tos();
|
||||
|
||||
LoginScreen {
|
||||
if root.screen == AppScreen.login: LoginScreen {
|
||||
sign-in-via-browser => {
|
||||
root.sign-in-via-browser();
|
||||
}
|
||||
@@ -35,4 +43,6 @@ export component AppWindow inherits Window {
|
||||
root.open-tos();
|
||||
}
|
||||
}
|
||||
|
||||
if root.screen == AppScreen.shell: AppShell { }
|
||||
}
|
||||
Reference in new issue
Block a user