New model updates for series, collections, authors routes

This commit is contained in:
advplyr 2022-03-12 18:50:31 -06:00
parent 73257188f6
commit 2d19208340
19 changed files with 432 additions and 247 deletions

View file

@ -51,6 +51,9 @@ export default {
if (this.bookCoverAspectRatio === 1) return this.width / (120 * 1.6 * 2)
return this.width / 240
},
seriesId() {
return this.series ? this.series.id : ''
},
title() {
return this.series ? this.series.name : ''
},
@ -64,13 +67,10 @@ export default {
return this.store.state.libraries.currentLibraryId
},
seriesBooksRoute() {
return `/library/${this.currentLibraryId}/series/${this.$encode(this.title)}`
},
seriesId() {
return this.series ? this.$encode(this.title) : null
return `/library/${this.currentLibraryId}/series/${this.seriesId}`
},
hasValidCovers() {
var validCovers = this.books.map((bookItem) => bookItem.book.cover)
var validCovers = this.books.map((bookItem) => bookItem.media.coverPath)
return !!validCovers.length
}
},