Добавлено отображение общего количества книг в серии, без ее раскрытия

This commit is contained in:
Book Pauk
2022-11-28 16:58:32 +07:00
parent af575a87a2
commit 80b21371a4
6 changed files with 110 additions and 6 deletions

View File

@@ -259,6 +259,29 @@ export default class BaseList {
}
}
async loadAuthorSeries(authorId) {
try {
let result;
if (this.abCacheEnabled) {
const key = `author-${authorId}-series-${this.list.inpxHash}`;
const data = await authorBooksStorage.getData(key);
if (data) {
result = JSON.parse(data);
} else {
result = await this.api.getAuthorSeriesList(authorId);
await authorBooksStorage.setData(key, JSON.stringify(result));
}
} else {
result = await this.api.getAuthorSeriesList(authorId);
}
return result.series;
} catch (e) {
this.$root.stdDialog.alert(e.message, 'Ошибка');
}
}
async loadSeriesBooks(series) {
try {
let result;