set custom meta title (#1915)

This commit is contained in:
Matt Hill
2022-11-09 09:22:43 -07:00
committed by Aiden McClelland
parent affab384cf
commit 9c363be16f

View File

@@ -1,10 +1,12 @@
import { Component, OnDestroy } from '@angular/core'
import { merge } from 'rxjs'
import { merge, take } from 'rxjs'
import { AuthService } from './services/auth.service'
import { SplitPaneTracker } from './services/split-pane.service'
import { PatchDataService } from './services/patch-data.service'
import { PatchMonitorService } from './services/patch-monitor.service'
import { ConnectionService } from './services/connection.service'
import { Title } from '@angular/platform-browser'
import { ServerNameService } from './services/server-name.service'
@Component({
selector: 'app-root',
@@ -16,13 +18,21 @@ export class AppComponent implements OnDestroy {
readonly sidebarOpen$ = this.splitPane.sidebarOpen$
constructor(
private readonly titleService: Title,
private readonly patchData: PatchDataService,
private readonly patchMonitor: PatchMonitorService,
private readonly splitPane: SplitPaneTracker,
private readonly serverNameService: ServerNameService,
readonly authService: AuthService,
readonly connection: ConnectionService,
) {}
ngOnInit() {
this.serverNameService.name$
.pipe(take(1))
.subscribe(({ current }) => this.titleService.setTitle(current))
}
splitPaneVisible({ detail }: any) {
this.splitPane.sidebarOpen$.next(detail.visible)
}