M1 progress. Adds the foundation token layer (palette, semantic colors, spacing, radius, typography) bound to the QBZ dark theme, three primitives (QbzCheckbox, QbzPrimaryButton, QbzTextLink), and the LoginScreen feature component. The login screen mirrors the Svelte LoginView: centered card, logo, QBZ wordmark, Qobuz ToS checkbox, "Sign in via Browser" button, system-browser and offline links, and the legal disclaimer. Colors are lifted verbatim from src/app.css; strings use @tr() markers. Rust side: typed AppCommand enum; UI callbacks dispatch through it. M2 wires the command handler to AppRuntime. cc
36 lines
989 B
Plaintext
36 lines
989 B
Plaintext
// Full-width accent button primitive.
|
|
|
|
import { Theme } from "../foundation/semantic-colors.slint";
|
|
import { Radius } from "../foundation/radius.slint";
|
|
import { Typography } from "../foundation/typography.slint";
|
|
|
|
export component QbzPrimaryButton inherits Rectangle {
|
|
in property <string> label;
|
|
in property <bool> enabled: true;
|
|
callback clicked();
|
|
|
|
height: 48px;
|
|
border-radius: Radius.sm;
|
|
opacity: root.enabled ? 1.0 : 0.5;
|
|
background: ta.has-hover && root.enabled ? Theme.accent-hover : Theme.accent;
|
|
|
|
animate background { duration: 150ms; }
|
|
|
|
Text {
|
|
text: root.label;
|
|
color: Theme.accent-text;
|
|
font-size: Typography.button;
|
|
font-weight: Typography.semibold;
|
|
horizontal-alignment: center;
|
|
vertical-alignment: center;
|
|
}
|
|
|
|
ta := TouchArea {
|
|
enabled: root.enabled;
|
|
mouse-cursor: root.enabled ? pointer : default;
|
|
clicked => {
|
|
root.clicked();
|
|
}
|
|
}
|
|
}
|