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
73 lines
2.5 KiB
Plaintext
73 lines
2.5 KiB
Plaintext
// Splash screen — shown while the app boots and tries to restore a
|
|
// saved session, so the login form never flashes for returning users.
|
|
|
|
import { Theme } from "../foundation/semantic-colors.slint";
|
|
import { Typography } from "../foundation/typography.slint";
|
|
import { Radius } from "../foundation/radius.slint";
|
|
import { Spacing } from "../foundation/spacing.slint";
|
|
import { Spinner } from "std-widgets.slint";
|
|
|
|
export component SplashScreen inherits Rectangle {
|
|
background: Theme.surface-main;
|
|
|
|
VerticalLayout {
|
|
alignment: center;
|
|
|
|
HorizontalLayout {
|
|
alignment: center;
|
|
|
|
Rectangle {
|
|
width: 720px;
|
|
background: Theme.surface-card;
|
|
border-radius: Radius.lg;
|
|
drop-shadow-blur: 32px;
|
|
drop-shadow-color: Theme.card-shadow;
|
|
drop-shadow-offset-y: 8px;
|
|
|
|
VerticalLayout {
|
|
padding: Spacing.card-padding;
|
|
spacing: 0px;
|
|
|
|
HorizontalLayout {
|
|
alignment: center;
|
|
Image {
|
|
source: @image-url("../assets/qbz-logo.png");
|
|
width: 140px;
|
|
height: 140px;
|
|
image-fit: contain;
|
|
}
|
|
}
|
|
Rectangle { height: Spacing.sm; }
|
|
Text {
|
|
text: @tr("QBZ");
|
|
color: Theme.text-primary;
|
|
font-size: Typography.wordmark;
|
|
font-weight: Typography.semibold;
|
|
letter-spacing: 8px;
|
|
horizontal-alignment: center;
|
|
}
|
|
Rectangle { height: 2px; }
|
|
Text {
|
|
text: @tr("QOBUZ™ PLAYER");
|
|
color: Theme.text-muted;
|
|
font-size: Typography.subtitle;
|
|
letter-spacing: 4px;
|
|
horizontal-alignment: center;
|
|
}
|
|
|
|
Rectangle { height: Spacing.xl; }
|
|
|
|
HorizontalLayout {
|
|
alignment: center;
|
|
Spinner {
|
|
indeterminate: true;
|
|
width: 30px;
|
|
height: 30px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|