diff --git a/client/components/app/BookShelfToolbar.vue b/client/components/app/BookShelfToolbar.vue
index f763de89..ed69e2ac 100644
--- a/client/components/app/BookShelfToolbar.vue
+++ b/client/components/app/BookShelfToolbar.vue
@@ -53,7 +53,6 @@
{{ numShowing }}
-
@@ -68,9 +67,6 @@
-
-
-
@@ -332,6 +328,7 @@ export default {
}
this.addSubtitlesMenuItem(items)
+ this.addCollpaseSeriesMenuItem(items)
return items
},
@@ -355,6 +352,21 @@ export default {
}
}
},
+ addCollpaseSeriesMenuItem(items) {
+ if (this.isLibraryPage && this.isBookLibrary && !this.isBatchSelecting) {
+ if (this.settings.collapseSeries) {
+ items.push({
+ text: 'Expand Series',
+ action: 'expand-series'
+ })
+ } else {
+ items.push({
+ text: 'Collapse Series',
+ action: 'collapse-series'
+ })
+ }
+ }
+ },
handleSubtitlesAction(action) {
if (action === 'show-subtitles') {
this.settings.showSubtitles = true
@@ -368,12 +380,27 @@ export default {
}
return false
},
+ handleCollapseSeriesAction(action) {
+ if (action === 'collapse-series') {
+ this.settings.collapseSeries = true
+ this.updateCollapseSeries()
+ return true
+ }
+ if (action === 'expand-series') {
+ this.settings.collapseSeries = false
+ this.updateCollapseSeries()
+ return true
+ }
+ return false
+ },
contextMenuAction({ action }) {
if (action === 'export-opml') {
this.exportOPML()
return
} else if (this.handleSubtitlesAction(action)) {
return
+ } else if (this.handleCollapseSeriesAction(action)) {
+ return
}
},
exportOPML() {