feat(slint): LabelReleasesView (Port 3, second of three click targets)
Wires the artist network sidebar's Labels section to a real
destination. Mirrors Tauri's LabelReleasesView.svelte core: a label
header (image + name + release count) over a wrapping album grid
with load-more pagination. (Sort / filter Hi-Res / group-by-artist
from the Tauri view are deferred — the core browse experience is in.)
Slint:
- ContentView gains `label`; NavEntry mirrors with
`Label { id, name }`.
- LabelState / LabelActions globals carry the header (id, name,
image-url + decoded image) and the AlbumCardItem grid + total.
- New `ui/label/LabelReleasesView.slint`: label header card,
then the same absolute-position album grid + load-more pattern
the artist/musician views use. Reuses the Discover AlbumCard
(artist-as-subtitle is correct here — a label's catalog is
various artists).
- AppShell routes ContentView.label and forwards open-album +
media-action.
Rust:
- `crate::label` controller — load_label (parallel-ish
get_label_page + get_label_albums), load_more_albums,
apply_label, append_albums, apply_image (label header), and
artwork_jobs. extract_label_image handles the flexible
/label/page image value (string or mega/extralarge/.../small
object), same precedence as the Svelte.
- artwork::ArtworkTarget gains LabelAlbum { index }.
- main.rs: navigate_label + apply_entry route + on_label_clicked
(sidebar) + LabelActions::on_load_more.
- No new qbz-core methods — get_label_page / get_label_albums
already existed.
cc
This commit is contained in:
8 files changed
+550
-7
No files matched your search
@@ -94,7 +94,7 @@ export global AlbumActions {
|
||||
}
|
||||
|
||||
// Which content view the shell shows.
|
||||
export enum ContentView { home, album, artist, settings, search, musician }
|
||||
export enum ContentView { home, album, artist, settings, search, musician, label }
|
||||
|
||||
// Settings screen state. Audio and Playback preferences are loaded from
|
||||
// the persistence stores by the Rust settings controller and pushed here;
|
||||
@@ -433,6 +433,24 @@ export global MusicianActions {
|
||||
callback load-more();
|
||||
}
|
||||
|
||||
// LabelReleasesView state — opened by the artist network sidebar's
|
||||
// Labels section. Header (name + image) from /label/page, the
|
||||
// album grid from /label/getAlbums. Populated by `crate::label`.
|
||||
export global LabelState {
|
||||
in property <string> id;
|
||||
in property <string> name;
|
||||
in property <string> image-url;
|
||||
in property <image> image;
|
||||
in property <[AlbumCardItem]> albums: [];
|
||||
in property <int> total: 0;
|
||||
in property <bool> loading: false;
|
||||
in property <bool> load-more-loading: false;
|
||||
}
|
||||
|
||||
export global LabelActions {
|
||||
callback load-more();
|
||||
}
|
||||
|
||||
// Shell chrome state — collapsible left sidebar and right-side panels.
|
||||
// Globals are imported directly by the shell components, so toggles
|
||||
// need no callback plumbing.
|
||||
|
||||
Reference in new issue
Block a user