diff --git a/web-src/src/components/LyricsPane.vue b/web-src/src/components/LyricsPane.vue index 8e42a351..4b8dc756 100644 --- a/web-src/src/components/LyricsPane.vue +++ b/web-src/src/components/LyricsPane.vue @@ -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) - } + clearTimeout(this.scrollingTimer) // Reenable automatic scrolling after 2 seconds this.scrollingTimer = setTimeout((this.autoScrolling = true), 2000) } diff --git a/web-src/src/lib/Audio.js b/web-src/src/lib/Audio.js index 14bf68df..96e4819d 100644 --- a/web-src/src/lib/Audio.js +++ b/web-src/src/lib/Audio.js @@ -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 } } diff --git a/web-src/src/pages/PageQueue.vue b/web-src/src/pages/PageQueue.vue index a9e88cd9..93d02a0e 100644 --- a/web-src/src/pages/PageQueue.vue +++ b/web-src/src/pages/PageQueue.vue @@ -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) } diff --git a/web-src/src/store/index.js b/web-src/src/store/index.js index b45e254c..5d7ed090 100644 --- a/web-src/src/store/index.js +++ b/web-src/src/store/index.js @@ -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 }