From 6b61403843e70735a56b2129288e7427f1d1994c Mon Sep 17 00:00:00 2001 From: Volha Mardvilka Date: Thu, 7 Mar 2024 14:50:06 +0000 Subject: [PATCH] 326193923: (fix) change to prevent the callout for step 1 blinks on loading/reloading the page --- modules/ui/src/app/app.component.ts | 12 ++---------- .../pages/devices/device-repository.component.html | 2 +- modules/ui/src/app/store/state.ts | 4 ++-- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/modules/ui/src/app/app.component.ts b/modules/ui/src/app/app.component.ts index 4b75aa5b4..c8b6d8a0b 100644 --- a/modules/ui/src/app/app.component.ts +++ b/modules/ui/src/app/app.component.ts @@ -114,19 +114,11 @@ export class AppComponent implements OnInit { ngOnInit(): void { this.systemStatus$ = this.testRunService.systemStatus$.pipe( - tap(() => (this.isStatusLoaded = true)) + tap(() => (this.isStatusLoaded = true)), + shareReplay({ refCount: true, bufferSize: 1 }) ); this.isTestrunStarted$ = this.testRunService.isTestrunStarted$; - - this.hasConnectionSetting$.pipe( - tap(result => { - if (result !== null) { - this.isConnectionSettingsLoaded = true; - } - }), - shareReplay({ refCount: true, bufferSize: 1 }) - ); } navigateToDeviceRepository(): void { diff --git a/modules/ui/src/app/pages/devices/device-repository.component.html b/modules/ui/src/app/pages/devices/device-repository.component.html index 8979bc3b7..efd61fc2e 100644 --- a/modules/ui/src/app/pages/devices/device-repository.component.html +++ b/modules/ui/src/app/pages/devices/device-repository.component.html @@ -16,7 +16,7 @@ -

Devices {{ vm.selectedDevice === null }}

+

Devices

diff --git a/modules/ui/src/app/store/state.ts b/modules/ui/src/app/store/state.ts index 76fe5132d..e8b98ad6a 100644 --- a/modules/ui/src/app/store/state.ts +++ b/modules/ui/src/app/store/state.ts @@ -43,7 +43,7 @@ export interface SharedState { //app, testrun isTestrunStarted?: boolean; //app, settings - hasConnectionSettings: boolean; + hasConnectionSettings: boolean | null; // app, devices isOpenAddDevice: boolean; } @@ -58,7 +58,7 @@ export const initialAppComponentState: AppComponentState = { }; export const initialSharedState: SharedState = { - hasConnectionSettings: false, + hasConnectionSettings: null, isOpenAddDevice: false, hasDevices: false, devices: [],