Prechádzať zdrojové kódy

Добавил в настройки параметр showClickMapPage

Book Pauk 6 rokov pred
rodič
commit
0019b3f94c

+ 6 - 4
client/components/Reader/Reader.vue

@@ -134,6 +134,7 @@ export default @Component({
         settings: function(newValue) {
         settings: function(newValue) {
             this.allowUrlParamBookPos = newValue.allowUrlParamBookPos;
             this.allowUrlParamBookPos = newValue.allowUrlParamBookPos;
             this.copyFullText = newValue.copyFullText;
             this.copyFullText = newValue.copyFullText;
+            this.showClickMapPage = newValue.showClickMapPage;
             this.updateRoute();
             this.updateRoute();
         },
         },
     },
     },
@@ -190,6 +191,7 @@ class Reader extends Vue {
 
 
         this.allowUrlParamBookPos = this.settings.allowUrlParamBookPos;
         this.allowUrlParamBookPos = this.settings.allowUrlParamBookPos;
         this.copyFullText = this.settings.copyFullText;
         this.copyFullText = this.settings.copyFullText;
+        this.showClickMapPage = this.settings.showClickMapPage;
     }
     }
 
 
     mounted() {
     mounted() {
@@ -521,8 +523,8 @@ class Reader extends Vue {
         return classResult;
         return classResult;
     }
     }
 
 
-    async showClickMapPage() {
-        if (!this.clickMapActive) {
+    async acivateClickMapPage() {
+        if (this.showClickMapPage && !this.clickMapActive) {
             this.clickMapActive = true;
             this.clickMapActive = true;
             await this.$refs.clickMapPage.slowDisappear();
             await this.$refs.clickMapPage.slowDisappear();
             this.clickMapActive = false;
             this.clickMapActive = false;
@@ -621,7 +623,7 @@ class Reader extends Vue {
                         progress.hide(); this.progressActive = false;
                         progress.hide(); this.progressActive = false;
                         this.blinkCachedLoadMessage();
                         this.blinkCachedLoadMessage();
 
 
-                        await this.showClickMapPage();
+                        await this.acivateClickMapPage();
                         return;
                         return;
                     }
                     }
 
 
@@ -669,7 +671,7 @@ class Reader extends Vue {
                 } else
                 } else
                     this.stopBlink = true;
                     this.stopBlink = true;
 
 
-                await this.showClickMapPage();
+                await this.acivateClickMapPage();
             } catch (e) {
             } catch (e) {
                 progress.hide(); this.progressActive = false;
                 progress.hide(); this.progressActive = false;
                 this.loaderActive = true;
                 this.loaderActive = true;

+ 8 - 0
client/components/Reader/SettingsPage/SettingsPage.vue

@@ -234,6 +234,14 @@
                     <!--------------------------------------------------------------------------->
                     <!--------------------------------------------------------------------------->
                     <el-tab-pane label="Прочее">
                     <el-tab-pane label="Прочее">
                         <el-form :model="form" size="mini" label-width="120px" @submit.native.prevent>
                         <el-form :model="form" size="mini" label-width="120px" @submit.native.prevent>
+                            <el-form-item label="Подсказка">
+                                <el-tooltip :open-delay="500" effect="light">
+                                    <template slot="content">
+                                        Показывать или нет подсказку при каждой загрузке книги
+                                    </template>
+                                    <el-checkbox v-model="showClickMapPage">Показывать сектора управления кликом</el-checkbox>
+                                </el-tooltip>
+                            </el-form-item>                            
                             <el-form-item label="URL">
                             <el-form-item label="URL">
                                 <el-tooltip :open-delay="500" effect="light">
                                 <el-tooltip :open-delay="500" effect="light">
                                     <template slot="content">
                                     <template slot="content">

+ 1 - 0
client/store/modules/reader.js

@@ -158,6 +158,7 @@ const settingDefaults = {
         allowUrlParamBookPos: false,
         allowUrlParamBookPos: false,
         lazyParseEnabled: false,
         lazyParseEnabled: false,
         copyFullText: false,
         copyFullText: false,
+        showClickMapPage: true,
         fontShifts: {},
         fontShifts: {},
 };
 };