diff --git a/client/components/app/BookShelfCategorized.vue b/client/components/app/BookShelfCategorized.vue
index fe1d5df5..ca070e18 100644
--- a/client/components/app/BookShelfCategorized.vue
+++ b/client/components/app/BookShelfCategorized.vue
@@ -28,6 +28,9 @@
{{ $strings[shelf.labelStringKey] }} {{ $strings[shelf.labelStringKey] }}
by {{ authorName }}
- + @@ -67,12 +67,13 @@ export default { // but with removing commas periods etc this is no longer plausible const html = this.matchText - if (this.matchKey === 'episode') return `Episode: ${html}
` - if (this.matchKey === 'tags') return `Tags: ${html}
` + if (this.matchKey === 'episode') return `${this.$strings.LabelEpisode}: ${html}
` + if (this.matchKey === 'tags') return `${this.$strings.LabelTags}: ${html}
` if (this.matchKey === 'authors') return `by ${html}` if (this.matchKey === 'isbn') return `ISBN: ${html}
` if (this.matchKey === 'asin') return `ASIN: ${html}
` - if (this.matchKey === 'series') return `Series: ${html}
` + if (this.matchKey === 'series') return `${this.$strings.LabelSeries}: ${html}
` + if (this.matchKey === 'narrators') return `${this.$strings.LabelNarrator}: ${html}
` return `${html}` } }, diff --git a/client/components/cards/LazySeriesCard.vue b/client/components/cards/LazySeriesCard.vue index 313530b6..1175acf1 100644 --- a/client/components/cards/LazySeriesCard.vue +++ b/client/components/cards/LazySeriesCard.vue @@ -7,7 +7,7 @@{{ displayTitle }}
@@ -85,13 +85,13 @@ export default { case 'addedAt': return `${this.$strings.LabelAdded} ${this.$formatDate(this.addedAt, this.dateFormat)}` case 'totalDuration': - return `${this.$strings.LabelDuration} ${this.$elapsedPrettyExtended(this.totalDuration, false)}` + return `${this.$strings.LabelDuration} ${this.$elapsedPrettyExtended(this.totalDuration, false)}` case 'lastBookUpdated': - const lastUpdated = Math.max(...(this.books).map(x => x.updatedAt), 0) + const lastUpdated = Math.max(...this.books.map((x) => x.updatedAt), 0) return `${this.$strings.LabelLastBookUpdated} ${this.$formatDate(lastUpdated, this.dateFormat)}` case 'lastBookAdded': - const lastBookAdded = Math.max(...(this.books).map(x => x.addedAt), 0) - return `${this.$strings.LabelLastBookAdded} ${this.$formatDate(lastBookAdded, this.dateFormat)}` + const lastBookAdded = Math.max(...this.books.map((x) => x.addedAt), 0) + return `${this.$strings.LabelLastBookAdded} ${this.$formatDate(lastBookAdded, this.dateFormat)}` default: return null } @@ -115,6 +115,14 @@ export default { seriesBooksFinished() { return this.seriesBookProgress.filter((p) => p.isFinished) }, + hasSeriesBookInProgress() { + return this.seriesBookProgress.some((p) => !p.isFinished && p.progress > 0) + }, + seriesPercentInProgress() { + let totalFinishedAndInProgress = this.seriesBooksFinished.length + if (this.hasSeriesBookInProgress) totalFinishedAndInProgress += 1 + return Math.min(1, Math.max(0, totalFinishedAndInProgress / this.books.length)) + }, isSeriesFinished() { return this.books.length === this.seriesBooksFinished.length }, diff --git a/client/components/cards/NarratorCard.vue b/client/components/cards/NarratorCard.vue new file mode 100644 index 00000000..9d3e5a30 --- /dev/null +++ b/client/components/cards/NarratorCard.vue @@ -0,0 +1,50 @@ + +{{ name }}
+{{ numBooks }} Book{{ numBooks === 1 ? '' : 's' }}
+{{ narrator }}
+{{ $strings.LabelNarrators }}
+ +