[web] Lint source code

This commit is contained in:
Alain Nussbaumer 2024-03-24 11:01:06 +01:00
parent 979f0c2a33
commit 439867b95b
4 changed files with 29 additions and 36 deletions

View File

@ -52,8 +52,8 @@ export default {
data() { data() {
return { return {
show_details_modal: false, selected_directory: '',
selected_directory: '' show_details_modal: false
} }
}, },
@ -67,6 +67,16 @@ export default {
}, },
methods: { 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() { open_parent_directory() {
const parent = this.current_directory.slice( const parent = this.current_directory.slice(
0, 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
} }
} }
} }

View File

@ -58,12 +58,11 @@ export default {
}, },
computed: { computed: {
state() {
return this.$store.state.player
},
is_next() { is_next() {
return this.current_position < 0 || this.position >= this.current_position return this.current_position < 0 || this.position >= this.current_position
},
state() {
return this.$store.state.player
} }
}, },

View File

@ -79,27 +79,24 @@ export default {
emits: ['close'], emits: ['close'],
methods: { 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() { open_playlist() {
this.$emit('close') this.$emit('close')
this.$router.push({ this.$router.push({
name: 'playlist-spotify', name: 'playlist-spotify',
params: { id: this.playlist.id } 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)
} }
} }
} }

View File

@ -141,7 +141,6 @@ export default {
offset: 0, offset: 0,
selected_album: {}, selected_album: {},
show_album_details_modal: false, show_album_details_modal: false,
show_details_modal: false, show_details_modal: false,
total: 0 total: 0
} }
@ -173,9 +172,9 @@ export default {
spotifyApi.setAccessToken(this.$store.state.spotify.webapi_token) spotifyApi.setAccessToken(this.$store.state.spotify.webapi_token)
spotifyApi spotifyApi
.getArtistAlbums(this.artist.id, { .getArtistAlbums(this.artist.id, {
include_groups: 'album,single',
limit: PAGE_SIZE, limit: PAGE_SIZE,
offset: this.offset, offset: this.offset
include_groups: 'album,single'
}) })
.then((data) => { .then((data) => {
this.append_albums(data) this.append_albums(data)