From 7682a45e4f9c2c7f6c54f5d9dbcdf46179de5f97 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Tue, 16 Apr 2024 08:57:45 +0200 Subject: [PATCH] refractor code, don't override unsaved playlist --- components/MediaBrowser.vue | 103 +++++++++++ components/PlaylistTable.vue | 241 ++++++++++++++++++++++++++ lang/de-DE.js | 1 + lang/en-US.js | 1 + pages/player.vue | 323 ++--------------------------------- stores/playlist.ts | 38 ++++- 6 files changed, 392 insertions(+), 315 deletions(-) create mode 100644 components/MediaBrowser.vue create mode 100644 components/PlaylistTable.vue diff --git a/components/MediaBrowser.vue b/components/MediaBrowser.vue new file mode 100644 index 00000000..0cb8581c --- /dev/null +++ b/components/MediaBrowser.vue @@ -0,0 +1,103 @@ + + diff --git a/components/PlaylistTable.vue b/components/PlaylistTable.vue new file mode 100644 index 00000000..056ca780 --- /dev/null +++ b/components/PlaylistTable.vue @@ -0,0 +1,241 @@ + + diff --git a/lang/de-DE.js b/lang/de-DE.js index db5f45ff..c902c109 100644 --- a/lang/de-DE.js +++ b/lang/de-DE.js @@ -65,6 +65,7 @@ export default { reset: 'Wiedergabeliste zurücksetzen', save: 'Wiedergabeliste speichern', deletePlaylist: 'Wiedergabeliste löschen', + unsavedProgram: 'Es existiert Programm das nicht gespeichert ist!', }, media: { notExists: 'Speicher existiert nicht!', diff --git a/lang/en-US.js b/lang/en-US.js index 07dec01c..cb5e3dd3 100644 --- a/lang/en-US.js +++ b/lang/en-US.js @@ -65,6 +65,7 @@ export default { reset: 'Reset Playlist', save: 'Save Playlist', deletePlaylist: 'Delete Playlist', + unsavedProgram: 'There is a program that is not saved!', }, media: { notExists: 'Storage not exist!', diff --git a/pages/player.vue b/pages/player.vue index 0f0d793d..1d7a32ba 100644 --- a/pages/player.vue +++ b/pages/player.vue @@ -27,212 +27,14 @@ max-size="80" size="20" > -
- -
-
-
- -
-
- -
-
- -
- - - -
+ -
-
- -
- - - - - - - - - - - - - - - - - -
-
- {{ $t('player.start') }} -
-
-
- {{ $t('player.file') }} -
-
-
- {{ $t('player.play') }} -
-
-
- {{ $t('player.duration') }} -
-
-
- {{ $t('player.edit') }} -
-
-
+
@@ -270,7 +72,7 @@ > -