feat: manhwa scroll and cache pages rework
This commit is contained in:
@@ -11,17 +11,21 @@
|
||||
<h3>{{ currentChapterInfo?.number }}. {{ currentChapterInfo?.name || "Нет названия" }}</h3>
|
||||
</div>
|
||||
<div class="flex flex-col items-center">
|
||||
@if (pages.length > 0 && cachedPages.get(currentPageIndex)) {
|
||||
@if (pages.length > 0 && currentPage) {
|
||||
<div [class]="imageContainerClass">
|
||||
@if (!isManhwa) {
|
||||
<app-scale-image [imageSrc]="imageUrl"></app-scale-image>
|
||||
<app-scale-image [imageSrc]="currentPage.imageUrl"></app-scale-image>
|
||||
} @else {
|
||||
@for (page of manhwaPages; track page.id) {
|
||||
<app-scale-image [imageSrc]="page.imageUrl"></app-scale-image>
|
||||
<app-scale-image
|
||||
[imageSrc]="page.imageUrl"
|
||||
[host]="host"
|
||||
(view)="loadPage(page.index)"
|
||||
[hostScrollable]="isHostScrollable()"
|
||||
></app-scale-image>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div #anchor></div>
|
||||
<div class="flex items-center justify-center space-x-4 my-10">
|
||||
<button (click)="prevPage()" class="p-3 text-white bg-slate-600 w-[100px] rounded-lg">
|
||||
←
|
||||
|
||||
Reference in New Issue
Block a user