diff --git a/lib/localization/app_ar.arb b/lib/localization/app_ar.arb index 221e9c2c..4f26627f 100644 --- a/lib/localization/app_ar.arb +++ b/lib/localization/app_ar.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "تم تغيير لون التمييز", "accentColor": "لون التمييز", "add": "إضافة", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "إضافة إلى قائمة التشغيل", "addedSuccess": "تمت الإضافة بنجاح", @@ -34,6 +35,7 @@ "copyLogsSuccess": "تم نسخ السجلات بنجاح", "customPlaylistImgUrl": "رابط صورة قائمة التشغيل الخاصة", "customPlaylistName": "اسم قائمة التشغيل الخاصة", + "deletePlaylist": "Delete playlist", "download": "تحميل", "downloadAppUpdate": "تنزيل تحديث التطبيق", "dynamicColor": "لون التمييز الدينامي (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Recently played history cleared", "recommendedForYou": "موصى به لك", "remove": "إزالة", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_de.arb b/lib/localization/app_de.arb index 0020569d..ea5bff50 100644 --- a/lib/localization/app_de.arb +++ b/lib/localization/app_de.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Akzentfarbe geändert", "accentColor": "Akzentfarbe", "add": "Hinzufügen", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Zur Playlist hinzufügen", "addedSuccess": "Erfolgreich hinzugefügt", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Logs erfolgreich kopiert", "customPlaylistImgUrl": "Bildlink der benutzerdefinierten Playlist", "customPlaylistName": "Name der benutzerdefinierten Playlist", + "deletePlaylist": "Delete playlist", "download": "Herunterladen", "downloadAppUpdate": "Update herunterladen", "dynamicColor": "Dynamische Akzentfarbe (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Wiedergabeverlauf gelöscht", "recommendedForYou": "Empfohlen für dich", "remove": "Entfernen", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_el.arb b/lib/localization/app_el.arb index 170ce86b..e3f2c84c 100644 --- a/lib/localization/app_el.arb +++ b/lib/localization/app_el.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Το χρώμα έμφασης έχει αλλάξει", "accentColor": "Χρώμα έμφασης", "add": "Προσθήκη", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Προσθήκη στη λίστα αναπαραγωγής", "addedSuccess": "Επιτυχής προσθήκη", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Οι καταγραφές αντιγράφηκαν με επιτυχία.", "customPlaylistImgUrl": "Σύνδεσμος εικόνας προσαρμοσμένης λίστας αναπαραγωγής", "customPlaylistName": "Όνομα προσαρμοσμένης λίστας αναπαραγωγής", + "deletePlaylist": "Delete playlist", "download": "Λήψη", "downloadAppUpdate": "Λήψη ενημέρωσης εφαρμογής", "dynamicColor": "Δυναμικό χρώμα έμφασης (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Το ιστορικό αναπαραγωγής διαγράφηκε πρόσφατα", "recommendedForYou": "Συνιστάται για εσάς", "remove": "Αφαίρεση", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_en.arb b/lib/localization/app_en.arb index f87158e1..5307c828 100644 --- a/lib/localization/app_en.arb +++ b/lib/localization/app_en.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Accent color updated successfully", "accentColor": "Accent color", "add": "Add", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Add to playlist", "addedSuccess": "Added successfully", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Logs copied successfully", "customPlaylistImgUrl": "Custom playlist image URL", "customPlaylistName": "Custom playlist name", + "deletePlaylist": "Delete playlist", "download": "Download", "downloadAppUpdate": "Download app update", "dynamicColor": "Dynamic accent color (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Recently played history cleared", "recommendedForYou": "Recommended for you", "remove": "Remove", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", @@ -97,4 +100,4 @@ "useSquigglySlider": "Squiggly slider", "userPlaylists": "User playlists", "youtubePlaylistLinkOrId": "YouTube playlist link or ID" -} +} \ No newline at end of file diff --git a/lib/localization/app_es.arb b/lib/localization/app_es.arb index 80cddbdc..2fc71fe8 100644 --- a/lib/localization/app_es.arb +++ b/lib/localization/app_es.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Color de acento actualizado", "accentColor": "Color de acento", "add": "Agregar", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Agregar a la lista de reproducción", "addedSuccess": "Agregado correctamente", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Registros copiados correctamente", "customPlaylistImgUrl": "URL de imagen personalizada para la lista de reproducción", "customPlaylistName": "Nombre personalizado de la lista de reproducción", + "deletePlaylist": "Delete playlist", "download": "Descargar", "downloadAppUpdate": "Descargar actualización de la aplicación", "dynamicColor": "Color de acento dinámico (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Historial de reproducción reciente borrado", "recommendedForYou": "Recomendado para ti", "remove": "Eliminar", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_fr.arb b/lib/localization/app_fr.arb index 1cb8c719..648fc600 100644 --- a/lib/localization/app_fr.arb +++ b/lib/localization/app_fr.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Couleur modifiée", "accentColor": "Couleur", "add": "Ajouter", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Ajouter aux titres favoris", "addToPlaylist": "Ajouter à la playlist", "addedSuccess": "Ajout réussi", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Copie des logs réussie", "customPlaylistImgUrl": "Lien d'image de la playlist personnalisée", "customPlaylistName": "Nom de la playlist personnalisée", + "deletePlaylist": "Delete playlist", "download": "Télécharger", "downloadAppUpdate": "Télécharger la mise à jour", "dynamicColor": "Couleur d'accent dynamique (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Historique de lecture effacé", "recommendedForYou": "Recommandations", "remove": "Supprimer", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Supprimer des titres favoris", "removeFromPlaylist": "Supprimer de la playlist", "removeOffline": "Supprimer du mode hors ligne", @@ -97,4 +100,4 @@ "useSquigglySlider": "Utiliser le curseur ondulé", "userPlaylists": "Playlists des Utilisateurs", "youtubePlaylistLinkOrId": "Lien ou identifiant de la playlist YouTube" -} +} \ No newline at end of file diff --git a/lib/localization/app_gl.arb b/lib/localization/app_gl.arb index cbb0065c..01a115ca 100644 --- a/lib/localization/app_gl.arb +++ b/lib/localization/app_gl.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Cor de destaque actualizada", "accentColor": "Cor de destaque", "add": "Engadir", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Engadir á lista de reproducción", "addedSuccess": "Agregado correctamente", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Rexistros copiados correctamente", "customPlaylistImgUrl": "URL de imaxe personalizada para a lista de reproducción", "customPlaylistName": "Nome personalizado da lista de reproducción", + "deletePlaylist": "Delete playlist", "download": "Descargar", "downloadAppUpdate": "Descargar actualización da aplicación", "dynamicColor": "Cor de destaque dinámica (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Historial de reproducción recente borrado", "recommendedForYou": "Recomendado para ti", "remove": "Eliminar", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_id.arb b/lib/localization/app_id.arb index f87f3947..707d567f 100644 --- a/lib/localization/app_id.arb +++ b/lib/localization/app_id.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Warna aksen berhasil diubah", "accentColor": "Warna aksen", "add": "Tambah", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Tambah ke playlist", "addedSuccess": "Berhasil ditambahkan", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Log berhasil disalin", "customPlaylistImgUrl": "URL gambar playlist kustom", "customPlaylistName": "Nama playlist kustom", + "deletePlaylist": "Delete playlist", "download": "Unduh", "downloadAppUpdate": "Unduh pembaruan aplikasi", "dynamicColor": "Warna dinamis (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Riwayat terputar berhasil dihapus", "recommendedForYou": "Direkomendasikan untuk Anda", "remove": "Hapus", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_it.arb b/lib/localization/app_it.arb index 56df59c2..2d1258fa 100644 --- a/lib/localization/app_it.arb +++ b/lib/localization/app_it.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Colore principale cambiato con successo", "accentColor": "Colore principale", "add": "Aggiungi", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Aggiungi alla playlist", "addedSuccess": "Aggiunto con successo", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Log copiati con successo", "customPlaylistImgUrl": "Link immagine playlist personalizzata", "customPlaylistName": "Nome playlist personalizzata", + "deletePlaylist": "Delete playlist", "download": "Scarica", "downloadAppUpdate": "Scarica aggiornamento app", "dynamicColor": "Colore dinamico (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Cronologia recenti cancellata", "recommendedForYou": "Raccomandato per te", "remove": "Rimuovi", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_ja.arb b/lib/localization/app_ja.arb index 4c46f7d9..0ac7ff77 100644 --- a/lib/localization/app_ja.arb +++ b/lib/localization/app_ja.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "差し色を変更しました", "accentColor": "差し色", "add": "追加", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "再生リストに追加", "addedSuccess": "追加しました", @@ -34,6 +35,7 @@ "copyLogsSuccess": "ログをコピーしました", "customPlaylistImgUrl": "リスト用の画像のリンク", "customPlaylistName": "リスト名の指定", + "deletePlaylist": "Delete playlist", "download": "Download", "downloadAppUpdate": "アプリの最新版をダウンロード", "dynamicColor": "差し色を動的に変更 (Android 12以上)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "再生履歴を消去しました", "recommendedForYou": "あなたにおすすめ", "remove": "削除", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_ka.arb b/lib/localization/app_ka.arb index 4330cd4c..23fc0a1e 100644 --- a/lib/localization/app_ka.arb +++ b/lib/localization/app_ka.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "აქცენტის ფერი შეიცვალა", "accentColor": "აქცენტის ფერი", "add": "დამატება", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "მოწონებულ სიმღერებში დამატება", "addToPlaylist": "ჩასართავ სიაში დამატება", "addedSuccess": "წარმატებით დაემატა", @@ -34,6 +35,7 @@ "copyLogsSuccess": "ლოგები დაკოპირდა წარმატებით. ", "customPlaylistImgUrl": "საკუთარი ჩასართავი სიის სურათის ბმული", "customPlaylistName": "საკუთარი ჩასართავი სიის სახელი", + "deletePlaylist": "Delete playlist", "download": "ჩამოტვირთვა", "downloadAppUpdate": "აპლიკაციის განახლების ჩამოტვირთვა", "dynamicColor": "დინამიური აქცენტის ფერი (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "ბოლოს მოსმენილი სიმღერების ისტორია გასუფთავდა", "recommendedForYou": "შემოთავაზებები შენთვის", "remove": "წაშლა", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "მოწონებული სიმღერებიდან ამოშლა", "removeFromPlaylist": "ჩასართავი სიიდან ამოშლა", "removeOffline": "უინტერნეტო წვდომის მოცილება", diff --git a/lib/localization/app_ko.arb b/lib/localization/app_ko.arb index f30ac75e..a61679d7 100644 --- a/lib/localization/app_ko.arb +++ b/lib/localization/app_ko.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "강조색이 성공적으로 변경되었음", "accentColor": "강조색", "add": "추가", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "좋아요 노래에 추가", "addToPlaylist": "재생목록에 추가", "addedSuccess": "성공적으로 추가됨", @@ -34,6 +35,7 @@ "copyLogsSuccess": "로그가 성공적으로 복사되었음", "customPlaylistImgUrl": "커스텀 재생목록 이미지 링크", "customPlaylistName": "커스텀 재생목록 이름", + "deletePlaylist": "Delete playlist", "download": "다운로드", "downloadAppUpdate": "앱 업데이트 다운로드", "dynamicColor": "동적 강조색 (안드로이드 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "최근 재생 기록 삭제됨", "recommendedForYou": "추천 항목", "remove": "제거", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "좋아요 노래에서 삭제", "removeFromPlaylist": "재생목록에서 삭제", "removeOffline": "오프라인에서 삭제", @@ -97,4 +100,4 @@ "useSquigglySlider": "굴곡 슬라이더", "userPlaylists": "사용자 재생목록", "youtubePlaylistLinkOrId": "유튜브 재생목록 링크 또는 ID " -} +} \ No newline at end of file diff --git a/lib/localization/app_pl.arb b/lib/localization/app_pl.arb index 7c1fa242..a341dbc0 100644 --- a/lib/localization/app_pl.arb +++ b/lib/localization/app_pl.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Zmieniono kolor akcentu", "accentColor": "Kolor akcentu", "add": "Dodaj", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Dodaj do playlisty", "addedSuccess": "Pomyślnie dodano", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Pomyślnie skopiowano logi.", "customPlaylistImgUrl": "Własny link do okładki playlisty", "customPlaylistName": "Własna nazwa playlisty", + "deletePlaylist": "Delete playlist", "download": "Pobierz", "downloadAppUpdate": "Pobierz aktualizację aplikacji", "dynamicColor": "Dynamiczny kolor akcentu (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Wyczyszczono historię ostatnio odtworzonych utworów", "recommendedForYou": "Polecane dla Ciebie", "remove": "Usuń", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_pt.arb b/lib/localization/app_pt.arb index 5ea776bb..c2459926 100644 --- a/lib/localization/app_pt.arb +++ b/lib/localization/app_pt.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "A cor de destaque foi alterada", "accentColor": "Cor de destaque", "add": "Adicionar", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Adicionar à playlist", "addedSuccess": "Adicionado com sucesso", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Logs copiados com sucesso", "customPlaylistImgUrl": "Link de imagem personalizada da playlist", "customPlaylistName": "Nome personalizado da playlist", + "deletePlaylist": "Delete playlist", "download": "Baixar", "downloadAppUpdate": "Baixar atualização do aplicativo", "dynamicColor": "Cor de destaque dinâmica (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Histórico de reprodução recente apagado", "recommendedForYou": "Recomendado para você", "remove": "Remover", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_ru.arb b/lib/localization/app_ru.arb index ecde50ea..57c8a9b1 100644 --- a/lib/localization/app_ru.arb +++ b/lib/localization/app_ru.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Цветовой акцент изменён", "accentColor": "Цветовой акцент", "add": "Добавить", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Добавить в плейлист", "addedSuccess": "Успешно добавлено", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Логи успешно скопированы. ", "customPlaylistImgUrl": "Обложка плейлиста (ссылка на изображение)", "customPlaylistName": "Название плейлиста", + "deletePlaylist": "Delete playlist", "download": "Загрузить", "downloadAppUpdate": "Скачать обновление", "dynamicColor": "Динамический цветовой акцент (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Недавние треки очищены", "recommendedForYou": "Рекомендовано вам", "remove": "Удалить", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_tr.arb b/lib/localization/app_tr.arb index ec979ad3..350a25ff 100644 --- a/lib/localization/app_tr.arb +++ b/lib/localization/app_tr.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Vurgu rengi değiştirildi", "accentColor": "Vurgu rengi", "add": "Ekle", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Çalma listesine ekle", "addedSuccess": "Başarıyla eklendi", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Loglar başarıyla kopyalandı.", "customPlaylistImgUrl": "Özel çalma listesi resim bağlantısı", "customPlaylistName": "Özel çalma listesi adı", + "deletePlaylist": "Delete playlist", "download": "İndir", "downloadAppUpdate": "Uygulama Güncellemesini İndir", "dynamicColor": "Dinamik vurgu rengi (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Son oynatılanlar temizlendi", "recommendedForYou": "Sizin İçin Tavsiye Edilen", "remove": "Kaldır", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/localization/app_uk.arb b/lib/localization/app_uk.arb index e9f2458e..2dd3c12f 100644 --- a/lib/localization/app_uk.arb +++ b/lib/localization/app_uk.arb @@ -3,6 +3,7 @@ "accentChangeMsg": "Колір акценту змінено", "accentColor": "Колір акценту", "add": "Додати", + "addToLikedPlaylists": "Add to liked playlists", "addToLikedSongs": "Add to liked songs", "addToPlaylist": "Додати до списку відтворення", "addedSuccess": "Успішно додано", @@ -34,6 +35,7 @@ "copyLogsSuccess": "Журнали успішно скопійовано", "customPlaylistImgUrl": "Посилання на зображення власного плейлиста", "customPlaylistName": "Назва власного плейлиста", + "deletePlaylist": "Delete playlist", "download": "Завантажити", "downloadAppUpdate": "Завантажити оновлення програми", "dynamicColor": "Динамічний акцентний колір (Android 12+)", @@ -70,6 +72,7 @@ "recentlyPlayedMsg": "Recently played history cleared", "recommendedForYou": "Рекомендовано вам", "remove": "Видалити", + "removeFromLikedPlaylists": "Remove from liked playlists", "removeFromLikedSongs": "Remove from liked songs", "removeFromPlaylist": "Remove from playlist", "removeOffline": "Remove from offline", diff --git a/lib/screens/library_page.dart b/lib/screens/library_page.dart index 289fe462..9c496749 100644 --- a/lib/screens/library_page.dart +++ b/lib/screens/library_page.dart @@ -104,12 +104,14 @@ class _LibraryPageState extends State { NavigationManager.router.go('/library/userSongs/recents'), cubeIcon: FluentIcons.history_24_filled, borderRadius: commonCustomBarRadiusFirst, + showBuildActions: false, ), PlaylistBar( context.l10n!.likedSongs, onPressed: () => NavigationManager.router.go('/library/userSongs/liked'), cubeIcon: FluentIcons.music_note_2_24_regular, + showBuildActions: false, ), PlaylistBar( context.l10n!.offlineSongs, @@ -119,6 +121,7 @@ class _LibraryPageState extends State { borderRadius: isUserPlaylistsEmpty ? commonCustomBarRadiusLast : BorderRadius.zero, + showBuildActions: false, ), ], ), @@ -195,7 +198,7 @@ class _LibraryPageState extends State { playlistArtwork: playlist['image'], isAlbum: playlist['isAlbum'], playlistData: playlist['source'] == 'user-created' ? playlist : null, - onLongPress: playlist['source'] == 'user-created' || + onDelete: playlist['source'] == 'user-created' || playlist['source'] == 'user-youtube' ? () => _showRemovePlaylistDialog(playlist) : null, diff --git a/lib/widgets/playlist_bar.dart b/lib/widgets/playlist_bar.dart index 881ad0f8..53429568 100644 --- a/lib/widgets/playlist_bar.dart +++ b/lib/widgets/playlist_bar.dart @@ -2,8 +2,8 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:fluentui_system_icons/fluentui_system_icons.dart'; import 'package:flutter/material.dart'; import 'package:musify/API/musify.dart'; +import 'package:musify/extensions/l10n.dart'; import 'package:musify/screens/playlist_page.dart'; -import 'package:musify/services/settings_manager.dart'; import 'package:musify/utilities/common_variables.dart'; import 'package:musify/widgets/no_artwork_cube.dart'; @@ -15,8 +15,9 @@ class PlaylistBar extends StatelessWidget { this.playlistArtwork, this.playlistData, this.onPressed, - this.onLongPress, + this.onDelete, this.cubeIcon = FluentIcons.music_note_1_24_regular, + this.showBuildActions = true, this.isAlbum = false, this.borderRadius = BorderRadius.zero, }) : playlistLikeStatus = ValueNotifier( @@ -28,9 +29,10 @@ class PlaylistBar extends StatelessWidget { final String playlistTitle; final String? playlistArtwork; final VoidCallback? onPressed; - final VoidCallback? onLongPress; + final VoidCallback? onDelete; final IconData cubeIcon; final bool? isAlbum; + final bool showBuildActions; final BorderRadius borderRadius; static const double paddingValue = 4; @@ -64,7 +66,6 @@ class PlaylistBar extends StatelessWidget { ), ); }, - onLongPress: onLongPress, child: Card( shape: RoundedRectangleBorder( borderRadius: borderRadius, @@ -89,7 +90,8 @@ class PlaylistBar extends StatelessWidget { ], ), ), - _buildActionButtons(context, primaryColor), + if (showBuildActions) + _buildActionButtons(context, primaryColor), ], ), ), @@ -130,32 +132,63 @@ class PlaylistBar extends StatelessWidget { } Widget _buildActionButtons(BuildContext context, Color primaryColor) { - return Row( - mainAxisSize: MainAxisSize.min, - children: [ - if (!offlineMode.value) - Row( - children: [ - ValueListenableBuilder( - valueListenable: playlistLikeStatus, - builder: (_, value, __) { - return IconButton( + return PopupMenuButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + color: Theme.of(context).colorScheme.surface, + icon: Icon( + FluentIcons.more_horizontal_24_filled, + color: primaryColor, + ), + onSelected: (String value) { + switch (value) { + case 'like': + if (playlistId != null) { + final newValue = !playlistLikeStatus.value; + playlistLikeStatus.value = newValue; + updatePlaylistLikeStatus(playlistId!, newValue); + currentLikedPlaylistsLength.value += newValue ? 1 : -1; + } + break; + case 'remove': + if (onDelete != null) onDelete!(); + break; + } + }, + itemBuilder: (BuildContext context) { + return [ + if (onDelete == null) + PopupMenuItem( + value: 'like', + child: Row( + children: [ + Icon( + likeStatusToIconMapper[playlistLikeStatus.value], color: primaryColor, - icon: Icon(likeStatusToIconMapper[value]), - onPressed: () { - if (playlistId != null) { - final newValue = !playlistLikeStatus.value; - playlistLikeStatus.value = newValue; - updatePlaylistLikeStatus(playlistId!, newValue); - currentLikedPlaylistsLength.value += newValue ? 1 : -1; - } - }, - ); - }, + ), + const SizedBox(width: 8), + Text( + playlistLikeStatus.value + ? context.l10n!.removeFromLikedPlaylists + : context.l10n!.addToLikedPlaylists, + ), + ], ), - ], - ), - ], + ), + if (onDelete != null) + PopupMenuItem( + value: 'remove', + child: Row( + children: [ + Icon(FluentIcons.delete_24_filled, color: primaryColor), + const SizedBox(width: 8), + Text(context.l10n!.deletePlaylist), + ], + ), + ), + ]; + }, ); } }