feat(slint): offline manager — checkboxes + bulk, status to the end, track numbers

Per user feedback:
- Multi-select: a checkbox on every track row + "Select all"/"Clear" toggle +
  a bulk bar ("N selected" / Re-download / Remove). Selection is an in-place
  model edit (offline_manager::toggle_select / set_all_selected) with a live
  selected-count; bulk reads the checked ids and runs redownload_track /
  remove_cached per track.
- Moved the status glyph to the END of the row (albums and tracks) — it read
  as "missing art" at the leading edge under the album-grouping model.
- Track rows now show their position number in the leading slot (filling what
  looked empty). (Position within the album; the catalog track number isn't in
  the cache index.db — a follow-up if the real number is wanted.)

qbz-slint compiles clean.

cc
This commit is contained in:
vicrodh committed 2026-05-28 12:23:46 -06:00
1 parent db3d8491f5
commit 2b6c71000f
4 files changed
+267 -12

No files matched your search

+10
View File
@@ -672,6 +672,8 @@ export struct OfflineRow {
status: int,
progress: float, // track downloading 0..1
cover: image, // album-header cover (loaded from the on-disk cover.jpg)
number: string, // track position within its album ("" on album rows)
selected: bool, // multi-select checkbox
}
// One entry in the manager's left A-Z artist rail.
@@ -696,6 +698,8 @@ export global OfflineManagerState {
in property <string> selected-artist: ""; // "" = all artists
in property <int> sort-index: 0; // 0 alpha / 1 recent / 2 largest / 3 smallest
in property <bool> show-only-failed: false;
// Multi-select: how many TRACK rows are checked (drives the bulk bar).
in property <int> selected-count: 0;
}
export global OfflineManagerActions {
@@ -706,6 +710,12 @@ export global OfflineManagerActions {
callback select-artist(string /* name, "" = all */);
callback set-sort(int /* index */);
callback toggle-failed();
// Multi-select.
callback toggle-select(string /* track id */);
callback select-all();
callback clear-selection();
callback bulk-redownload();
callback bulk-remove();
callback remove-track(string /* track id */);
callback remove-album(string /* album id */);
callback redownload-track(string /* track id */);