Переход на quasar
This commit is contained in:
@@ -15,6 +15,8 @@ class Misc {
|
|||||||
try {
|
try {
|
||||||
await wsc.open();
|
await wsc.open();
|
||||||
const config = await wsc.message(wsc.send(Object.assign({action: 'get-config'}, query)));
|
const config = await wsc.message(wsc.send(Object.assign({action: 'get-config'}, query)));
|
||||||
|
if (config.error)
|
||||||
|
throw new Error(config.error);
|
||||||
return config;
|
return config;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|||||||
@@ -152,11 +152,7 @@ class App extends Vue {
|
|||||||
let mes = newError.message;
|
let mes = newError.message;
|
||||||
if (newError.response && newError.response.config)
|
if (newError.response && newError.response.config)
|
||||||
mes = newError.response.config.url + '<br>' + newError.response.statusText;
|
mes = newError.response.config.url + '<br>' + newError.response.statusText;
|
||||||
this.$notify.error({
|
this.$root.notify.error(mes, 'Ошибка API');
|
||||||
title: 'Ошибка API',
|
|
||||||
dangerouslyUseHTMLString: true,
|
|
||||||
message: mes
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class Notify extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
error(message, caption) {
|
error(message, caption) {
|
||||||
this.notify({color: 'negative', icon: 'la la-exclamation-circle', messageColor: 'yellow', message, caption});
|
this.notify({color: 'negative', icon: 'la la-exclamation-circle', messageColor: 'yellow', captionColor: 'white', message, caption});
|
||||||
}
|
}
|
||||||
|
|
||||||
info(message, caption) {
|
info(message, caption) {
|
||||||
|
|||||||
Reference in New Issue
Block a user