mirror of
https://github.com/owntone/owntone-server.git
synced 2025-10-30 00:05:05 -04:00
[web] Fix display of player page when an item is added to an empty queue
This commit is contained in:
parent
4531eaa75f
commit
0c7e94b903
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
|||||||
<div
|
<div
|
||||||
class="is-flex is-align-items-center has-text-centered px-5 is-full-height"
|
class="is-flex is-align-items-center has-text-centered px-5 is-full-height"
|
||||||
>
|
>
|
||||||
<div v-if="track.id" class="mx-auto" style="max-width: 32rem">
|
<div v-if="!queueStore.isEmpty" class="mx-auto" style="max-width: 32rem">
|
||||||
<div class="is-relative">
|
<div class="is-relative">
|
||||||
<control-image
|
<control-image
|
||||||
:url="track.artwork_url"
|
:url="track.artwork_url"
|
||||||
|
|||||||
@ -11,8 +11,9 @@ export const useQueueStore = defineStore('QueueStore', {
|
|||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
current(state) {
|
current(state) {
|
||||||
const player = usePlayerStore()
|
const playerStore = usePlayerStore()
|
||||||
return state.items.find((item) => item.id === player.item_id) ?? {}
|
playerStore.initialise()
|
||||||
|
return state.items.find((item) => item.id === playerStore.item_id) ?? {}
|
||||||
},
|
},
|
||||||
isEmpty(state) {
|
isEmpty(state) {
|
||||||
return state.count === 0
|
return state.count === 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user