feat(slint): favorites albums group-by (Off / A-Z / Artist)
Add a group QbzSelect to the Albums toolbar. derive_albums buckets the filtered set by artist name or by the title's first letter (# for non-alphabetic), sections ordered alphabetically, rendered through the shared AlbumCollectionView grouped path. albums-shown carries the post-filter count so the count line + no-match state stay correct in grouped mode. cc
This commit is contained in:
4 files changed
+107
-8
No files matched your search
@@ -1461,10 +1461,13 @@ export global FavoritesState {
|
||||
in-out property <bool> tracks-multi-select: false;
|
||||
in property <int> tracks-selected-count: 0;
|
||||
in property <[AlbumCardItem]> albums: [];
|
||||
in property <[AlbumCardItem]> albums-visible: []; // after search + sort (what the grid/list renders)
|
||||
in property <[AlbumCardItem]> albums-visible: []; // after search + sort (flat render)
|
||||
in property <[DiscoverSection]> albums-grouped: []; // group-by sections
|
||||
in-out property <string> albums-view-mode: "grid"; // "grid" | "list"
|
||||
in-out property <string> albums-search: "";
|
||||
in-out property <string> albums-sort-by: "default"; // default|title-asc|title-desc|artist-asc
|
||||
in-out property <string> albums-group-mode: "off"; // off|alpha|artist
|
||||
in property <int> albums-shown: 0; // count after filter (grouped or flat)
|
||||
in property <[FavoriteArtistItem]> artists: [];
|
||||
in property <[FavoritePlaylistItem]> playlists: [];
|
||||
in property <[FavoriteLabelItem]> labels: [];
|
||||
@@ -1494,6 +1497,7 @@ export global FavoritesActions {
|
||||
callback album-action(string /* album id */, string /* action */);
|
||||
callback albums-search(string /* query */);
|
||||
callback albums-set-sort(string /* sort key */);
|
||||
callback albums-set-group(string /* off | alpha | artist */);
|
||||
callback albums-shuffle();
|
||||
callback unfavorite-track(string /* track id */);
|
||||
callback unfavorite-album(string /* album id */);
|
||||
|
||||
Reference in new issue
Block a user