feat: auth btn in header

This commit is contained in:
2024-07-18 16:35:46 +03:00
parent c427c6d0b4
commit d414223df2
4 changed files with 61 additions and 25 deletions

View File

@@ -1,11 +1,11 @@
import { CommonModule, isPlatformBrowser } from "@angular/common";
import {
AfterViewInit,
Component,
ElementRef,
HostListener,
Inject,
OnDestroy,
OnInit,
PLATFORM_ID,
} from "@angular/core";
import { ActivatedRoute, Router, RouterLink } from "@angular/router";
@@ -23,7 +23,7 @@ import { CachedPage, CachedPages } from "./reader.dto";
standalone: true,
imports: [CommonModule, ScaleImageComponent, RouterLink],
})
export class ReaderComponent implements AfterViewInit, OnDestroy {
export class ReaderComponent implements OnInit, OnDestroy {
//FIXME: Scrolling to top when manhwa
pages: Page[] = [];
currentPageIndex = 0;
@@ -54,7 +54,7 @@ export class ReaderComponent implements AfterViewInit, OnDestroy {
return this.cachedPages.values();
}
ngAfterViewInit(): void {
ngOnInit(): void {
this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((params) => {
const url = params["url"];
const chapter = params["chapter"];