ソースを参照

Добавил настройку blinkCachedLoad

Book Pauk 6 年 前
コミット
ca7cc322d7

+ 14 - 7
client/components/Reader/Reader.vue

@@ -133,10 +133,8 @@ export default @Component({
                 this.loadBook({url: newValue, bookPos: this.routeParamPos});
             }
         },
-        settings: function(newValue) {
-            this.allowUrlParamBookPos = newValue.allowUrlParamBookPos;
-            this.copyFullText = newValue.copyFullText;
-            this.showClickMapPage = newValue.showClickMapPage;
+        settings: function() {
+            this.loadSettings();
             this.updateRoute();
         },
         loaderActive: function(newValue) {
@@ -198,9 +196,7 @@ class Reader extends Vue {
             this.fullScreenActive = (document.fullscreenElement !== null);
         });
 
-        this.allowUrlParamBookPos = this.settings.allowUrlParamBookPos;
-        this.copyFullText = this.settings.copyFullText;
-        this.showClickMapPage = this.settings.showClickMapPage;
+        this.loadSettings();
     }
 
     mounted() {
@@ -219,6 +215,14 @@ class Reader extends Vue {
         })();
     }
 
+    loadSettings() {
+        const settings = this.settings;
+        this.allowUrlParamBookPos = settings.allowUrlParamBookPos;
+        this.copyFullText = settings.copyFullText;
+        this.showClickMapPage = settings.showClickMapPage;
+        this.blinkCachedLoad = settings.blinkCachedLoad;
+    }
+
     get routeParamPos() {
         let result = undefined;
         const q = this.$route.query;
@@ -738,6 +742,9 @@ class Reader extends Vue {
     }
 
     blinkCachedLoadMessage() {
+        if (!this.blinkCachedLoad)
+            return;
+
         this.blinkCount = 30;
         if (!this.inBlink) {
             this.inBlink = true;

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

@@ -255,6 +255,15 @@
                                     <el-checkbox v-model="showClickMapPage">Показывать области управления кликом</el-checkbox>
                                 </el-tooltip>
                             </el-form-item>
+                            <el-form-item label="Подсказка">
+                                <el-tooltip :open-delay="500" effect="light">
+                                    <template slot="content">
+                                        Мерцать сообщением в строке статуса и на кнопке<br>
+                                        обновления при загрузке книги из кэша
+                                    </template>
+                                    <el-checkbox v-model="blinkCachedLoad">Предупреждать о загрузке из кэша</el-checkbox>
+                                </el-tooltip>
+                            </el-form-item>
                             <el-form-item label="URL">
                                 <el-tooltip :open-delay="500" effect="light">
                                     <template slot="content">

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

@@ -162,6 +162,7 @@ const settingDefaults = {
         clickControl: true,
         cutEmptyParagraphs: false,
         addEmptyParagraphs: 0,
+        blinkCachedLoad: true,
 
         fontShifts: {},
 };