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

This commit is contained in:
Book Pauk
2019-02-15 02:46:27 +07:00
parent a631befdf9
commit ca7cc322d7
3 changed files with 24 additions and 7 deletions

View File

@@ -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;

View File

@@ -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">

View File

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