feat: error in reader without auth
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
.tamperMonkey {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -72,13 +72,19 @@ export class ReaderComponent implements AfterViewInit, OnDestroy {
|
|||||||
this.searchService
|
this.searchService
|
||||||
.getChapter(url, chapter, volume)
|
.getChapter(url, chapter, volume)
|
||||||
.pipe(takeUntil(this.destroy$))
|
.pipe(takeUntil(this.destroy$))
|
||||||
.subscribe((data) => {
|
.subscribe({
|
||||||
this.currentChapterInfo = data.data;
|
next: (data) => {
|
||||||
this.pages = data.data.pages;
|
this.currentChapterInfo = data.data;
|
||||||
if (this.fromTowards) {
|
this.pages = data.data.pages;
|
||||||
this.currentPageIndex = this.pages.length - 1;
|
if (this.fromTowards) {
|
||||||
this.loadPage(this.pages.length - 1); // Загрузить последнюю страницу при открытии главы
|
this.currentPageIndex = this.pages.length - 1;
|
||||||
} else this.loadPage(0); // Загрузить первую страницу при открытии главы
|
this.loadPage(this.pages.length - 1); // Загрузить последнюю страницу при открытии главы
|
||||||
|
} else this.loadPage(0); // Загрузить первую страницу при открытии главы
|
||||||
|
},
|
||||||
|
error: (error) => {
|
||||||
|
console.log(error);
|
||||||
|
this.router.navigate(["/", "detail"], { queryParams: { url: this.url } });
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user