Переход на quasar

This commit is contained in:
Book Pauk
2020-02-26 14:16:17 +07:00
parent b0da806f7a
commit 0bef307d77
8 changed files with 75 additions and 59 deletions

View File

@@ -45,7 +45,6 @@ import Vue from 'vue';
import Component from 'vue-class-component';
import {copyTextToClipboard} from '../../../../share/utils';
import * as notify from '../../../share/notify';
export default @Component({
})
@@ -61,9 +60,9 @@ class CommonHelpPage extends Vue {
const result = await copyTextToClipboard(text);
const msg = (result ? mes : 'Копирование не удалось');
if (result)
notify.success(this, msg);
this.$root.notify.success(msg);
else
notify.error(this, msg);
this.$root.notify.error(msg);
}
}
//-----------------------------------------------------------------------------

View File

@@ -56,7 +56,6 @@
import Vue from 'vue';
import Component from 'vue-class-component';
import {copyTextToClipboard} from '../../../../share/utils';
import * as notify from '../../../share/notify';
export default @Component({
})
@@ -77,9 +76,9 @@ class DonateHelpPage extends Vue {
async copyAddress(address, prefix) {
const result = await copyTextToClipboard(address);
if (result)
notify.success(this, `${prefix} ${address} успешно скопирован в буфер обмена`);
this.$root.notify.success(`${prefix} ${address} успешно скопирован в буфер обмена`);
else
notify.error(this, 'Копирование не удалось');
this.$root.notify.error('Копирование не удалось');
}
}
//-----------------------------------------------------------------------------

View File

@@ -432,9 +432,9 @@ class Reader extends Vue {
async copyLink(link) {
const result = await utils.copyTextToClipboard(link);
if (result)
this.$notify.success({message: `Ссылка ${link} успешно скопирована в буфер обмена`});
this.$root.notify.success(`Ссылка ${link} успешно скопирована в буфер обмена`);
else
this.$notify.error({message: 'Копирование не удалось'});
this.$root.notify.error('Копирование не удалось');
}
openVersionHistory() {

View File

@@ -78,7 +78,6 @@ 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})?$/;
@@ -332,11 +331,11 @@ class SettingsPage extends Vue {
}
needReload() {
notify.warning(this, 'Необходимо обновить страницу (F5), чтобы изменения возымели эффект');
this.$root.notify.warning('Необходимо обновить страницу (F5), чтобы изменения возымели эффект');
}
needTextReload() {
notify.warning(this, 'Необходимо обновить книгу в обход кэша, чтобы изменения возымели эффект');
this.$root.notify.warning('Необходимо обновить книгу в обход кэша, чтобы изменения возымели эффект');
}
close() {
@@ -443,9 +442,9 @@ class SettingsPage extends Vue {
const suf = (prefix.substr(-1) == 'а' ? 'а' : '');
const msg = (result ? `${prefix} успешно скопирован${suf} в буфер обмена` : 'Копирование не удалось');
if (result)
notify.success(this, msg);
this.$root.notify.success(msg);
else
notify.error(this, msg);
this.$root.notify.error(msg);
}
async showServerStorageKey() {

View File

@@ -39,7 +39,6 @@ import Component from 'vue-class-component';
import {loadCSS} from 'fg-loadcss';
import _ from 'lodash';
import * as notify from '../../share/notify';
import {sleep} from '../../../share/utils';
import bookManager from '../share/bookManager';
import DrawHelper from './DrawHelper';
@@ -287,7 +286,7 @@ class TextPage extends Vue {
(async() => {
await sleep(500);
if (this.fontsLoading)
close = notify.info(this, 'Загрузка шрифта &nbsp;<i class="la la-snowflake icon-rotate" style="font-size: 150%"></i>');
close = this.$root.notify.info('Загрузка шрифта &nbsp;<i class="la la-snowflake icon-rotate" style="font-size: 150%"></i>');
})();
if (!this.fontsLoaded)
@@ -302,7 +301,7 @@ class TextPage extends Vue {
try {
await this.checkLoadedFonts();
} catch (e) {
notify.error(this, 'Некоторые шрифты не удалось загрузить', 'Ошибка загрузки');
this.$root.notify.error('Некоторые шрифты не удалось загрузить', 'Ошибка загрузки');
}
this.fontsLoading = false;