[web] Lint source code

This commit is contained in:
Alain Nussbaumer 2024-02-29 13:16:09 +01:00
parent b352e964d0
commit b845453274

View File

@ -116,21 +116,20 @@ export default {
name: 'PageQueue', name: 'PageQueue',
components: { components: {
ContentWithHeading, ContentWithHeading,
draggable,
ListItemQueueItem, ListItemQueueItem,
ModalDialogAddUrlStream, ModalDialogAddUrlStream,
ModalDialogPlaylistSave, ModalDialogPlaylistSave,
ModalDialogQueueItem ModalDialogQueueItem,
draggable
}, },
data() { data() {
return { return {
edit_mode: false, edit_mode: false,
selected_item: {},
show_details_modal: false, show_details_modal: false,
show_url_modal: false,
show_pls_save_modal: false, show_pls_save_modal: false,
selected_item: {} show_url_modal: false
} }
}, },
@ -168,9 +167,8 @@ export default {
methods: { methods: {
move_item(e) { move_item(e) {
const oldPosition = !this.show_only_next_items const oldPosition =
? e.oldIndex e.oldIndex + (this.show_only_next_items && this.current_position)
: e.oldIndex + this.current_position
const item = this.queue_items[oldPosition] const item = this.queue_items[oldPosition]
const newPosition = item.position + (e.newIndex - e.oldIndex) const newPosition = item.position + (e.newIndex - e.oldIndex)
if (newPosition !== oldPosition) { if (newPosition !== oldPosition) {