32 lines
780 B
TypeScript
32 lines
780 B
TypeScript
import { Component } from "@angular/core";
|
|
import { RouterModule } from "@angular/router";
|
|
import { AppService } from "./app.service";
|
|
import { HeaderComponent } from "./components/header/header.component";
|
|
import { Datum } from "./services/parsers/rulib/rulib.search.dto";
|
|
|
|
@Component({
|
|
standalone: true,
|
|
imports: [RouterModule, HeaderComponent],
|
|
selector: "app-root",
|
|
templateUrl: "./app.component.html",
|
|
styleUrl: "./app.component.less",
|
|
providers: [AppService],
|
|
})
|
|
export class AppComponent {
|
|
title = "NwaifuAnime";
|
|
items: Datum[] = [];
|
|
constructor(private sw: AppService) {}
|
|
|
|
get hasUpdate() {
|
|
return this.sw.isUpdateAvailable;
|
|
}
|
|
|
|
update() {
|
|
this.sw.update();
|
|
}
|
|
|
|
get serviceWorkerEnabled() {
|
|
return this.sw.serviceWorkerEnabled;
|
|
}
|
|
}
|