- Replace every Unicode glyph placeholder with Lucide icons via QbzIcon (player transport, carousel nav, album-card overlay, album-page actions, gear, search, checkbox, sidebar). - Header: the search field is centered to the window width and gets a search icon; the header and player bar now use the elevated surface, so all chrome (header, sidebar, player bar) shares one color over the darker content area. - The sidebar user card moves to the header as a user element (name + QBZ logo) that opens a dropdown — Settings, Keyboard Shortcuts, Documentation, Report an Issue, About, plus Log Out and Close. Log Out clears the session and returns to login; Close quits the app. - Content ScrollViews disable the horizontal scrollbar — no view scrolls horizontally, so the phantom reserved lane is gone. cc
59 lines
1.6 KiB
Plaintext
59 lines
1.6 KiB
Plaintext
// Shared UI state — structs and globals the Rust controllers populate.
|
|
//
|
|
// The Rust side builds these models on a worker thread, then sets them
|
|
// on the global from the Slint event loop (see src/home.rs, src/main.rs).
|
|
|
|
export struct AlbumCardItem {
|
|
id: string,
|
|
title: string,
|
|
artist: string,
|
|
genre: string, // shown in the hover overlay
|
|
year: string, // shown in the hover overlay
|
|
quality-tier: string, // "hires" | "cd" | "" — drives the badge icon
|
|
ribbon: string,
|
|
ribbon-kind: string, // "press" | "qobuzissime" | "albumOfTheWeek" | ""
|
|
artwork-url: string,
|
|
artwork: image, // empty until the artwork pipeline resolves it
|
|
}
|
|
|
|
export struct DiscoverSection {
|
|
title: string,
|
|
albums: [AlbumCardItem],
|
|
}
|
|
|
|
// Discover / Home screen state.
|
|
export global HomeState {
|
|
in property <[DiscoverSection]> sections: [];
|
|
in property <bool> loading: false;
|
|
}
|
|
|
|
export struct AlbumTrackItem {
|
|
number: string,
|
|
title: string,
|
|
artist: string,
|
|
duration: string,
|
|
quality-tier: string,
|
|
explicit: bool,
|
|
}
|
|
|
|
// Album detail screen state.
|
|
export global AlbumState {
|
|
in property <string> title;
|
|
in property <string> artist;
|
|
in property <string> info-line;
|
|
in property <string> quality-tier;
|
|
in property <image> artwork;
|
|
in property <[AlbumTrackItem]> tracks: [];
|
|
in property <bool> loading: false;
|
|
}
|
|
|
|
// Which content view the shell shows.
|
|
export global NavState {
|
|
in-out property <bool> showing-album: false;
|
|
}
|
|
|
|
// Authenticated user, for the header user element.
|
|
export global SessionState {
|
|
in property <string> user-name: "";
|
|
}
|