mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 07:05:57 -05:00
[web] Lint too short variable names
This commit is contained in:
parent
8fe6cba6ef
commit
d246c42a99
@ -175,13 +175,11 @@ export default {
|
||||
pane.scrollTop
|
||||
})
|
||||
},
|
||||
start_scrolling(e) {
|
||||
start_scrolling(event) {
|
||||
// Consider only user events
|
||||
if (e.screenX || e.screenX !== 0 || e.screenY || e.screenY !== 0) {
|
||||
if (event.screenX ?? event.screenY) {
|
||||
this.autoScrolling = false
|
||||
if (this.scrollingTimer) {
|
||||
clearTimeout(this.scrollingTimer)
|
||||
}
|
||||
// Reenable automatic scrolling after 2 seconds
|
||||
this.scrollingTimer = setTimeout((this.autoScrolling = true), 2000)
|
||||
}
|
||||
|
@ -29,10 +29,10 @@ export default {
|
||||
this.context = new (window.AudioContext || window.webkitAudioContext)()
|
||||
const source = this.context.createMediaElementSource(this.audio)
|
||||
source.connect(this.context.destination)
|
||||
this.audio.addEventListener('canplaythrough', (e) => {
|
||||
this.audio.addEventListener('canplaythrough', (event) => {
|
||||
this.audio.play()
|
||||
})
|
||||
this.audio.addEventListener('canplay', (e) => {
|
||||
this.audio.addEventListener('canplay', (event) => {
|
||||
this.audio.play()
|
||||
})
|
||||
return this.audio
|
||||
@ -42,17 +42,17 @@ export default {
|
||||
stop() {
|
||||
try {
|
||||
this.audio.pause()
|
||||
} catch (e) {
|
||||
} catch (error) {
|
||||
// Continue regardless of error
|
||||
}
|
||||
try {
|
||||
this.audio.stop()
|
||||
} catch (e) {
|
||||
} catch (error) {
|
||||
// Continue regardless of error
|
||||
}
|
||||
try {
|
||||
this.audio.close()
|
||||
} catch (e) {
|
||||
} catch (error) {
|
||||
// Continue regardless of error
|
||||
}
|
||||
}
|
||||
|
@ -163,11 +163,11 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
move_item(e) {
|
||||
move_item(event) {
|
||||
const oldPosition =
|
||||
e.oldIndex + (this.show_only_next_items && this.current_position)
|
||||
event.oldIndex + (this.show_only_next_items && this.current_position)
|
||||
const item = this.queue_items[oldPosition]
|
||||
const newPosition = item.position + (e.newIndex - e.oldIndex)
|
||||
const newPosition = item.position + (event.newIndex - event.oldIndex)
|
||||
if (newPosition !== oldPosition) {
|
||||
webapi.queue_move(item.id, newPosition)
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ export default createStore({
|
||||
|
||||
getters: {
|
||||
now_playing: (state) =>
|
||||
state.queue.items.find((e) => e.id === state.player.item_id) ?? {},
|
||||
state.queue.items.find((item) => item.id === state.player.item_id) ?? {},
|
||||
setting: (state) => (categoryName, optionName) =>
|
||||
state.settings.categories
|
||||
.find((category) => category.name === categoryName)
|
||||
@ -227,10 +227,10 @@ export default createStore({
|
||||
},
|
||||
update_setting({ state }, option) {
|
||||
const settingCategory = state.settings.categories.find(
|
||||
(e) => e.name === option.category
|
||||
(category) => category.name === option.category
|
||||
),
|
||||
settingOption = settingCategory.options.find(
|
||||
(e) => e.name === option.name
|
||||
(setting) => setting.name === option.name
|
||||
)
|
||||
settingOption.value = option.value
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user