diff --git a/apps/NwaifuAnime/src/app/components/header/header.component.ts b/apps/NwaifuAnime/src/app/components/header/header.component.ts index 153e191..7414b81 100644 --- a/apps/NwaifuAnime/src/app/components/header/header.component.ts +++ b/apps/NwaifuAnime/src/app/components/header/header.component.ts @@ -19,12 +19,18 @@ export class HeaderComponent implements AfterViewInit, OnDestroy { private route: ActivatedRoute, ) { this.router.events - .pipe(filter((event) => event instanceof NavigationEnd)) - .pipe(takeUntil(this.destroy$)) + .pipe( + filter((event) => event instanceof NavigationEnd), + takeUntil(this.destroy$), + ) // eslint-disable-next-line @typescript-eslint/no-explicit-any .subscribe((val: any) => { if (val.url.startsWith("/detail") || val.url.startsWith("/reader")) { this.menuOpened = false; + } else if (val.url === "/") { + if (this.searchInput) { + this.searchInput.nativeElement.value = ""; + } } }); } diff --git a/apps/NwaifuAnime/src/app/components/home/home.component.html b/apps/NwaifuAnime/src/app/components/home/home.component.html index fa4a2c1..f4e7041 100644 --- a/apps/NwaifuAnime/src/app/components/home/home.component.html +++ b/apps/NwaifuAnime/src/app/components/home/home.component.html @@ -42,12 +42,14 @@ title="{{ item.name }}" class="mb-6 max-w-[700px] w-full" > -
+

{{ item.rus_name }}

diff --git a/apps/NwaifuAnime/src/app/services/parsers/rulib/lib.social.parser.service.ts b/apps/NwaifuAnime/src/app/services/parsers/rulib/lib.social.parser.service.ts index 42857ba..788615e 100644 --- a/apps/NwaifuAnime/src/app/services/parsers/rulib/lib.social.parser.service.ts +++ b/apps/NwaifuAnime/src/app/services/parsers/rulib/lib.social.parser.service.ts @@ -9,7 +9,6 @@ import { IRulibDetailResult } from "./rulib.detail.dto"; import { IRuLIBPopular } from "./rulib.popular.dto"; import { IRulibSearchResult } from "./rulib.search.dto"; -//TODO: Make abstract classes @Injectable({ providedIn: "root", }) @@ -102,7 +101,7 @@ export class LibSocialParserService extends Parser { getPopular(): Observable { return this.http - .get<{ data: { popular: [] } }>(`${this.url}/api/`, { + .get<{ data: { popular: IRuLIBPopular[] } }>(`${this.url}/api/`, { headers: { Authorization: "Bearer " + this.rulibAuthService.getToken(), "Site-Id": this.site_id, @@ -110,7 +109,7 @@ export class LibSocialParserService extends Parser { }) .pipe( map((data) => { - const res = data.data.popular as IRuLIBPopular[]; + const res = data.data.popular; return res; }), catchError((error) => throwError(() => `Now found ${error}`)),