[web-src] Fix linting errors

This commit is contained in:
chme
2021-01-10 07:51:50 +01:00
parent 4f5e736b6b
commit cdc7d7a1da
11 changed files with 34 additions and 34 deletions

View File

@@ -135,7 +135,7 @@ export default {
methods: {
open_parent_directory: function () {
var parent = this.current_directory.slice(0, this.current_directory.lastIndexOf('/'))
const parent = this.current_directory.slice(0, this.current_directory.lastIndexOf('/'))
if (parent === '' || this.$store.state.config.directories.includes(this.current_directory)) {
this.$router.push({ path: '/files' })
} else {

View File

@@ -124,9 +124,9 @@ export default {
},
move_item: function (e) {
var oldPosition = !this.show_only_next_items ? e.oldIndex : e.oldIndex + this.current_position
var item = this.queue_items[oldPosition]
var newPosition = item.position + (e.newIndex - e.oldIndex)
const oldPosition = !this.show_only_next_items ? e.oldIndex : e.oldIndex + this.current_position
const item = this.queue_items[oldPosition]
const newPosition = item.position + (e.newIndex - e.oldIndex)
if (newPosition !== oldPosition) {
webapi.queue_move(item.id, newPosition)
}

View File

@@ -262,7 +262,7 @@ export default {
return
}
var searchParams = {
const searchParams = {
type: query.type,
media_kind: 'music'
}
@@ -291,7 +291,7 @@ export default {
return
}
var searchParams = {
const searchParams = {
type: 'album',
media_kind: 'audiobook'
}
@@ -317,7 +317,7 @@ export default {
return
}
var searchParams = {
const searchParams = {
type: 'album',
media_kind: 'podcast'
}

View File

@@ -278,10 +278,10 @@ export default {
return webapi.spotify().then(({ data }) => {
this.search_param.market = data.webapi_country
var spotifyApi = new SpotifyWebApi()
const spotifyApi = new SpotifyWebApi()
spotifyApi.setAccessToken(data.webapi_token)
var types = this.query.type.split(',').filter(type => this.validSearchTypes.includes(type))
const types = this.query.type.split(',').filter(type => this.validSearchTypes.includes(type))
return spotifyApi.search(this.query.query, types, this.search_param)
})
},