mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
set custom meta title (#1915)
This commit is contained in:
committed by
Aiden McClelland
parent
affab384cf
commit
9c363be16f
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user