mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
show connection bar right away (#1849)
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
import { Component } from '@angular/core'
|
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
||||||
import { combineLatest, map, Observable } from 'rxjs'
|
import { combineLatest, map, Observable, startWith } from 'rxjs'
|
||||||
import { ConnectionService } from 'src/app/services/connection.service'
|
import { ConnectionService } from 'src/app/services/connection.service'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'connection-bar',
|
selector: 'connection-bar',
|
||||||
templateUrl: './connection-bar.component.html',
|
templateUrl: './connection-bar.component.html',
|
||||||
styleUrls: ['./connection-bar.component.scss'],
|
styleUrls: ['./connection-bar.component.scss'],
|
||||||
// changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class ConnectionBarComponent {
|
export class ConnectionBarComponent {
|
||||||
private readonly websocket$ = this.connectionService.websocketConnected$
|
private readonly websocket$ = this.connectionService.websocketConnected$
|
||||||
@@ -19,7 +19,7 @@ export class ConnectionBarComponent {
|
|||||||
dots: boolean
|
dots: boolean
|
||||||
}> = combineLatest([
|
}> = combineLatest([
|
||||||
this.connectionService.networkConnected$,
|
this.connectionService.networkConnected$,
|
||||||
this.websocket$,
|
this.websocket$.pipe(startWith(false)),
|
||||||
]).pipe(
|
]).pipe(
|
||||||
map(([network, websocket]) => {
|
map(([network, websocket]) => {
|
||||||
if (!network)
|
if (!network)
|
||||||
|
|||||||
2
patch-db
2
patch-db
Submodule patch-db updated: 00564ca1ca...1eba576ac1
Reference in New Issue
Block a user