Переход на quasar

This commit is contained in:
Book Pauk
2020-02-24 13:09:10 +07:00
parent 157267eaf7
commit 6e25b289d2
2 changed files with 9 additions and 4 deletions

View File

@@ -80,6 +80,7 @@ import Window from '../../share/Window.vue';
import NumInput from '../../share/NumInput.vue'; import NumInput from '../../share/NumInput.vue';
import rstore from '../../../store/modules/reader'; import rstore from '../../../store/modules/reader';
import defPalette from './defPalette'; import defPalette from './defPalette';
import * as notify from '../../share/notify';
const hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/; const hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;
@@ -333,11 +334,11 @@ class SettingsPage extends Vue {
} }
needReload() { needReload() {
this.$notify.warning({message: 'Необходимо обновить страницу (F5), чтобы изменения возымели эффект'}); notify.warning(this, 'Необходимо обновить страницу (F5), чтобы изменения возымели эффект');
} }
needTextReload() { needTextReload() {
this.$notify.warning({message: 'Необходимо обновить книгу в обход кэша, чтобы изменения возымели эффект'}); notify.warning(this, 'Необходимо обновить книгу в обход кэша, чтобы изменения возымели эффект');
} }
close() { close() {
@@ -462,9 +463,9 @@ class SettingsPage extends Vue {
const suf = (prefix.substr(-1) == 'а' ? 'а' : ''); const suf = (prefix.substr(-1) == 'а' ? 'а' : '');
const msg = (result ? `${prefix} успешно скопирован${suf} в буфер обмена` : 'Копирование не удалось'); const msg = (result ? `${prefix} успешно скопирован${suf} в буфер обмена` : 'Копирование не удалось');
if (result) if (result)
this.$notify.success({message: msg}); notify.success(this, msg);
else else
this.$notify.error({message: msg}); notify.error(this, msg);
} }
async showServerStorageKey() { async showServerStorageKey() {

View File

@@ -30,6 +30,10 @@ export function success(vue, message, caption) {
notify(vue, {color: 'positive', icon: 'la la-check-circle', 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) { export function error(vue, message, caption) {
notify(vue, {color: 'negative', icon: 'la la-exclamation-circle', messageColor: 'yellow', message, caption}); notify(vue, {color: 'negative', icon: 'la la-exclamation-circle', messageColor: 'yellow', message, caption});
} }