mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 19:51:37 +00:00
Moving settings to be user specific, adding playbackRate setting, update playbackRate picker to go up to 3x
This commit is contained in:
parent
2548aba840
commit
f83c5dd440
22 changed files with 247 additions and 103 deletions
|
|
@ -1,39 +0,0 @@
|
|||
|
||||
export const state = () => ({
|
||||
settings: {
|
||||
orderBy: 'book.title',
|
||||
orderDesc: false,
|
||||
filterBy: 'all'
|
||||
},
|
||||
|
||||
listeners: []
|
||||
})
|
||||
|
||||
export const getters = {
|
||||
getFilterOrderKey: (state) => {
|
||||
return Object.values(state.settings).join('-')
|
||||
}
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
setSettings(state, settings) {
|
||||
state.settings = {
|
||||
...settings
|
||||
}
|
||||
state.listeners.forEach((listener) => {
|
||||
listener.meth()
|
||||
})
|
||||
},
|
||||
addListener(state, listener) {
|
||||
var index = state.listeners.findIndex(l => l.id === listener.id)
|
||||
if (index >= 0) state.listeners.splice(index, 1, listener)
|
||||
else state.listeners.push(listener)
|
||||
},
|
||||
removeListener(state, listenerId) {
|
||||
state.listeners = state.listeners.filter(l => l.id !== listenerId)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue