|
1 | 1 | import { BreakpointObserver, BreakpointState } from '@angular/cdk/layout';
|
2 |
| -import { Component, DestroyRef, OnDestroy, OnInit } from '@angular/core'; |
| 2 | +import { DOCUMENT } from '@angular/common'; |
| 3 | +import { Component, DestroyRef, Inject, OnDestroy, OnInit } from '@angular/core'; |
| 4 | +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
3 | 5 | import { NavigationEnd, Router } from '@angular/router';
|
4 | 6 | import Bugsnag from '@bugsnag/js';
|
5 | 7 | import { translate } from '@ngneat/transloco';
|
@@ -31,11 +33,10 @@ import {
|
31 | 33 | BrowserIssue,
|
32 | 34 | SupportedBrowsersDialogComponent
|
33 | 35 | } from 'xforge-common/supported-browsers-dialog/supported-browsers-dialog.component';
|
| 36 | +import { ThemeService } from 'xforge-common/theme.service'; |
34 | 37 | import { UserService } from 'xforge-common/user.service';
|
35 | 38 | import { quietTakeUntilDestroyed } from 'xforge-common/util/rxjs-util';
|
36 | 39 | import { issuesEmailTemplate, supportedBrowser } from 'xforge-common/utils';
|
37 |
| -import { ThemeService } from 'xforge-common/theme.service'; |
38 |
| -import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
39 | 40 | import versionData from '../../../version.json';
|
40 | 41 | import { environment } from '../environments/environment';
|
41 | 42 | import { SFProjectProfileDoc } from './core/models/sf-project-profile-doc';
|
@@ -73,6 +74,7 @@ export class AppComponent extends DataLoadingComponent implements OnInit, OnDest
|
73 | 74 | constructor(
|
74 | 75 | private readonly router: Router,
|
75 | 76 | private readonly authService: AuthService,
|
| 77 | + @Inject(DOCUMENT) private readonly document: Document, |
76 | 78 | private readonly userService: UserService,
|
77 | 79 | private readonly projectService: SFProjectService,
|
78 | 80 | private readonly dialogService: DialogService,
|
@@ -237,6 +239,7 @@ export class AppComponent extends DataLoadingComponent implements OnInit, OnDest
|
237 | 239 |
|
238 | 240 | async ngOnInit(): Promise<void> {
|
239 | 241 | await this.authService.loggedIn;
|
| 242 | + this.document.title = environment.siteName; |
240 | 243 | this.featureFlags.darkMode.enabled$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(enabled => {
|
241 | 244 | this.themeService.setDarkMode(enabled);
|
242 | 245 | });
|
|
0 commit comments