From 6e25b289d27f65e54cd1d44e4914910b9de89beb Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Mon, 24 Feb 2020 13:09:10 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BD=D0=B0=20quasar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/SettingsPage/SettingsPage.vue | 9 +++++---- client/components/share/notify.js | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) 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}); }