mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
* feat: remove ionic storage * grayscal when disconncted, rename local storage service for clarity * remove storage from package lock * update patchDB Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { Component, OnDestroy } from '@angular/core'
|
|
import { merge } 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'
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: 'app.component.html',
|
|
styleUrls: ['app.component.scss'],
|
|
})
|
|
export class AppComponent implements OnDestroy {
|
|
readonly subscription = merge(this.patchData, this.patchMonitor).subscribe()
|
|
readonly sidebarOpen$ = this.splitPane.sidebarOpen$
|
|
|
|
constructor(
|
|
private readonly patchData: PatchDataService,
|
|
private readonly patchMonitor: PatchMonitorService,
|
|
private readonly splitPane: SplitPaneTracker,
|
|
readonly authService: AuthService,
|
|
readonly connection: ConnectionService,
|
|
) {}
|
|
|
|
splitPaneVisible({ detail }: any) {
|
|
this.splitPane.sidebarOpen$.next(detail.visible)
|
|
}
|
|
|
|
ngOnDestroy() {
|
|
this.subscription.unsubscribe()
|
|
}
|
|
}
|