mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 10:14:36 +02:00
Moving settings to be user specific, adding playbackRate setting, update playbackRate picker to go up to 3x
This commit is contained in:
parent
40502aab1e
commit
7ef977b783
22 changed files with 247 additions and 103 deletions
|
@ -1,6 +1,5 @@
|
|||
|
||||
export const state = () => ({
|
||||
user: null,
|
||||
streamAudiobook: null,
|
||||
showEditModal: false,
|
||||
selectedAudiobook: null,
|
||||
|
@ -10,26 +9,11 @@ export const state = () => ({
|
|||
developerMode: false
|
||||
})
|
||||
|
||||
export const getters = {
|
||||
getToken: (state) => {
|
||||
return state.user ? state.user.token : null
|
||||
},
|
||||
getUserAudiobook: (state) => (audiobookId) => {
|
||||
return state.user && state.user.audiobooks ? state.user.audiobooks[audiobookId] || null : null
|
||||
}
|
||||
}
|
||||
export const getters = {}
|
||||
|
||||
export const actions = {
|
||||
|
||||
}
|
||||
export const actions = {}
|
||||
|
||||
export const mutations = {
|
||||
setUser(state, user) {
|
||||
state.user = user
|
||||
if (user.token) {
|
||||
localStorage.setItem('token', user.token)
|
||||
}
|
||||
},
|
||||
setStreamAudiobook(state, audiobook) {
|
||||
state.playOnLoad = true
|
||||
state.streamAudiobook = audiobook
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue