Добавил настройку отображения уведомлений от синхронизатора
This commit is contained in:
@@ -110,6 +110,10 @@ class ServerStorage extends Vue {
|
|||||||
return this.$store.state.reader.currentProfile;
|
return this.$store.state.reader.currentProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get showServerStorageMessages() {
|
||||||
|
return this.settings.showServerStorageMessages;
|
||||||
|
}
|
||||||
|
|
||||||
checkCurrentProfile() {
|
checkCurrentProfile() {
|
||||||
if (!this.profiles[this.currentProfile]) {
|
if (!this.profiles[this.currentProfile]) {
|
||||||
this.commit('reader/setCurrentProfile', '');
|
this.commit('reader/setCurrentProfile', '');
|
||||||
@@ -118,15 +122,22 @@ class ServerStorage extends Vue {
|
|||||||
|
|
||||||
notifySuccessIfNeeded(rev1, rev2) {
|
notifySuccessIfNeeded(rev1, rev2) {
|
||||||
if (rev1 != rev2)
|
if (rev1 != rev2)
|
||||||
this.$notify.success({message: 'Данные синхронизированы с сервером'});
|
this.success('Данные синхронизированы с сервером');
|
||||||
|
}
|
||||||
|
|
||||||
|
success(message) {
|
||||||
|
if (this.showServerStorageMessages)
|
||||||
|
this.$notify.success({message});
|
||||||
}
|
}
|
||||||
|
|
||||||
warning(message) {
|
warning(message) {
|
||||||
this.$notify.warning({message});
|
if (this.showServerStorageMessages)
|
||||||
|
this.$notify.warning({message});
|
||||||
}
|
}
|
||||||
|
|
||||||
error(message) {
|
error(message) {
|
||||||
this.$notify.error({message});
|
if (this.showServerStorageMessages)
|
||||||
|
this.$notify.error({message});
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadSettings() {
|
async loadSettings() {
|
||||||
|
|||||||
@@ -388,6 +388,7 @@
|
|||||||
<el-form-item label="Управление">
|
<el-form-item label="Управление">
|
||||||
<el-checkbox v-model="clickControl">Включить управление кликом</el-checkbox>
|
<el-checkbox v-model="clickControl">Включить управление кликом</el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="Подсказка">
|
<el-form-item label="Подсказка">
|
||||||
<el-tooltip :open-delay="500" effect="light">
|
<el-tooltip :open-delay="500" effect="light">
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
@@ -405,6 +406,16 @@
|
|||||||
<el-checkbox v-model="blinkCachedLoad">Предупреждать о загрузке из кэша</el-checkbox>
|
<el-checkbox v-model="blinkCachedLoad">Предупреждать о загрузке из кэша</el-checkbox>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="Подсказка">
|
||||||
|
<el-tooltip :open-delay="500" effect="light">
|
||||||
|
<template slot="content">
|
||||||
|
Показывать уведомления и ошибки от<br>
|
||||||
|
синхронизатора данных с сервером
|
||||||
|
</template>
|
||||||
|
<el-checkbox v-model="showServerStorageMessages">Показывать сообщения синхронизации</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">
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ const settingDefaults = {
|
|||||||
showInlineImagesInCenter: true,
|
showInlineImagesInCenter: true,
|
||||||
imageHeightLines: 100,
|
imageHeightLines: 100,
|
||||||
imageFitWidth: true,
|
imageFitWidth: true,
|
||||||
|
showServerStorageMessages: true,
|
||||||
|
|
||||||
fontShifts: {},
|
fontShifts: {},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user