diff --git a/apps/NwaifuAnime/src/app/components/header/header.component.html b/apps/NwaifuAnime/src/app/components/header/header.component.html index 331e5ec..bd36f65 100644 --- a/apps/NwaifuAnime/src/app/components/header/header.component.html +++ b/apps/NwaifuAnime/src/app/components/header/header.component.html @@ -1,28 +1,64 @@
-
-

NwaifuAnime

+
+
+

NwaifuAnime

+
+ +
+ -
- -
- - +
+
- Поиск - +

Auth

+
diff --git a/apps/NwaifuAnime/src/app/components/header/header.component.ts b/apps/NwaifuAnime/src/app/components/header/header.component.ts index a04e6bf..153e191 100644 --- a/apps/NwaifuAnime/src/app/components/header/header.component.ts +++ b/apps/NwaifuAnime/src/app/components/header/header.component.ts @@ -1,6 +1,6 @@ import { CommonModule } from "@angular/common"; import { AfterViewInit, Component, ElementRef, OnDestroy, ViewChild } from "@angular/core"; -import { ActivatedRoute, NavigationEnd, Router } from "@angular/router"; +import { ActivatedRoute, NavigationEnd, Router, RouterLink } from "@angular/router"; import { Subject, filter, takeUntil } from "rxjs"; @Component({ @@ -8,7 +8,7 @@ import { Subject, filter, takeUntil } from "rxjs"; templateUrl: "./header.component.html", styleUrls: ["./header.component.less"], standalone: true, - imports: [CommonModule], + imports: [CommonModule, RouterLink], }) export class HeaderComponent implements AfterViewInit, OnDestroy { @ViewChild("searchInput") searchInput: ElementRef | null = null; @@ -37,7 +37,7 @@ export class HeaderComponent implements AfterViewInit, OnDestroy { } get searchBarClass(): string { - return `search-bar bg-slate-300 md:w-[50%] w-full md:m-0 ms-2 me-2 md:h-6 h-10 md:flex justify-start flex-row items-center rounded-md ${this.menuOpened ? "flex" : "hidden"}`; + return `search-bar bg-slate-300 md:w-full w-full md:m-0 ms-2 me-2 md:h-6 h-10 md:flex justify-start flex-row items-center rounded-md ${this.menuOpened ? "flex" : "hidden"}`; } search() { diff --git a/apps/NwaifuAnime/src/app/components/reader/reader.component.ts b/apps/NwaifuAnime/src/app/components/reader/reader.component.ts index bfcaa9b..69a36c4 100644 --- a/apps/NwaifuAnime/src/app/components/reader/reader.component.ts +++ b/apps/NwaifuAnime/src/app/components/reader/reader.component.ts @@ -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"]; diff --git a/apps/NwaifuAnime/src/app/components/scale-image/scale-image.component.ts b/apps/NwaifuAnime/src/app/components/scale-image/scale-image.component.ts index 53b5315..bde9152 100644 --- a/apps/NwaifuAnime/src/app/components/scale-image/scale-image.component.ts +++ b/apps/NwaifuAnime/src/app/components/scale-image/scale-image.component.ts @@ -34,7 +34,7 @@ export class ScaleImageComponent implements AfterViewInit, OnDestroy { ([entry]) => entry.isIntersecting && this.view.emit(), { root: this.hostScrollable ? this.host.nativeElement : null, - rootMargin: "1000px", + rootMargin: "700px", }, ); if (this.containerRef) this.observer.observe(this.containerRef.nativeElement);