From 1aebbbcabd187b4574a41aa581a5718bc3f76551 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 4 Mar 2020 15:32:05 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B9=20=D1=80?= =?UTF-8?q?=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/Reader.vue | 4 ++-- .../Reader/RecentBooksPage/RecentBooksPage.vue | 2 +- client/components/Reader/TextPage/TextPage.vue | 4 ++-- client/components/share/StdDialog.vue | 15 ++++++++++----- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue index ef21d668..5bde0e6b 100644 --- a/client/components/Reader/Reader.vue +++ b/client/components/Reader/Reader.vue @@ -1030,7 +1030,7 @@ class Reader extends Vue { } catch (e) { progress.hide(); this.progressActive = false; this.loaderActive = true; - this.$root.stdDialog.alert(e.message, 'Ошибка', {type: 'negative'}); + this.$root.stdDialog.alert(e.message, 'Ошибка', {color: 'negative'}); } } @@ -1054,7 +1054,7 @@ class Reader extends Vue { } catch (e) { progress.hide(); this.progressActive = false; this.loaderActive = true; - this.$root.stdDialog.alert(e.message, 'Ошибка', {type: 'negative'}); + this.$root.stdDialog.alert(e.message, 'Ошибка', {color: 'negative'}); } } diff --git a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue index c005ddf9..04ff417f 100644 --- a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue +++ b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue @@ -303,7 +303,7 @@ class RecentBooksPage extends Vue { let errMes = e.message; if (errMes.indexOf('404') >= 0) errMes = 'Файл не найден на сервере (возможно был удален как устаревший)'; - this.$root.stdDialog.alert(errMes, 'Ошибка', {type: 'negative'}); + this.$root.stdDialog.alert(errMes, 'Ошибка', {color: 'negative'}); } } diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index ff2844d2..32618243 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -423,7 +423,7 @@ class TextPage extends Vue { if (this.lazyParseEnabled) this.lazyParsePara(); } catch (e) { - this.$root.stdDialog.alert(e.message, 'Ошибка', {type: 'negative'}); + this.$root.stdDialog.alert(e.message, 'Ошибка', {color: 'negative'}); } })(); } @@ -1132,7 +1132,7 @@ class TextPage extends Vue { if (url && url.indexOf('file://') != 0) { window.open(url, '_blank'); } else { - this.$root.stdDialog.alert('Оригинал недоступен, т.к. файл книги был загружен с локального диска.', ' ', {type: 'info'}); + this.$root.stdDialog.alert('Оригинал недоступен, т.к. файл книги был загружен с локального диска.', ' ', {color: 'info'}); } } diff --git a/client/components/share/StdDialog.vue b/client/components/share/StdDialog.vue index ebc2d186..1f4bcc97 100644 --- a/client/components/share/StdDialog.vue +++ b/client/components/share/StdDialog.vue @@ -3,7 +3,7 @@ -
+
@@ -26,7 +26,7 @@
-
+
@@ -50,7 +50,7 @@
-
+
@@ -99,6 +99,7 @@ class StdDialog extends Vue { inputValue = ''; error = ''; iconColor = ''; + style = ''; created() { if (this.$root.addKeyHook) { @@ -117,11 +118,15 @@ class StdDialog extends Vue { this.error = ''; this.iconColor = 'text-warning'; - if (opts && opts.type) { - this.iconColor = `text-${opts.type}`; + if (opts && opts.color) { + this.iconColor = `text-${opts.color}`; } } + get dialogStyle() { + return 'min-height: 150px'; + } + onHide() { if (this.hideTrigger) { this.hideTrigger();