diff --git a/client/components/app/BookShelfToolbar.vue b/client/components/app/BookShelfToolbar.vue index 9064c914..ba1ef39c 100644 --- a/client/components/app/BookShelfToolbar.vue +++ b/client/components/app/BookShelfToolbar.vue @@ -68,6 +68,8 @@
+{{ $strings.MessageSearchResultsFor }} "{{ searchQuery }}"
+{{ displayLineOne }}
+{{ displayLineTwo || ' ' }}
{{ displaySortLine }}
@@ -166,6 +169,7 @@ export default { selected: false, isSelectionMode: false, displayTitleTruncated: false, + displayLineOneTruncated: false, showCoverBg: false } }, @@ -334,6 +338,13 @@ export default { if (this.collapsedSeries) return ignorePrefix ? this.collapsedSeries.nameIgnorePrefix : this.collapsedSeries.name return ignorePrefix ? this.mediaMetadata.titleIgnorePrefix : this.title || '\u00A0' }, + displayLineOne() { + if (this.collapsedSeries) return this.collapsedSeries.numBooks === 1 ? '1 book' : `${this.collapsedSeries.numBooks} books` + if (this.mediaMetadata.subtitle) return this.mediaMetadata.subtitle + if (this.mediaMetadata.seriesName) return this.mediaMetadata.seriesName + if (this.mediaMetadata.genres) return this.mediaMetadata.genres.filter((genre) => !['Podcasts', 'Audiobook'].includes(genre)).join(', ') || '\u00A0' + return '\u00A0' + }, displayLineTwo() { if (this.recentEpisode) return this.title if (this.isPodcast) return this.author @@ -627,6 +638,9 @@ export default { rssFeed() { if (this.booksInSeries) return null return this._libraryItem.rssFeed || null + }, + showSubtitles() { + return this.store.getters['user/getUserSetting']('showSubtitles') } }, methods: { @@ -668,6 +682,9 @@ export default { if (this.$refs.displayTitle) { this.displayTitleTruncated = this.$refs.displayTitle.scrollWidth > this.$refs.displayTitle.clientWidth } + if (this.$refs.displayLineOne) { + this.displayLineOneTruncated = this.$refs.displayLineOne.scrollWidth > this.$refs.displayLineOne.clientWidth + } }) }, clickCard(e) { diff --git a/client/store/user.js b/client/store/user.js index 70746bc1..3555d63e 100644 --- a/client/store/user.js +++ b/client/store/user.js @@ -8,6 +8,7 @@ export const state = () => ({ bookshelfCoverSize: 120, collapseSeries: false, collapseBookSeries: false, + showSubtitles: false, useChapterTrack: false, seriesSortBy: 'name', seriesSortDesc: false, diff --git a/client/strings/en-us.json b/client/strings/en-us.json index f2bd04e3..fb136c26 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -502,6 +502,7 @@ "LabelSettingsTimeFormat": "Time Format", "LabelShowAll": "Show All", "LabelShowSeconds": "Show seconds", + "LabelShowSubtitles": "Show Subtitles", "LabelSize": "Size", "LabelSleepTimer": "Sleep timer", "LabelSlug": "Slug",