feat(slint): keyboard multi-select on the built-out surfaces (Mix, Label, LocalLibrary Albums)
Extend the keyboard multi-select feature to the surfaces that had no working selection in the Slint port. - Mix (DailyQ/WeeklyQ/FavQ/TopQ all render through one MixView): mode toggle + MultiSelectBar, per-row checkbox via the central toggle arm + a ContentView::Mix branch (model + recount), bulk play-next/queue/ add-to-playlist. Shift-range, Ctrl+A and Escape inherited automatically. - Label Popular Tracks: was a dead stub (checkboxes with no bar/recount/ router arms). Converted the local mode flag to LabelState.multi-select, added a real MultiSelectBar + label.rs recount/select_all/clear/selected, and the missing select-toggle/bulk router arms. - LocalLibrary Albums grid (a previously-missing surface): AlbumCardItem gains a `selected` field; a `select-mode` prop is threaded through the shared AlbumCard / AlbumListRow / AlbumGrid / AlbumCollectionView (default false, so Discover/Label/Favorites are untouched). Albums toolbar toggle + MultiSelectBar; local_library.rs album select fns (flat + grouped, id-resilient Shift-range over AlbumCardItem); album->tracks bulk resolve via fetch_album_tracks_blocking on spawn_blocking for queue/play-next/ add-to-playlist/add-to-mixtape; Ctrl+A and Escape routed by active-tab. cargo check -p qbz green (qbz_ui compiles clean). cc
This commit is contained in:
13 files changed
+783
-58
No files matched your search
@@ -20,6 +20,7 @@ component AlbumGrid inherits Rectangle {
|
||||
in property <length> card-gap: 24px;
|
||||
in property <bool> show-favorite: true;
|
||||
in property <bool> show-source-badge: false;
|
||||
in property <bool> select-mode: false;
|
||||
callback open-album(string);
|
||||
callback open-artist(string);
|
||||
callback media-action(string, string, string);
|
||||
@@ -40,6 +41,7 @@ component AlbumGrid inherits Rectangle {
|
||||
album: album;
|
||||
show-favorite: root.show-favorite;
|
||||
show-source-badge: root.show-source-badge;
|
||||
select-mode: root.select-mode;
|
||||
clicked(id) => {
|
||||
root.open-album(id);
|
||||
}
|
||||
@@ -65,6 +67,9 @@ export component AlbumCollectionView inherits VerticalLayout {
|
||||
// Forwarded to AlbumCard — show the always-visible source badge on the
|
||||
// grid card art (Local Library: local | qobuz-offline | plex).
|
||||
in property <bool> show-source-badge: false;
|
||||
// Forwarded to AlbumCard / AlbumListRow — checkbox + toggle-on-click
|
||||
// (Local Library albums multi-select). Default false everywhere else.
|
||||
in property <bool> select-mode: false;
|
||||
in property <length> card-width: 200px;
|
||||
in property <length> card-height: 246px;
|
||||
in property <length> card-gap: 24px;
|
||||
@@ -98,6 +103,7 @@ export component AlbumCollectionView inherits VerticalLayout {
|
||||
album: album;
|
||||
index: i;
|
||||
show-source: root.show-source;
|
||||
select-mode: root.select-mode;
|
||||
clicked(id) => {
|
||||
root.open-album(id);
|
||||
}
|
||||
@@ -115,6 +121,7 @@ export component AlbumCollectionView inherits VerticalLayout {
|
||||
albums: section.albums;
|
||||
show-favorite: root.show-favorite;
|
||||
show-source-badge: root.show-source-badge;
|
||||
select-mode: root.select-mode;
|
||||
card-width: root.card-width;
|
||||
card-height: root.card-height;
|
||||
card-gap: root.card-gap;
|
||||
@@ -136,6 +143,7 @@ export component AlbumCollectionView inherits VerticalLayout {
|
||||
albums: root.albums;
|
||||
show-favorite: root.show-favorite;
|
||||
show-source-badge: root.show-source-badge;
|
||||
select-mode: root.select-mode;
|
||||
card-width: root.card-width;
|
||||
card-height: root.card-height;
|
||||
card-gap: root.card-gap;
|
||||
@@ -160,6 +168,7 @@ export component AlbumCollectionView inherits VerticalLayout {
|
||||
album: album;
|
||||
index: i;
|
||||
show-source: root.show-source;
|
||||
select-mode: root.select-mode;
|
||||
clicked(id) => {
|
||||
root.open-album(id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user