From c9598a23ea3e8170f872b2c0c13a6964059076e5 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Thu, 3 Dec 2020 14:09:48 +0200 Subject: [PATCH] UI: Introduce initial page loading spinner --- ui-ngx/src/app/app.component.html | 2 +- ui-ngx/src/app/app.component.ts | 10 +++- ui-ngx/src/index.html | 76 ++++++++++++++++++++++++++++++- 3 files changed, 84 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/app.component.html b/ui-ngx/src/app/app.component.html index 6521e99533..7330d0c1c1 100644 --- a/ui-ngx/src/app/app.component.html +++ b/ui-ngx/src/app/app.component.html @@ -17,4 +17,4 @@ --> - + diff --git a/ui-ngx/src/app/app.component.ts b/ui-ngx/src/app/app.component.ts index f7d290c5ca..ac3512694e 100644 --- a/ui-ngx/src/app/app.component.ts +++ b/ui-ngx/src/app/app.component.ts @@ -62,7 +62,7 @@ export class AppComponent implements OnInit { this.matIconRegistry.addSvgIconLiteral( 'alpha-e-circle-outline', this.domSanitizer.bypassSecurityTrustHtml( - '' ) @@ -124,5 +124,11 @@ export class AppComponent implements OnInit { ngOnInit() { } -} + onActivateComponent($event: any) { + const loadingElement = $('div#tb-loading-spinner'); + if (loadingElement.length) { + loadingElement.remove(); + } + } +} diff --git a/ui-ngx/src/index.html b/ui-ngx/src/index.html index af49c0c938..f569c054e4 100644 --- a/ui-ngx/src/index.html +++ b/ui-ngx/src/index.html @@ -16,7 +16,7 @@ --> - + ThingsBoard @@ -24,8 +24,82 @@ + +
+
+
+
+