From b903eb416f11ec08d77f2b26cdb9395077018e1b Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Wed, 2 Sep 2026 15:21:43 +0200 Subject: [PATCH] chore: refactor vue components --- web/src/components/UserPlaylists.vue | 0 web/src/components/main/PlayerComponent.vue | 49 +++++++++++++++++++ web/src/components/main/PlayerWrapper.vue | 49 +++++++++++++++++++ .../PlaylistsComponent.vue} | 2 +- .../components/main/SmallPlayerComponent.vue | 35 +++++++++++++ .../components/{ => player}/CurrentSong.vue | 0 .../{ => player}/PlayerControls.vue | 0 .../components/{ => player}/ProgressBar.vue | 0 .../components/{ => player}/QueueViewer.vue | 6 +-- web/src/components/{ => popups}/AddSong.vue | 2 +- .../components/{ => popups}/ConfirmView.vue | 0 .../components/{ => popups}/PopupElement.vue | 0 .../components/{ => popups}/SongEditor.vue | 0 web/src/composables/AssociationView.vue | 2 +- web/src/composables/DiskLoader.vue | 2 +- web/src/composables/ImportTypePicker.vue | 2 +- web/src/composables/SearchView.vue | 2 +- web/src/ts/dtype/playlist.d.ts | 2 +- web/src/ts/player/playlists/add.ts | 7 +++ web/src/ts/player/playlists/loader.ts | 4 +- web/src/ts/player/plugins/interface.d.ts | 5 ++ web/src/ts/player/plugins/local/index.ts | 6 ++- web/src/ts/player/plugins/local/loader.ts | 4 ++ web/src/ts/player/plugins/musickit/index.ts | 6 +-- web/src/ts/player/state.ts | 6 +-- web/src/ts/userPlaylists/file.d.ts | 14 ++++++ web/src/ts/userPlaylists/index.ts | 0 web/src/ts/userPlaylists/save.ts | 10 ++++ web/src/ts/userPlaylists/state.ts | 10 ++++ web/src/views/AppView.vue | 36 ++------------ 30 files changed, 209 insertions(+), 52 deletions(-) create mode 100644 web/src/components/UserPlaylists.vue create mode 100644 web/src/components/main/PlayerComponent.vue create mode 100644 web/src/components/main/PlayerWrapper.vue rename web/src/components/{PlaylistPicker.vue => main/PlaylistsComponent.vue} (61%) create mode 100644 web/src/components/main/SmallPlayerComponent.vue rename web/src/components/{ => player}/CurrentSong.vue (100%) rename web/src/components/{ => player}/PlayerControls.vue (100%) rename web/src/components/{ => player}/ProgressBar.vue (100%) rename web/src/components/{ => player}/QueueViewer.vue (96%) rename web/src/components/{ => popups}/AddSong.vue (97%) rename web/src/components/{ => popups}/ConfirmView.vue (100%) rename web/src/components/{ => popups}/PopupElement.vue (100%) rename web/src/components/{ => popups}/SongEditor.vue (100%) create mode 100644 web/src/ts/userPlaylists/file.d.ts create mode 100644 web/src/ts/userPlaylists/index.ts create mode 100644 web/src/ts/userPlaylists/save.ts create mode 100644 web/src/ts/userPlaylists/state.ts diff --git a/web/src/components/UserPlaylists.vue b/web/src/components/UserPlaylists.vue new file mode 100644 index 0000000..e69de29 diff --git a/web/src/components/main/PlayerComponent.vue b/web/src/components/main/PlayerComponent.vue new file mode 100644 index 0000000..2ffc248 --- /dev/null +++ b/web/src/components/main/PlayerComponent.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/web/src/components/main/PlayerWrapper.vue b/web/src/components/main/PlayerWrapper.vue new file mode 100644 index 0000000..5a8fd7e --- /dev/null +++ b/web/src/components/main/PlayerWrapper.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/web/src/components/PlaylistPicker.vue b/web/src/components/main/PlaylistsComponent.vue similarity index 61% rename from web/src/components/PlaylistPicker.vue rename to web/src/components/main/PlaylistsComponent.vue index ee3adef..c51e6da 100644 --- a/web/src/components/PlaylistPicker.vue +++ b/web/src/components/main/PlaylistsComponent.vue @@ -1,5 +1,5 @@ diff --git a/web/src/components/main/SmallPlayerComponent.vue b/web/src/components/main/SmallPlayerComponent.vue new file mode 100644 index 0000000..d7137e4 --- /dev/null +++ b/web/src/components/main/SmallPlayerComponent.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/web/src/components/CurrentSong.vue b/web/src/components/player/CurrentSong.vue similarity index 100% rename from web/src/components/CurrentSong.vue rename to web/src/components/player/CurrentSong.vue diff --git a/web/src/components/PlayerControls.vue b/web/src/components/player/PlayerControls.vue similarity index 100% rename from web/src/components/PlayerControls.vue rename to web/src/components/player/PlayerControls.vue diff --git a/web/src/components/ProgressBar.vue b/web/src/components/player/ProgressBar.vue similarity index 100% rename from web/src/components/ProgressBar.vue rename to web/src/components/player/ProgressBar.vue diff --git a/web/src/components/QueueViewer.vue b/web/src/components/player/QueueViewer.vue similarity index 96% rename from web/src/components/QueueViewer.vue rename to web/src/components/player/QueueViewer.vue index 0354e99..03a4b3f 100644 --- a/web/src/components/QueueViewer.vue +++ b/web/src/components/player/QueueViewer.vue @@ -5,12 +5,12 @@ computed, ref } from 'vue'; - import AddSong from './AddSong.vue'; + import AddSong from '../popups/AddSong.vue'; import type { Song } from '@/ts/dtype/playlist'; - import SongEditor from './SongEditor.vue'; - import SortableList from './SortableList.vue'; + import SongEditor from '../popups/SongEditor.vue'; + import SortableList from '../SortableList.vue'; import { beautifyTime } from '@/ts/util/time'; diff --git a/web/src/components/AddSong.vue b/web/src/components/popups/AddSong.vue similarity index 97% rename from web/src/components/AddSong.vue rename to web/src/components/popups/AddSong.vue index 6759006..d997bc9 100644 --- a/web/src/components/AddSong.vue +++ b/web/src/components/popups/AddSong.vue @@ -1,7 +1,7 @@ @@ -34,16 +19,5 @@ justify-content: center; align-items: center; flex-direction: row; - - .panel { - width: 45%; - margin-left: 2.5%; - margin-right: 2.5%; - height: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - } }