pwa
This commit is contained in:
@@ -10,6 +10,8 @@ import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { map } from 'rxjs';
|
||||
import { AuthService } from './auth/auth.service';
|
||||
import { AssistantChatComponent } from './assistant/assistant-chat.component';
|
||||
import { OfflineSyncService } from './offline/offline-sync.service';
|
||||
import { OnlineStatusService } from './offline/online-status.service';
|
||||
import { OnboardingOverlayComponent } from './onboarding/onboarding-overlay.component';
|
||||
|
||||
@Component({
|
||||
@@ -32,6 +34,8 @@ import { OnboardingOverlayComponent } from './onboarding/onboarding-overlay.comp
|
||||
export class App implements OnInit {
|
||||
protected readonly auth = inject(AuthService);
|
||||
private readonly breakpointObserver = inject(BreakpointObserver);
|
||||
protected readonly offlineSync = inject(OfflineSyncService);
|
||||
protected readonly onlineStatus = inject(OnlineStatusService);
|
||||
|
||||
protected readonly isCompact = toSignal(
|
||||
this.breakpointObserver.observe('(max-width: 800px)').pipe(map((state) => state.matches)),
|
||||
@@ -43,6 +47,8 @@ export class App implements OnInit {
|
||||
if (this.auth.isAuthenticated()) {
|
||||
this.auth.loadCurrentUser().subscribe({ error: () => undefined });
|
||||
}
|
||||
|
||||
void this.offlineSync.syncNow();
|
||||
}
|
||||
|
||||
protected toggleSidebar(): void {
|
||||
|
||||
Reference in New Issue
Block a user