Улучшена обработка ошибок
This commit is contained in:
@@ -126,9 +126,9 @@
|
|||||||
</div>
|
</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" />
|
<q-icon class="la la-meh q-mr-xs" size="28px" />
|
||||||
Поиск не дал результатов
|
{{ (error ? error : 'Поиск не дал результатов') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -438,6 +438,7 @@ class AuthorList extends BaseList {
|
|||||||
if (this.refreshing)
|
if (this.refreshing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
this.error = '';
|
||||||
this.refreshing = true;
|
this.refreshing = true;
|
||||||
|
|
||||||
(async() => {
|
(async() => {
|
||||||
@@ -467,7 +468,12 @@ class AuthorList extends BaseList {
|
|||||||
this.highlightPageScroller(query);
|
this.highlightPageScroller(query);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} 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 {
|
} finally {
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export default class BaseList {
|
|||||||
genreMap: Object,
|
genreMap: Object,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
error = '';
|
||||||
loadingMessage = '';
|
loadingMessage = '';
|
||||||
loadingMessage2 = '';
|
loadingMessage2 = '';
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
</div>
|
</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" />
|
<q-icon class="la la-meh q-mr-xs" size="28px" />
|
||||||
Поиск не дал результатов
|
{{ (error ? error : 'Поиск не дал результатов') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -74,6 +74,7 @@ class ExtendedList extends BaseList {
|
|||||||
if (this.refreshing)
|
if (this.refreshing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
this.error = '';
|
||||||
this.refreshing = true;
|
this.refreshing = true;
|
||||||
|
|
||||||
(async() => {
|
(async() => {
|
||||||
@@ -103,7 +104,12 @@ class ExtendedList extends BaseList {
|
|||||||
this.highlightPageScroller(query);
|
this.highlightPageScroller(query);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} 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 {
|
} finally {
|
||||||
|
|||||||
@@ -96,9 +96,9 @@
|
|||||||
</div>
|
</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" />
|
<q-icon class="la la-meh q-mr-xs" size="28px" />
|
||||||
Поиск не дал результатов
|
{{ (error ? error : 'Поиск не дал результатов') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -234,6 +234,7 @@ class SeriesList extends BaseList {
|
|||||||
if (this.refreshing)
|
if (this.refreshing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
this.error = '';
|
||||||
this.refreshing = true;
|
this.refreshing = true;
|
||||||
|
|
||||||
(async() => {
|
(async() => {
|
||||||
@@ -263,7 +264,12 @@ class SeriesList extends BaseList {
|
|||||||
this.highlightPageScroller(query);
|
this.highlightPageScroller(query);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} 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 {
|
} finally {
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
</div>
|
</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" />
|
<q-icon class="la la-meh q-mr-xs" size="28px" />
|
||||||
Поиск не дал результатов
|
{{ (error ? error : 'Поиск не дал результатов') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -95,6 +95,7 @@ class TitleList extends BaseList {
|
|||||||
if (this.refreshing)
|
if (this.refreshing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
this.error = '';
|
||||||
this.refreshing = true;
|
this.refreshing = true;
|
||||||
|
|
||||||
(async() => {
|
(async() => {
|
||||||
@@ -124,7 +125,12 @@ class TitleList extends BaseList {
|
|||||||
this.highlightPageScroller(query);
|
this.highlightPageScroller(query);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} 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 {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user