From 439867b95b9f689d2eed63d355976298e534db8e Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Sun, 24 Mar 2024 11:01:06 +0100 Subject: [PATCH] [web] Lint source code --- web-src/src/components/ListDirectories.vue | 26 +++++++++--------- web-src/src/components/ListItemQueueItem.vue | 7 +++-- .../components/ModalDialogPlaylistSpotify.vue | 27 +++++++++---------- web-src/src/pages/PageArtistSpotify.vue | 5 ++-- 4 files changed, 29 insertions(+), 36 deletions(-) diff --git a/web-src/src/components/ListDirectories.vue b/web-src/src/components/ListDirectories.vue index c1d2a30d..b038a442 100644 --- a/web-src/src/components/ListDirectories.vue +++ b/web-src/src/components/ListDirectories.vue @@ -52,8 +52,8 @@ export default { data() { return { - show_details_modal: false, - selected_directory: '' + selected_directory: '', + show_details_modal: false } }, @@ -67,6 +67,16 @@ export default { }, methods: { + open_dialog(directory) { + this.selected_directory = directory.path + this.show_details_modal = true + }, + open_directory(directory) { + this.$router.push({ + name: 'files', + query: { directory: directory.path } + }) + }, open_parent_directory() { const parent = this.current_directory.slice( 0, @@ -88,18 +98,6 @@ export default { } }) } - }, - - open_directory(directory) { - this.$router.push({ - name: 'files', - query: { directory: directory.path } - }) - }, - - open_dialog(directory) { - this.selected_directory = directory.path - this.show_details_modal = true } } } diff --git a/web-src/src/components/ListItemQueueItem.vue b/web-src/src/components/ListItemQueueItem.vue index 58464ac9..49c86827 100644 --- a/web-src/src/components/ListItemQueueItem.vue +++ b/web-src/src/components/ListItemQueueItem.vue @@ -58,12 +58,11 @@ export default { }, computed: { - state() { - return this.$store.state.player - }, - is_next() { return this.current_position < 0 || this.position >= this.current_position + }, + state() { + return this.$store.state.player } }, diff --git a/web-src/src/components/ModalDialogPlaylistSpotify.vue b/web-src/src/components/ModalDialogPlaylistSpotify.vue index 405f6e36..9e7b2b03 100644 --- a/web-src/src/components/ModalDialogPlaylistSpotify.vue +++ b/web-src/src/components/ModalDialogPlaylistSpotify.vue @@ -79,27 +79,24 @@ export default { emits: ['close'], methods: { - play() { - this.$emit('close') - webapi.player_play_uri(this.playlist.uri, false) - }, - - queue_add() { - this.$emit('close') - webapi.queue_add(this.playlist.uri) - }, - - queue_add_next() { - this.$emit('close') - webapi.queue_add_next(this.playlist.uri) - }, - open_playlist() { this.$emit('close') this.$router.push({ name: 'playlist-spotify', params: { id: this.playlist.id } }) + }, + play() { + this.$emit('close') + webapi.player_play_uri(this.playlist.uri, false) + }, + queue_add() { + this.$emit('close') + webapi.queue_add(this.playlist.uri) + }, + queue_add_next() { + this.$emit('close') + webapi.queue_add_next(this.playlist.uri) } } } diff --git a/web-src/src/pages/PageArtistSpotify.vue b/web-src/src/pages/PageArtistSpotify.vue index c8435d8f..222c7eb2 100644 --- a/web-src/src/pages/PageArtistSpotify.vue +++ b/web-src/src/pages/PageArtistSpotify.vue @@ -141,7 +141,6 @@ export default { offset: 0, selected_album: {}, show_album_details_modal: false, - show_details_modal: false, total: 0 } @@ -173,9 +172,9 @@ export default { spotifyApi.setAccessToken(this.$store.state.spotify.webapi_token) spotifyApi .getArtistAlbums(this.artist.id, { + include_groups: 'album,single', limit: PAGE_SIZE, - offset: this.offset, - include_groups: 'album,single' + offset: this.offset }) .then((data) => { this.append_albums(data)