mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-29 14:47:21 +02:00
Persist bookshelf list view setting, fix collections for new data model, add authors cards, update filters
This commit is contained in:
+5
-1
@@ -1,6 +1,7 @@
|
||||
export const state = () => ({
|
||||
itemDownloads: [],
|
||||
bookshelfListView: false
|
||||
bookshelfListView: false,
|
||||
series: null
|
||||
})
|
||||
|
||||
export const getters = {
|
||||
@@ -45,5 +46,8 @@ export const mutations = {
|
||||
},
|
||||
setBookshelfListView(state, val) {
|
||||
state.bookshelfListView = val
|
||||
},
|
||||
setSeries(state, val) {
|
||||
state.series = val
|
||||
}
|
||||
}
|
||||
+8
-5
@@ -22,9 +22,12 @@ export const getters = {
|
||||
getServerAddress: (state) => {
|
||||
return state.serverConnectionConfig ? state.serverConnectionConfig.address : null
|
||||
},
|
||||
getUserLibraryItemProgress: (state) => (libraryItemId) => {
|
||||
if (!state.user || !state.user.libraryItemProgress) return null
|
||||
return state.user.libraryItemProgress.find(li => li.id == libraryItemId)
|
||||
getUserMediaProgress: (state) => (libraryItemId, episodeId = null) => {
|
||||
if (!state.user || !state.user.mediaProgress) return null
|
||||
return state.user.mediaProgress.find(li => {
|
||||
if (episodeId && li.episodeId !== episodeId) return false
|
||||
return li.id == libraryItemId
|
||||
})
|
||||
},
|
||||
getUserBookmarksForItem: (state) => (libraryItemId) => {
|
||||
if (!state.user.bookmarks) return []
|
||||
@@ -36,8 +39,8 @@ export const getters = {
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
async updateUserSettings({ commit }, payload) {
|
||||
if (this.$server.connected) {
|
||||
async updateUserSettings({ state, commit }, payload) {
|
||||
if (state.serverConnectionConfig) {
|
||||
var updatePayload = {
|
||||
...payload
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user