From 1cfa787e5aa0912e8574eac4737f26d233b70861 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 25 Sep 2022 13:44:58 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA?= =?UTF-8?q?=D0=B0=20"=D0=9F=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20=D0=B6=D0=B0=D0=BD=D1=80=D1=8B"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Search/BookView/BookView.vue | 18 +++++++++++++++++- client/components/Search/Search.vue | 6 ++++++ client/store/root.js | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) 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: '',