Улучшена обработка ошибок
This commit is contained in:
@@ -126,9 +126,9 @@
|
||||
</div>
|
||||
<!-- Формирование списка конец ------------------------------------------------------------------>
|
||||
|
||||
<div v-if="!refreshing && !tableData.length" class="row items-center q-ml-md" style="font-size: 120%">
|
||||
<div v-if="!refreshing && (!tableData.length || error)" class="row items-center q-ml-md" style="font-size: 120%">
|
||||
<q-icon class="la la-meh q-mr-xs" size="28px" />
|
||||
Поиск не дал результатов
|
||||
{{ (error ? error : 'Поиск не дал результатов') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -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 {
|
||||
|
||||
@@ -48,6 +48,7 @@ export default class BaseList {
|
||||
genreMap: Object,
|
||||
};
|
||||
|
||||
error = '';
|
||||
loadingMessage = '';
|
||||
loadingMessage2 = '';
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
</div>
|
||||
<!-- Формирование списка конец ------------------------------------------------------------------>
|
||||
|
||||
<div v-if="!refreshing && !tableData.length" class="row items-center q-ml-md" style="font-size: 120%">
|
||||
<div v-if="!refreshing && (!tableData.length || error)" class="row items-center q-ml-md" style="font-size: 120%">
|
||||
<q-icon class="la la-meh q-mr-xs" size="28px" />
|
||||
Поиск не дал результатов
|
||||
{{ (error ? error : 'Поиск не дал результатов') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -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 {
|
||||
|
||||
@@ -96,9 +96,9 @@
|
||||
</div>
|
||||
<!-- Формирование списка конец ------------------------------------------------------------------>
|
||||
|
||||
<div v-if="!refreshing && !tableData.length" class="row items-center q-ml-md" style="font-size: 120%">
|
||||
<div v-if="!refreshing && (!tableData.length || error)" class="row items-center q-ml-md" style="font-size: 120%">
|
||||
<q-icon class="la la-meh q-mr-xs" size="28px" />
|
||||
Поиск не дал результатов
|
||||
{{ (error ? error : 'Поиск не дал результатов') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -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 {
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
</div>
|
||||
<!-- Формирование списка конец ------------------------------------------------------------------>
|
||||
|
||||
<div v-if="!refreshing && !tableData.length" class="row items-center q-ml-md" style="font-size: 120%">
|
||||
<div v-if="!refreshing && (!tableData.length || error)" class="row items-center q-ml-md" style="font-size: 120%">
|
||||
<q-icon class="la la-meh q-mr-xs" size="28px" />
|
||||
Поиск не дал результатов
|
||||
{{ (error ? error : 'Поиск не дал результатов') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user