mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-31 16:24:45 +02:00
Update:Persist series sort/filter options #1272
This commit is contained in:
parent
49a69193d8
commit
c06d734d5e
5 changed files with 20 additions and 58 deletions
|
@ -8,7 +8,10 @@ export const state = () => ({
|
|||
bookshelfCoverSize: 120,
|
||||
collapseSeries: false,
|
||||
collapseBookSeries: false,
|
||||
useChapterTrack: false
|
||||
useChapterTrack: false,
|
||||
seriesSortBy: 'name',
|
||||
seriesSortDesc: false,
|
||||
seriesFilterBy: 'all'
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -106,7 +109,6 @@ export const actions = {
|
|||
}
|
||||
}
|
||||
if (hasChanges) {
|
||||
localStorage.setItem('userSettings', JSON.stringify(existingSettings))
|
||||
commit('setSettings', existingSettings)
|
||||
this.$eventBus.$emit('user-settings', state.settings)
|
||||
}
|
||||
|
@ -160,6 +162,7 @@ export const mutations = {
|
|||
},
|
||||
setSettings(state, settings) {
|
||||
if (!settings) return
|
||||
localStorage.setItem('userSettings', JSON.stringify(settings))
|
||||
state.settings = settings
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue