mirror of
https://github.com/owntone/owntone-server.git
synced 2025-07-12 02:21:08 -04:00
[web] Fix badly converted buttons
This commit is contained in:
parent
0d981d0ae1
commit
aa9ca1b4ae
@ -6,13 +6,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #heading-right>
|
<template #heading-right>
|
||||||
<control-button
|
<control-button
|
||||||
:class="{ 'is-loading': libraryStore.updating }"
|
|
||||||
:button="{
|
:button="{
|
||||||
disabled: libraryStore.updating,
|
|
||||||
handler: showUpdateDialog,
|
handler: showUpdateDialog,
|
||||||
icon: 'refresh',
|
icon: 'refresh',
|
||||||
key: 'page.about.update'
|
key: 'page.about.update'
|
||||||
}"
|
}"
|
||||||
|
:class="{ 'is-loading': libraryStore.updating }"
|
||||||
|
:disabled="libraryStore.updating"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
:button="{
|
:button="{
|
||||||
handler: play,
|
handler: play,
|
||||||
icon: 'shuffle',
|
icon: 'shuffle',
|
||||||
key: 'page.playlist.shuffle',
|
key: 'page.playlist.shuffle'
|
||||||
disabled: tracks.count === 0
|
|
||||||
}"
|
}"
|
||||||
|
:disabled="tracks.count === 0"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
:button="{
|
:button="{
|
||||||
handler: play,
|
handler: play,
|
||||||
icon: 'shuffle',
|
icon: 'shuffle',
|
||||||
key: 'page.spotify.playlist.shuffle',
|
key: 'page.spotify.playlist.shuffle'
|
||||||
disabled: playlist.tracks.total === 0
|
|
||||||
}"
|
}"
|
||||||
|
:disabled="playlist.tracks.total === 0"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
:button="{
|
:button="{
|
||||||
handler: update_show_next_items,
|
handler: update_show_next_items,
|
||||||
icon: 'eye-off-outline',
|
icon: 'eye-off-outline',
|
||||||
key: 'page.queue.hide-previous',
|
key: 'page.queue.hide-previous'
|
||||||
class: { 'is-dark': show_only_next_items }
|
|
||||||
}"
|
}"
|
||||||
|
:class="{ 'is-dark': uiStore.show_only_next_items }"
|
||||||
/>
|
/>
|
||||||
<control-button
|
<control-button
|
||||||
:button="{
|
:button="{
|
||||||
@ -25,26 +25,26 @@
|
|||||||
handler: toggleEdit,
|
handler: toggleEdit,
|
||||||
icon: 'pencil',
|
icon: 'pencil',
|
||||||
key: 'page.queue.edit',
|
key: 'page.queue.edit',
|
||||||
disabled: queue_items.length === 0,
|
disabled: queue_items.length === 0
|
||||||
class: { 'is-dark': edit_mode }
|
|
||||||
}"
|
}"
|
||||||
|
:class="{ 'is-dark': edit_mode }"
|
||||||
/>
|
/>
|
||||||
<control-button
|
<control-button
|
||||||
:button="{
|
:button="{
|
||||||
handler: queue_clear,
|
handler: queue_clear,
|
||||||
icon: 'delete-empty',
|
icon: 'delete-empty',
|
||||||
key: 'page.queue.clear',
|
key: 'page.queue.clear'
|
||||||
disabled: queue_items.length === 0
|
|
||||||
}"
|
}"
|
||||||
|
:disabled="queue_items.length === 0"
|
||||||
/>
|
/>
|
||||||
<control-button
|
<control-button
|
||||||
v-if="is_queue_save_allowed"
|
v-if="is_queue_save_allowed"
|
||||||
:button="{
|
:button="{
|
||||||
handler: save_dialog,
|
handler: save_dialog,
|
||||||
icon: 'download',
|
icon: 'download',
|
||||||
key: 'page.queue.save',
|
key: 'page.queue.save'
|
||||||
disabled: queue_items.length === 0
|
|
||||||
}"
|
}"
|
||||||
|
:disabled="queue_items.length === 0"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
:item="element"
|
:item="element"
|
||||||
:position="index"
|
:position="index"
|
||||||
:current_position="current_position"
|
:current_position="current_position"
|
||||||
:show_only_next_items="show_only_next_items"
|
:show_only_next_items="uiStore.show_only_next_items"
|
||||||
:edit_mode="edit_mode"
|
:edit_mode="edit_mode"
|
||||||
>
|
>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
@ -165,18 +165,15 @@ export default {
|
|||||||
/* Do nothing? Send move request in @end event */
|
/* Do nothing? Send move request in @end event */
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
show_only_next_items() {
|
|
||||||
return this.uiStore.show_only_next_items
|
|
||||||
},
|
|
||||||
player() {
|
player() {
|
||||||
return this.playerStore
|
return this.playerStore
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
move_item(event) {
|
move_item(event) {
|
||||||
const oldPosition =
|
const oldPosition =
|
||||||
event.oldIndex + (this.show_only_next_items && this.current_position)
|
event.oldIndex +
|
||||||
|
(this.uiStore.show_only_next_items && this.current_position)
|
||||||
const item = this.queue_items[oldPosition]
|
const item = this.queue_items[oldPosition]
|
||||||
const newPosition = item.position + (event.newIndex - event.oldIndex)
|
const newPosition = item.position + (event.newIndex - event.oldIndex)
|
||||||
if (newPosition !== oldPosition) {
|
if (newPosition !== oldPosition) {
|
||||||
@ -205,6 +202,8 @@ export default {
|
|||||||
this.edit_mode = !this.edit_mode
|
this.edit_mode = !this.edit_mode
|
||||||
},
|
},
|
||||||
update_show_next_items() {
|
update_show_next_items() {
|
||||||
|
console.log(this.uiStore.show_only_next_items)
|
||||||
|
|
||||||
this.uiStore.show_only_next_items = !this.uiStore.show_only_next_items
|
this.uiStore.show_only_next_items = !this.uiStore.show_only_next_items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user