mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-10-12 16:05:21 -04:00
27 lines
863 B
TypeScript
27 lines
863 B
TypeScript
import { Component, inject, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
|
import { RouterOutlet } from '@angular/router';
|
|
import { ThemeService } from '@core/services/theme.service';
|
|
import { AuthService } from '@core/auth/auth.service';
|
|
import { ToastContainerComponent, ConfirmDialogComponent } from '@ui';
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
standalone: true,
|
|
imports: [RouterOutlet, ToastContainerComponent, ConfirmDialogComponent],
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
template: `
|
|
<router-outlet />
|
|
<app-toast-container />
|
|
<app-confirm-dialog />
|
|
`,
|
|
})
|
|
export class App implements OnInit {
|
|
// Inject ThemeService eagerly so it binds theme to DOM on startup
|
|
private themeService = inject(ThemeService);
|
|
private auth = inject(AuthService);
|
|
|
|
ngOnInit(): void {
|
|
this.auth.checkStatus().subscribe();
|
|
}
|
|
}
|