mirror of
https://github.com/owntone/owntone-server.git
synced 2025-10-29 15:55:02 -04:00
[web] Add helper method in stores
This commit is contained in:
parent
04c119a3fd
commit
78ffba97d8
@ -16,6 +16,7 @@ export const usePlayerStore = defineStore('PlayerStore', {
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
isMuted: (state) => state.volume === 0,
|
||||
isPlaying: (state) => state.state === 'play',
|
||||
isRepeatAll: (state) => state.repeat === 'all',
|
||||
isRepeatOff: (state) => state.repeat === 'off',
|
||||
|
||||
@ -15,7 +15,7 @@ export const useQueueStore = defineStore('QueueStore', {
|
||||
return state.items.find((item) => item.id === player.item_id) ?? {}
|
||||
},
|
||||
isEmpty(state) {
|
||||
return state.items.length === 0
|
||||
return state.count === 0
|
||||
},
|
||||
isPauseAllowed(state) {
|
||||
return state.current && state.current.data_kind !== 'pipe'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user