android: a playlist's cover from a photo on the phone

The storage plugin gains pick_image — the document picker limited to
images, the picked content copied into the app's cache so the Rust side
gets a plain path. playlist_cover_set(id, path) is the desktop pick's
install step split out and shared (squared, the master cover, the row's
revision moved). A playlist's sheet offers Choose cover photo and Remove
custom cover; the mock walk exercises both.
This commit is contained in:
KeelrLeek committed 2026-09-13 21:20:11 -05:00
1 parent d95c3f48d1
commit b50577fc81
15 files changed
+188 -12

No files matched your search

+16
View File
@@ -184,6 +184,22 @@ export async function deletePlaylist(p) {
await refreshPlaylists();
}
/* ── the cover: a photo from the phone, or the mosaic again ── */
export async function coverFromPhoto(p) {
let r;
try { r = await api.pickImage(); } catch (e) { if (/cancelled/.test(String(e))) return false; throw e; }
if (!r?.path) return false;
await api.playlistCoverSet(p.id, r.path);
await refreshPlaylists();
note(`Cover set for ${p.name}`);
return true;
}
export async function coverClear(p) {
await api.playlistCoverClear(p.id);
await refreshPlaylists();
note(`Back to the mosaic for ${p.name}`);
}
/* ── reorder: a row up, down or to the top; the complete id order goes
in one call, as the desktop's drop does ── */
export async function moveItem(p, items, item, where) {