feat(qbz-slint): splash screen during session restore

Adds a splash screen (logo, wordmark, spinner) shown while the app
boots and restores a saved session. The login form no longer flashes
for returning users — the app starts on `splash` and resolves to
`shell` (restored) or `login` (no saved session), matching the current
QBZ app behavior.

cc
This commit is contained in:
vicrodh committed 2026-05-18 13:50:11 -06:00
1 parent 7730b07ac4
commit 8748ef1211
3 files changed
+87 -7

No files matched your search

+7 -5
View File
@@ -5,16 +5,16 @@
// (POC ADR, sections 13 and 21).
import { Theme } from "foundation/semantic-colors.slint";
import { SplashScreen } from "splash/SplashScreen.slint";
import { LoginScreen } from "login/LoginScreen.slint";
import { AppShell } from "shell/AppShell.slint";
// Re-export the HomeState global so the Rust layer can populate it.
export { HomeState } from "state.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 }
// 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 component AppWindow inherits Window {
title: "QBZ";
@@ -24,7 +24,7 @@ export component AppWindow inherits Window {
min-height: 600px;
background: Theme.surface-main;
in-out property <AppScreen> screen: AppScreen.login;
in-out property <AppScreen> screen: AppScreen.splash;
// Forwarded to the Rust layer, which maps them to typed AppCommands.
callback sign-in-via-browser();
@@ -32,6 +32,8 @@ export component AppWindow inherits Window {
callback start-offline();
callback open-tos();
if root.screen == AppScreen.splash: SplashScreen { }
if root.screen == AppScreen.login: LoginScreen {
sign-in-via-browser => {
root.sign-in-via-browser();