feat(qbz-slint): real Discover Home view

After sign-in the app loads the real Qobuz discover index and renders
the Home view: a time-based greeting with the user's name, the tab
pill (Home / Editor's Picks / For You), and discover sections — New
Releases, Press Accolades, Ideal Discography, Qobuzissimes, Albums of
the Week — each a horizontally scrolling row of album cards.

- state.slint: AlbumCardItem / DiscoverSection structs, HomeState global.
- discover/: AlbumCard (artwork area, award ribbon, title, artist,
  quality badge), SectionRow, HomeView.
- home.rs: discover-index fetch and mapping (award-ribbon priority,
  quality string), greeting, and event-loop model application. Unit
  tests for ribbon, quality, and greeting logic.
- AppShell content region is now the HomeView.

Album artwork images load in the next increment (artwork pipeline);
cards currently show the elevated placeholder. No fixtures — all data
is the live discover index.

cc
This commit is contained in:
vicrodh committed 2026-05-18 13:01:45 -06:00
1 parent 03b9a1c528
commit 8246ad5dd6
11 files changed
+576 -40

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
// 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,
quality: string,
ribbon: string,
ribbon-kind: string, // "press" | "qobuzissime" | "albumOfTheWeek" | ""
artwork-url: string,
}
export struct DiscoverSection {
title: string,
albums: [AlbumCardItem],
}
// Discover / Home screen state.
export global HomeState {
in property <string> greeting: "";
in property <[DiscoverSection]> sections: [];
in property <bool> loading: false;
}