diff --git a/client/components/Reader/SettingsPage/SettingsPage.vue b/client/components/Reader/SettingsPage/SettingsPage.vue index b600f587..ecf7d28b 100644 --- a/client/components/Reader/SettingsPage/SettingsPage.vue +++ b/client/components/Reader/SettingsPage/SettingsPage.vue @@ -80,6 +80,7 @@ import Window from '../../share/Window.vue'; import NumInput from '../../share/NumInput.vue'; import rstore from '../../../store/modules/reader'; import defPalette from './defPalette'; +import * as notify from '../../share/notify'; const hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/; @@ -333,11 +334,11 @@ class SettingsPage extends Vue { } needReload() { - this.$notify.warning({message: 'Необходимо обновить страницу (F5), чтобы изменения возымели эффект'}); + notify.warning(this, 'Необходимо обновить страницу (F5), чтобы изменения возымели эффект'); } needTextReload() { - this.$notify.warning({message: 'Необходимо обновить книгу в обход кэша, чтобы изменения возымели эффект'}); + notify.warning(this, 'Необходимо обновить книгу в обход кэша, чтобы изменения возымели эффект'); } close() { @@ -462,9 +463,9 @@ class SettingsPage extends Vue { const suf = (prefix.substr(-1) == 'а' ? 'а' : ''); const msg = (result ? `${prefix} успешно скопирован${suf} в буфер обмена` : 'Копирование не удалось'); if (result) - this.$notify.success({message: msg}); + notify.success(this, msg); else - this.$notify.error({message: msg}); + notify.error(this, msg); } async showServerStorageKey() { diff --git a/client/components/share/notify.js b/client/components/share/notify.js index 0f4a9d58..49c0c806 100644 --- a/client/components/share/notify.js +++ b/client/components/share/notify.js @@ -30,6 +30,10 @@ export function success(vue, message, caption) { notify(vue, {color: 'positive', icon: 'la la-check-circle', message, caption}); } +export function warning(vue, message, caption) { + notify(vue, {color: 'warning', icon: 'la la-exclamation-circle', message, caption}); +} + export function error(vue, message, caption) { notify(vue, {color: 'negative', icon: 'la la-exclamation-circle', messageColor: 'yellow', message, caption}); }