Lazy bookshelf, api routes for categories and filter data

This commit is contained in:
advplyr 2021-11-30 20:02:40 -06:00
parent 4587916c8e
commit 5c92aef048
26 changed files with 1354 additions and 332 deletions

View file

@ -141,19 +141,24 @@ export default {
return _sel.text
},
genres() {
return this.$store.getters['audiobooks/getGenresUsed']
// return this.$store.getters['audiobooks/getGenresUsed']
return this.filterData.genres || []
},
tags() {
return this.$store.state.audiobooks.tags
// return this.$store.state.audiobooks.tags
return this.filterData.tags || []
},
series() {
return this.$store.state.audiobooks.series
// return this.$store.state.audiobooks.series
return this.filterData.series || []
},
authors() {
return this.$store.getters['audiobooks/getUniqueAuthors']
// return this.$store.getters['audiobooks/getUniqueAuthors']
return this.filterData.authors || []
},
narrators() {
return this.$store.getters['audiobooks/getUniqueNarrators']
// return this.$store.getters['audiobooks/getUniqueNarrators']
return this.filterData.narrators || []
},
progress() {
return ['Read', 'Unread', 'In Progress']
@ -165,6 +170,9 @@ export default {
value: this.$encode(item)
}
})
},
filterData() {
return this.$store.state.libraries.filterData || {}
}
},
methods: {

View file

@ -94,7 +94,7 @@ export default {
if (!this.search) return
var search = this.search
this.clearResults()
this.$router.push(`/library/${this.currentLibraryId}/bookshelf/search?query=${search}`)
this.$router.push(`/library/${this.currentLibraryId}/search?q=${search}`)
},
clearResults() {
this.search = null