feat: add delete playlist button to edit modal
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
b575e38726
commit
8c83d4d598
4 files changed
+22
-4
No files matched your search
@@ -572,3 +572,15 @@ export async function editPlRemoveCover() {
|
||||
} catch(e) { S._ndToken = null; toast('Fehler: '+e.message); }
|
||||
}
|
||||
|
||||
export async function deletePlaylist() {
|
||||
const pl = S._currentPlaylist;
|
||||
if (!pl) return;
|
||||
if (!confirm(`Playlist "${pl.name}" wirklich löschen?`)) return;
|
||||
try {
|
||||
await api('deletePlaylist', `&id=${pl.id}`);
|
||||
closeEditPlModal();
|
||||
toast(`🗑 "${pl.name}" gelöscht`);
|
||||
navigate('playlists');
|
||||
} catch(e) { toast('Fehler beim Löschen: ' + e.message); }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user