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
37 lines
894 B
Plaintext
37 lines
894 B
Plaintext
// Underlined, muted text-link primitive. Turns accent-colored on hover.
|
|
|
|
import { Theme } from "../foundation/semantic-colors.slint";
|
|
import { Typography } from "../foundation/typography.slint";
|
|
|
|
export component QbzTextLink inherits Rectangle {
|
|
in property <string> label;
|
|
callback clicked();
|
|
|
|
width: txt.preferred-width;
|
|
height: txt.preferred-height + 3px;
|
|
|
|
txt := Text {
|
|
x: 0;
|
|
y: 0;
|
|
text: root.label;
|
|
color: ta.has-hover ? Theme.accent : Theme.text-muted;
|
|
font-size: Typography.link;
|
|
}
|
|
|
|
// Underline.
|
|
Rectangle {
|
|
x: 0;
|
|
y: txt.preferred-height + 1px;
|
|
width: txt.preferred-width;
|
|
height: 1px;
|
|
background: ta.has-hover ? Theme.accent : Theme.text-muted;
|
|
}
|
|
|
|
ta := TouchArea {
|
|
mouse-cursor: pointer;
|
|
clicked => {
|
|
root.clicked();
|
|
}
|
|
}
|
|
}
|