feat(slint): LocalLibrary ephemeral folders + Folders tree 1:1 port

Ephemeral folders: open / browse / play a folder without indexing it —
album-grouped pane, CUE seek fast-path (no full re-decode per virtual track),
folder-path persistence + rehydrate, "already playing" add-vs-replace choice
dialog (ephemeral-only), and now-playing / queue / menu gating so an ephemeral
track exposes no persistence actions.

Folders tree brought 1:1 with Tauri:
- Rail header: select-mode, collapse-all, open-ephemeral, tree search.
- Resizable rail (default ~20% narrower; drag handle, min 50% default /
  max 50% of the content area).
- Subfolder cover grid + grid/list toggle, recursive track count, name search;
  compact icon bulk bar (folder-check / play-next / queue / playlist / clear).
- Tree is the default mode; circular checkboxes homologated with TrackRow;
  compact rows (smaller type + icon, no ambiguous trailing count).
- Flat/Tree icon toggle (disc-album / folder-tree), floated right.

Per-source TrackRow context menu (logic, not a blanket trim): Qobuz/offline =
full; local = play/next/queue + add-to-playlist; plex/ephemeral = play/next/
queue only.

App-wide standard: Math.round pixel-snap on icon centering across the UI to
kill sub-pixel blur (CircleAction, header back/forward/collapse, and the rest).
NowPlayingBar context icon -> turntable (frees disc-album for the Folders
toggle). New assets: folder-check, folder-tree, turntable.

cc
This commit is contained in:
vicrodh committed 2026-06-07 10:12:59 -06:00
1 parent ee9a3c1c89
commit 82129cff35
74 files changed
+2725 -581

No files matched your search

@@ -8,10 +8,20 @@ import { ContextMenuItem } from "ContextMenuItem.slint";
export component TrackContextMenu inherits PopupWindow {
in property <string> track-id;
// Per-source applicability (the surrounding row sets these from the track's
// source). `qobuz-actions` = the Qobuz-backed block (favorite, radio,
// mixtape, share, make-offline, go-to album/artist, track info) — on for
// Qobuz + offline, off for local / Plex / ephemeral. `playlist-action` =
// Add to playlist — on for Qobuz + offline + local (local playlists), off
// for Plex + ephemeral. The transient actions (play / next / queue) always
// show.
in property <bool> qobuz-actions: true;
in property <bool> playlist-action: true;
callback media-action(string, string, string);
width: 224px;
height: 392px;
// 3 transient + optional add-to-playlist + the 9-item Qobuz block.
height: (3 + (root.playlist-action ? 1 : 0) + (root.qobuz-actions ? 9 : 0)) * 30px;
ContextMenu {
ContextMenuItem {
@@ -35,70 +45,70 @@ export component TrackContextMenu inherits PopupWindow {
root.media-action("track", root.track-id, "queue");
}
}
ContextMenuItem {
if root.qobuz-actions: ContextMenuItem {
icon: @image-url("../assets/icons/radio.svg");
label: @tr("Create radio");
clicked => {
root.media-action("track", root.track-id, "create-radio");
}
}
ContextMenuItem {
if root.qobuz-actions: ContextMenuItem {
icon: @image-url("../assets/icons/heart.svg");
label: @tr("Add to library");
clicked => {
root.media-action("track", root.track-id, "favorite");
}
}
ContextMenuItem {
if root.qobuz-actions: ContextMenuItem {
icon: @image-url("../assets/icons/cassette-tape.svg");
label: @tr("Add to mixtape");
clicked => {
root.media-action("track", root.track-id, "add-to-mixtape");
}
}
ContextMenuItem {
if root.playlist-action: ContextMenuItem {
icon: @image-url("../assets/icons/list-music.svg");
label: @tr("Add to playlist");
clicked => {
root.media-action("track", root.track-id, "add-to-playlist");
}
}
ContextMenuItem {
if root.qobuz-actions: ContextMenuItem {
icon: @image-url("../assets/icons/link.svg");
label: @tr("Share Qobuz link");
clicked => {
root.media-action("track", root.track-id, "share-qobuz");
}
}
ContextMenuItem {
if root.qobuz-actions: ContextMenuItem {
icon: @image-url("../assets/icons/link.svg");
label: @tr("Share Song.link");
clicked => {
root.media-action("track", root.track-id, "share-songlink");
}
}
ContextMenuItem {
if root.qobuz-actions: ContextMenuItem {
icon: @image-url("../assets/icons/cloud-download.svg");
label: @tr("Make available offline");
clicked => {
root.media-action("track", root.track-id, "download");
}
}
ContextMenuItem {
if root.qobuz-actions: ContextMenuItem {
icon: @image-url("../assets/icons/disc-3.svg");
label: @tr("Go to album");
clicked => {
root.media-action("track", root.track-id, "go-to-album");
}
}
ContextMenuItem {
if root.qobuz-actions: ContextMenuItem {
icon: @image-url("../assets/icons/user.svg");
label: @tr("Go to artist");
clicked => {
root.media-action("track", root.track-id, "go-to-artist");
}
}
ContextMenuItem {
if root.qobuz-actions: ContextMenuItem {
icon: @image-url("../assets/icons/info.svg");
label: @tr("Track info");
clicked => {