mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
* refactor(patch-db): use PatchDB class declaratively * chore: remove initial source before init * chore: show spinner * fix: show Connecting to Embassy spinner until first connection * fix: switching marketplaces * allow for subscription to end with take when installing a package * update patchdb Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
30 lines
867 B
TypeScript
30 lines
867 B
TypeScript
import { Component, Inject, OnDestroy } from '@angular/core'
|
|
import { AuthService } from './services/auth.service'
|
|
import { SplitPaneTracker } from './services/split-pane.service'
|
|
import { merge, Observable } from 'rxjs'
|
|
import { GLOBAL_SERVICE } from './app/global/global.module'
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: 'app.component.html',
|
|
styleUrls: ['app.component.scss'],
|
|
})
|
|
export class AppComponent implements OnDestroy {
|
|
readonly subscription = merge(...this.services).subscribe()
|
|
|
|
constructor(
|
|
@Inject(GLOBAL_SERVICE)
|
|
private readonly services: readonly Observable<unknown>[],
|
|
readonly authService: AuthService,
|
|
private readonly splitPane: SplitPaneTracker,
|
|
) {}
|
|
|
|
splitPaneVisible({ detail }: any) {
|
|
this.splitPane.sidebarOpen$.next(detail.visible)
|
|
}
|
|
|
|
ngOnDestroy() {
|
|
this.subscription.unsubscribe()
|
|
}
|
|
}
|