Небольшие улучшения
This commit is contained in:
@@ -150,6 +150,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Формирование списка конец ------------------------------------------------------------------>
|
<!-- Формирование списка конец ------------------------------------------------------------------>
|
||||||
|
|
||||||
|
<div v-show="hiddenCount" class="q-ml-lg q-py-sm clickable2 text-red" style="font-size: 120%" @click="showHiddenHelp">
|
||||||
|
+{{ hiddenCount }} результатов скрыты
|
||||||
|
</div>
|
||||||
<div class="row justify-center">
|
<div class="row justify-center">
|
||||||
<PageScroller v-show="pageCount > 1" v-model="search.page" :page-count="pageCount" />
|
<PageScroller v-show="pageCount > 1" v-model="search.page" :page-count="pageCount" />
|
||||||
</div>
|
</div>
|
||||||
@@ -304,6 +307,7 @@ class Search {
|
|||||||
langList = [];
|
langList = [];
|
||||||
genreTreeInpxHash = '';
|
genreTreeInpxHash = '';
|
||||||
cachedAuthors = {};
|
cachedAuthors = {};
|
||||||
|
hiddenCount = 0;
|
||||||
|
|
||||||
limitOptions = [
|
limitOptions = [
|
||||||
{label: '10', value: 10},
|
{label: '10', value: 10},
|
||||||
@@ -396,6 +400,12 @@ class Search {
|
|||||||
`, 'Подсказка', {iconName: 'la la-info-circle'});
|
`, 'Подсказка', {iconName: 'la la-info-circle'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showHiddenHelp() {
|
||||||
|
this.$root.stdDialog.alert(`
|
||||||
|
Книги этих авторов помечены как удаленные. Для того, чтобы их увидеть, необходимо установить опцию "Показывать удаленные" в настройках.
|
||||||
|
`, 'Пояснение', {iconName: 'la la-info-circle'});
|
||||||
|
}
|
||||||
|
|
||||||
showCollectionInfo() {
|
showCollectionInfo() {
|
||||||
this.$root.stdDialog.alert(`
|
this.$root.stdDialog.alert(`
|
||||||
<p>
|
<p>
|
||||||
@@ -508,19 +518,13 @@ class Search {
|
|||||||
|
|
||||||
getBookCount(item) {
|
getBookCount(item) {
|
||||||
let result = '';
|
let result = '';
|
||||||
if (!this.showCounts || item.bookCount === undefined)
|
if (!this.showCounts || item.count === undefined)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if (this.showDeleted) {
|
|
||||||
result = item.bookCount + item.bookDelCount;
|
|
||||||
} else {
|
|
||||||
result = item.bookCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.books)
|
if (item.books)
|
||||||
result = `${item.books.length}/${result}`;
|
result = `${item.books.length}/${item.count}`;
|
||||||
else
|
else
|
||||||
result = `#/${result}`;
|
result = `#/${item.count}`;
|
||||||
|
|
||||||
return `(${result})`;
|
return `(${result})`;
|
||||||
}
|
}
|
||||||
@@ -713,16 +717,22 @@ class Search {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
let num = 0;
|
let num = 0;
|
||||||
|
this.hiddenCount = 0;
|
||||||
for (const rec of authors) {
|
for (const rec of authors) {
|
||||||
this.cachedAuthors[rec.author] = rec;
|
this.cachedAuthors[rec.author] = rec;
|
||||||
|
|
||||||
|
const count = (this.showDeleted ? rec.bookCount + rec.bookDelCount : rec.bookCount);
|
||||||
|
if (!count) {
|
||||||
|
this.hiddenCount++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const item = reactive({
|
const item = reactive({
|
||||||
key: rec.id,
|
key: rec.id,
|
||||||
num,
|
num,
|
||||||
author: rec.author,
|
author: rec.author,
|
||||||
name: rec.author.replace(/,/g, ', '),
|
name: rec.author.replace(/,/g, ', '),
|
||||||
bookCount: rec.bookCount,
|
count,
|
||||||
bookDelCount: rec.bookDelCount,
|
|
||||||
book: false,
|
book: false,
|
||||||
});
|
});
|
||||||
num++;
|
num++;
|
||||||
|
|||||||
Reference in New Issue
Block a user