feat(slint): rename + delete playlist (edit modal)
Completes playlist CRUD. The detail header shows an edit button only
for the user's own playlists (is-owner = the open id is in the sidebar
list); it opens an EditPlaylistModal:
- Save -> update_playlist (rename); refreshes the detail header name
and the sidebar list.
- Delete -> delete_playlist; closes the modal, navigates back, and
refreshes the sidebar.
Adds the pen-line icon (Lucide) used by the edit button.
cc
This commit is contained in:
8 files changed
+284
-1
No files matched your search
@@ -243,10 +243,26 @@ export global PlaylistState {
|
||||
in property <string> cover-url;
|
||||
in property <image> cover;
|
||||
in property <bool> is-favorite: false;
|
||||
// True when the playlist is one of the user's own (editable).
|
||||
in property <bool> is-owner: false;
|
||||
in property <[TrackItem]> tracks: [];
|
||||
in property <bool> loading: false;
|
||||
}
|
||||
|
||||
// "Edit playlist" modal state (rename + delete).
|
||||
export global EditPlaylistState {
|
||||
in-out property <bool> open: false;
|
||||
in property <string> id;
|
||||
in-out property <string> name;
|
||||
in property <bool> busy: false;
|
||||
}
|
||||
|
||||
export global EditPlaylistActions {
|
||||
callback save();
|
||||
callback delete();
|
||||
callback close();
|
||||
}
|
||||
|
||||
// Settings screen state. Audio and Playback preferences are loaded from
|
||||
// the persistence stores by the Rust settings controller and pushed here;
|
||||
// changes flow back through the settings-bool / settings-select /
|
||||
|
||||
Reference in new issue
Block a user