From d0cd0c4bc7fd3155f2176c7a03f4258a7ff80c49 Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Thu, 7 Dec 2023 21:31:10 +0100 Subject: [PATCH] [web]S Streamline code of pages --- web-src/src/pages/PageAlbumSpotify.vue | 16 +++++------ web-src/src/pages/PageArtist.vue | 8 +++--- web-src/src/pages/PageArtistSpotify.vue | 27 +++++++++---------- web-src/src/pages/PageArtistTracks.vue | 8 +++--- web-src/src/pages/PageAudiobooksAlbum.vue | 12 ++++----- web-src/src/pages/PageAudiobooksArtist.vue | 9 +++---- web-src/src/pages/PageComposerAlbums.vue | 10 +++---- web-src/src/pages/PageComposerTracks.vue | 10 +++---- web-src/src/pages/PageGenreAlbums.vue | 10 +++---- web-src/src/pages/PageGenreTracks.vue | 8 +++--- .../PageMusicSpotifyFeaturedPlaylists.vue | 10 +++---- .../src/pages/PageMusicSpotifyNewReleases.vue | 8 +++--- web-src/src/pages/PagePlaylistTracks.vue | 10 +++---- 13 files changed, 72 insertions(+), 74 deletions(-) diff --git a/web-src/src/pages/PageAlbumSpotify.vue b/web-src/src/pages/PageAlbumSpotify.vue index 18a5940d..83da5c62 100644 --- a/web-src/src/pages/PageAlbumSpotify.vue +++ b/web-src/src/pages/PageAlbumSpotify.vue @@ -17,7 +17,7 @@ @@ -29,7 +29,7 @@ :artist="album.artist" :album="album.name" class="is-clickable fd-has-shadow fd-cover fd-cover-medium-image" - @click="show_album_details_modal = true" + @click="show_details_modal = true" /> + - @@ -126,7 +126,7 @@ export default { show_track_details_modal: false, selected_track: {}, - show_album_details_modal: false + show_details_modal: false } }, diff --git a/web-src/src/pages/PageArtist.vue b/web-src/src/pages/PageArtist.vue index 4b31df5e..3e38be0e 100644 --- a/web-src/src/pages/PageArtist.vue +++ b/web-src/src/pages/PageArtist.vue @@ -19,7 +19,7 @@
@@ -47,9 +47,9 @@

@@ -119,7 +119,7 @@ export default { }) } ], - show_artist_details_modal: false + show_details_modal: false } }, diff --git a/web-src/src/pages/PageArtistSpotify.vue b/web-src/src/pages/PageArtistSpotify.vue index 26c8025b..a86aa851 100644 --- a/web-src/src/pages/PageArtistSpotify.vue +++ b/web-src/src/pages/PageArtistSpotify.vue @@ -8,7 +8,7 @@
@@ -52,15 +52,15 @@ - - @@ -131,15 +131,14 @@ export default { data() { return { - artist: {}, albums: [], - total: 0, + artist: {}, offset: 0, + selected_album: {}, + show_album_details_modal: false, show_details_modal: false, - selected_album: {}, - - show_artist_details_modal: false + total: 0 } }, @@ -175,7 +174,7 @@ export default { }, play() { - this.show_details_modal = false + this.show_album_details_modal = false webapi.player_play_uri(this.artist.uri, true) }, @@ -188,7 +187,7 @@ export default { open_dialog(album) { this.selected_album = album - this.show_details_modal = true + this.show_album_details_modal = true }, artwork_url(album) { diff --git a/web-src/src/pages/PageArtistTracks.vue b/web-src/src/pages/PageArtistTracks.vue index ebdd2e85..84b1119a 100644 --- a/web-src/src/pages/PageArtistTracks.vue +++ b/web-src/src/pages/PageArtistTracks.vue @@ -20,7 +20,7 @@
@@ -48,9 +48,9 @@

@@ -121,7 +121,7 @@ export default { }) } ], - show_artist_details_modal: false, + show_details_modal: false, tracks_list: new GroupByList() } }, diff --git a/web-src/src/pages/PageAudiobooksAlbum.vue b/web-src/src/pages/PageAudiobooksAlbum.vue index ba618f12..74caa585 100644 --- a/web-src/src/pages/PageAudiobooksAlbum.vue +++ b/web-src/src/pages/PageAudiobooksAlbum.vue @@ -13,7 +13,7 @@ @@ -25,7 +25,7 @@ :artist="album.artist" :album="album.name" class="is-clickable fd-has-shadow fd-cover fd-cover-medium-image" - @click="show_album_details_modal = true" + @click="show_details_modal = true" /> @@ -91,8 +91,8 @@ export default { data() { return { album: {}, - tracks: new GroupByList(), - show_album_details_modal: false + show_details_modal: false, + tracks: new GroupByList() } }, diff --git a/web-src/src/pages/PageAudiobooksArtist.vue b/web-src/src/pages/PageAudiobooksArtist.vue index 0e02ba73..d78d75b5 100644 --- a/web-src/src/pages/PageAudiobooksArtist.vue +++ b/web-src/src/pages/PageAudiobooksArtist.vue @@ -8,7 +8,7 @@
@@ -29,9 +29,9 @@ /> @@ -85,8 +85,7 @@ export default { return { artist: {}, albums: new GroupByList(), - - show_artist_details_modal: false + show_details_modal: false } }, diff --git a/web-src/src/pages/PageComposerAlbums.vue b/web-src/src/pages/PageComposerAlbums.vue index 8cc39d16..32b30509 100644 --- a/web-src/src/pages/PageComposerAlbums.vue +++ b/web-src/src/pages/PageComposerAlbums.vue @@ -8,7 +8,7 @@
@@ -36,9 +36,9 @@

@@ -89,9 +89,9 @@ export default { data() { return { - composer: {}, albums_list: new GroupByList(), - show_composer_details_modal: false + composer: {}, + show_details_modal: false } }, diff --git a/web-src/src/pages/PageComposerTracks.vue b/web-src/src/pages/PageComposerTracks.vue index 85a768e5..0127f641 100644 --- a/web-src/src/pages/PageComposerTracks.vue +++ b/web-src/src/pages/PageComposerTracks.vue @@ -20,7 +20,7 @@
@@ -50,9 +50,9 @@

@@ -108,6 +108,7 @@ export default { data() { return { + composer: {}, groupby_options: [ { id: 1, @@ -122,8 +123,7 @@ export default { }) } ], - composer: {}, - show_composer_details_modal: false, + show_details_modal: false, tracks_list: new GroupByList() } }, diff --git a/web-src/src/pages/PageGenreAlbums.vue b/web-src/src/pages/PageGenreAlbums.vue index 7da43213..405f96b8 100644 --- a/web-src/src/pages/PageGenreAlbums.vue +++ b/web-src/src/pages/PageGenreAlbums.vue @@ -11,7 +11,7 @@
@@ -37,8 +37,8 @@ @@ -94,10 +94,10 @@ export default { }, data() { return { - genre: {}, albums_list: new GroupByList(), + genre: {}, media_kind: this.$route.query.media_kind, - show_genre_details_modal: false + show_details_modal: false } }, methods: { diff --git a/web-src/src/pages/PageGenreTracks.vue b/web-src/src/pages/PageGenreTracks.vue index c0ca69f8..7339d552 100644 --- a/web-src/src/pages/PageGenreTracks.vue +++ b/web-src/src/pages/PageGenreTracks.vue @@ -20,7 +20,7 @@
@@ -44,10 +44,10 @@

@@ -123,7 +123,7 @@ export default { } ], media_kind: this.$route.query.media_kind, - show_genre_details_modal: false, + show_details_modal: false, tracks_list: new GroupByList() } }, diff --git a/web-src/src/pages/PageMusicSpotifyFeaturedPlaylists.vue b/web-src/src/pages/PageMusicSpotifyFeaturedPlaylists.vue index 8015050e..13f0f193 100644 --- a/web-src/src/pages/PageMusicSpotifyFeaturedPlaylists.vue +++ b/web-src/src/pages/PageMusicSpotifyFeaturedPlaylists.vue @@ -25,9 +25,9 @@ @@ -88,8 +88,8 @@ export default { data() { return { - show_playlist_details_modal: false, - selected_playlist: {} + selected_playlist: {}, + show_details_modal: false } }, @@ -102,7 +102,7 @@ export default { methods: { open_playlist_dialog(playlist) { this.selected_playlist = playlist - this.show_playlist_details_modal = true + this.show_details_modal = true } } } diff --git a/web-src/src/pages/PageMusicSpotifyNewReleases.vue b/web-src/src/pages/PageMusicSpotifyNewReleases.vue index 897bebbe..4732ce72 100644 --- a/web-src/src/pages/PageMusicSpotifyNewReleases.vue +++ b/web-src/src/pages/PageMusicSpotifyNewReleases.vue @@ -33,9 +33,9 @@ @@ -98,7 +98,7 @@ export default { data() { return { - show_album_details_modal: false, + show_details_modal: false, selected_album: {} } }, @@ -126,7 +126,7 @@ export default { open_album_dialog(album) { this.selected_album = album - this.show_album_details_modal = true + this.show_details_modal = true }, artwork_url(album) { diff --git a/web-src/src/pages/PagePlaylistTracks.vue b/web-src/src/pages/PagePlaylistTracks.vue index 9dd41346..4f4702cc 100644 --- a/web-src/src/pages/PagePlaylistTracks.vue +++ b/web-src/src/pages/PagePlaylistTracks.vue @@ -8,7 +8,7 @@
@@ -25,10 +25,10 @@ /> @@ -76,8 +76,8 @@ export default { data() { return { playlist: {}, - tracks: new GroupByList(), - show_playlist_details_modal: false + show_details_modal: false, + tracks: new GroupByList() } },