diff --git a/client/components/app/BookShelfToolbar.vue b/client/components/app/BookShelfToolbar.vue index 94e095c7..8e0cb18c 100644 --- a/client/components/app/BookShelfToolbar.vue +++ b/client/components/app/BookShelfToolbar.vue @@ -159,6 +159,7 @@ export default { } this.addSubtitlesMenuItem(items) + this.addCollapseSubSeriesMenuItem(items) return items }, @@ -371,6 +372,21 @@ export default { } } }, + addCollapseSubSeriesMenuItem(items) { + if (this.selectedSeries && this.isBookLibrary && !this.isBatchSelecting) { + if (this.settings.collapseBookSeries) { + items.push({ + text: this.$strings.LabelExpandSubSeries, + action: 'expand-sub-series' + }) + } else { + items.push({ + text: this.$strings.LabelCollapseSubSeries, + action: 'collapse-sub-series' + }) + } + } + }, handleSubtitlesAction(action) { if (action === 'show-subtitles') { this.settings.showSubtitles = true @@ -397,6 +413,19 @@ export default { } return false }, + handleCollapseSubSeriesAction(action) { + if (action === 'collapse-sub-series') { + this.settings.collapseBookSeries = true + this.updateCollapseSubSeries() + return true + } + if (action === 'expand-sub-series') { + this.settings.collapseBookSeries = false + this.updateCollapseSubSeries() + return true + } + return false + }, contextMenuAction({ action }) { if (action === 'export-opml') { this.exportOPML() @@ -427,6 +456,8 @@ export default { this.markSeriesFinished() } else if (this.handleSubtitlesAction(action)) { return + } else if (this.handleCollapseSubSeriesAction(action)) { + return } }, showOpenSeriesRSSFeed() { @@ -553,7 +584,7 @@ export default { updateCollapseSeries() { this.saveSettings() }, - updateCollapseBookSeries() { + updateCollapseSubSeries() { this.saveSettings() }, updateShowSubtitles() { diff --git a/client/strings/en-us.json b/client/strings/en-us.json index a8740b14..84e31678 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -246,6 +246,7 @@ "LabelClosePlayer": "Close player", "LabelCodec": "Codec", "LabelCollapseSeries": "Collapse Series", + "LabelCollapseSubSeries": "Collapse Sub Series", "LabelCollection": "Collection", "LabelCollections": "Collections", "LabelComplete": "Complete", @@ -298,6 +299,7 @@ "LabelEpisodeType": "Episode Type", "LabelExample": "Example", "LabelExpandSeries": "Expand Series", + "LabelExpandSubSeries": "Expand Sub Series", "LabelExplicit": "Explicit", "LabelExplicitChecked": "Explicit (checked)", "LabelExplicitUnchecked": "Not Explicit (unchecked)",