diff --git a/client/components/Search/BookView/BookView.vue b/client/components/Search/BookView/BookView.vue index 67833b8..f5e7208 100644 --- a/client/components/Search/BookView/BookView.vue +++ b/client/components/Search/BookView/BookView.vue @@ -17,7 +17,7 @@ -
+
{{ bookGenre }}
@@ -33,6 +33,9 @@ const componentOptions = { components: { }, watch: { + settings() { + this.loadSettings(); + }, } }; class BookView { @@ -42,7 +45,20 @@ class BookView { genreTree: Array, }; + showGenres = true; + created() { + this.loadSettings(); + } + + loadSettings() { + const settings = this.settings; + + this.showGenres = settings.showGenres; + } + + get settings() { + return this.$store.state.settings; } get bookSize() { diff --git a/client/components/Search/Search.vue b/client/components/Search/Search.vue index 8b3d3eb..567e816 100644 --- a/client/components/Search/Search.vue +++ b/client/components/Search/Search.vue @@ -208,6 +208,7 @@
+ @@ -276,6 +277,9 @@ const componentOptions = { showCounts(newValue) { this.setSetting('showCounts', newValue); }, + showGenres(newValue) { + this.setSetting('showGenres', newValue); + }, showDeleted(newValue) { this.setSetting('showDeleted', newValue); this.updateTableData(); @@ -326,6 +330,7 @@ class Search { expanded = []; expandedSeries = []; showCounts = true; + showGenres = true; showDeleted = false; abCacheEnabled = true; langDefault = ''; @@ -389,6 +394,7 @@ class Search { this.expanded = _.cloneDeep(settings.expanded); this.expandedSeries = _.cloneDeep(settings.expandedSeries); this.showCounts = settings.showCounts; + this.showGenres = settings.showGenres; this.showDeleted = settings.showDeleted; this.abCacheEnabled = settings.abCacheEnabled; this.langDefault = settings.langDefault; diff --git a/client/store/root.js b/client/store/root.js index 74b6e57..ee7baa9 100644 --- a/client/store/root.js +++ b/client/store/root.js @@ -6,6 +6,7 @@ const state = { expanded: [], expandedSeries: [], showCounts: true, + showGenres: true, showDeleted: false, abCacheEnabled: true, langDefault: '',