From 8687931274eefdd02c34f146c1cb7bda2c321371 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 12 Apr 2023 17:53:51 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Search/AuthorList/AuthorList.vue | 12 +++++++++--- client/components/Search/BaseList.js | 1 + .../components/Search/ExtendedList/ExtendedList.vue | 12 +++++++++--- client/components/Search/SeriesList/SeriesList.vue | 12 +++++++++--- client/components/Search/TitleList/TitleList.vue | 12 +++++++++--- 5 files changed, 37 insertions(+), 12 deletions(-) diff --git a/client/components/Search/AuthorList/AuthorList.vue b/client/components/Search/AuthorList/AuthorList.vue index bc22ac2..271b51d 100644 --- a/client/components/Search/AuthorList/AuthorList.vue +++ b/client/components/Search/AuthorList/AuthorList.vue @@ -126,9 +126,9 @@ -
+
- Поиск не дал результатов + {{ (error ? error : 'Поиск не дал результатов') }}
@@ -438,6 +438,7 @@ class AuthorList extends BaseList { if (this.refreshing) return; + this.error = ''; this.refreshing = true; (async() => { @@ -467,7 +468,12 @@ class AuthorList extends BaseList { this.highlightPageScroller(query); } } catch (e) { - this.$root.stdDialog.alert(e.message, 'Ошибка'); + this.list.queryFound = 0; + this.list.totalFound = 0; + this.searchResult = {found: []}; + await this.updateTableData(); + //this.$root.stdDialog.alert(e.message, 'Ошибка'); + this.error = `Ошибка: ${e.message}`; } } } finally { diff --git a/client/components/Search/BaseList.js b/client/components/Search/BaseList.js index f2adcd2..d1d98af 100644 --- a/client/components/Search/BaseList.js +++ b/client/components/Search/BaseList.js @@ -48,6 +48,7 @@ export default class BaseList { genreMap: Object, }; + error = ''; loadingMessage = ''; loadingMessage2 = ''; diff --git a/client/components/Search/ExtendedList/ExtendedList.vue b/client/components/Search/ExtendedList/ExtendedList.vue index 19a19d5..b34035a 100644 --- a/client/components/Search/ExtendedList/ExtendedList.vue +++ b/client/components/Search/ExtendedList/ExtendedList.vue @@ -14,9 +14,9 @@ -
+
- Поиск не дал результатов + {{ (error ? error : 'Поиск не дал результатов') }}
@@ -74,6 +74,7 @@ class ExtendedList extends BaseList { if (this.refreshing) return; + this.error = ''; this.refreshing = true; (async() => { @@ -103,7 +104,12 @@ class ExtendedList extends BaseList { this.highlightPageScroller(query); } } catch (e) { - this.$root.stdDialog.alert(e.message, 'Ошибка'); + this.list.queryFound = 0; + this.list.totalFound = 0; + this.searchResult = {found: []}; + await this.updateTableData(); + //this.$root.stdDialog.alert(e.message, 'Ошибка'); + this.error = `Ошибка: ${e.message}`; } } } finally { diff --git a/client/components/Search/SeriesList/SeriesList.vue b/client/components/Search/SeriesList/SeriesList.vue index e49f9ab..6b23f3e 100644 --- a/client/components/Search/SeriesList/SeriesList.vue +++ b/client/components/Search/SeriesList/SeriesList.vue @@ -96,9 +96,9 @@ -
+
- Поиск не дал результатов + {{ (error ? error : 'Поиск не дал результатов') }}
@@ -234,6 +234,7 @@ class SeriesList extends BaseList { if (this.refreshing) return; + this.error = ''; this.refreshing = true; (async() => { @@ -263,7 +264,12 @@ class SeriesList extends BaseList { this.highlightPageScroller(query); } } catch (e) { - this.$root.stdDialog.alert(e.message, 'Ошибка'); + this.list.queryFound = 0; + this.list.totalFound = 0; + this.searchResult = {found: []}; + await this.updateTableData(); + //this.$root.stdDialog.alert(e.message, 'Ошибка'); + this.error = `Ошибка: ${e.message}`; } } } finally { diff --git a/client/components/Search/TitleList/TitleList.vue b/client/components/Search/TitleList/TitleList.vue index 0c47009..2f92701 100644 --- a/client/components/Search/TitleList/TitleList.vue +++ b/client/components/Search/TitleList/TitleList.vue @@ -22,9 +22,9 @@ -
+
- Поиск не дал результатов + {{ (error ? error : 'Поиск не дал результатов') }}
@@ -95,6 +95,7 @@ class TitleList extends BaseList { if (this.refreshing) return; + this.error = ''; this.refreshing = true; (async() => { @@ -124,7 +125,12 @@ class TitleList extends BaseList { this.highlightPageScroller(query); } } catch (e) { - this.$root.stdDialog.alert(e.message, 'Ошибка'); + this.list.queryFound = 0; + this.list.totalFound = 0; + this.searchResult = {found: []}; + await this.updateTableData(); + //this.$root.stdDialog.alert(e.message, 'Ошибка'); + this.error = `Ошибка: ${e.message}`; } } } finally {