mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-24 04:35:59 +02:00
Persist bookshelf list view setting, fix collections for new data model, add authors cards, update filters
This commit is contained in:
parent
f309e1fcf2
commit
9ad351f0d7
18 changed files with 296 additions and 67 deletions
|
@ -59,6 +59,25 @@ class LocalStorage {
|
|||
return false
|
||||
}
|
||||
}
|
||||
|
||||
async setBookshelfListView(useIt) {
|
||||
try {
|
||||
await Storage.set({ key: 'bookshelfListView', value: useIt ? '1' : '0' })
|
||||
this.getBookshelfListView()
|
||||
} catch (error) {
|
||||
console.error('[LocalStorage] Failed to set bookshelf list view', error)
|
||||
}
|
||||
}
|
||||
|
||||
async getBookshelfListView() {
|
||||
try {
|
||||
var obj = await Storage.get({ key: 'bookshelfListView' }) || {}
|
||||
return obj.value === '1'
|
||||
} catch (error) {
|
||||
console.error('[LocalStorage] Failed to get bookshelf list view', error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue