From 46ecd2a51f6d157a805ab52161c869bc4a514f4b Mon Sep 17 00:00:00 2001 From: natsoni Date: Fri, 2 Aug 2024 16:53:34 +0200 Subject: [PATCH] Fix accelerator skeleton loader --- .../accelerations-list.component.html | 63 +++++++++++++------ .../accelerations-list.component.ts | 2 + 2 files changed, 46 insertions(+), 19 deletions(-) diff --git a/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.html b/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.html index f51cf247b..5bbde41c4 100644 --- a/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.html +++ b/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.html @@ -4,8 +4,8 @@
-
- +
+
@@ -21,7 +21,7 @@ - + - - - - - - - - + @if (!pending) { + + + + + + + + + + + } @else { + + + + + + + + + }
TXID Requested
@@ -73,22 +73,47 @@
- - - - - - - -
+ + + + + + + + + + + +
+ + + + + + + +
diff --git a/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.ts b/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.ts index 46628bde9..9aa7fad46 100644 --- a/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.ts +++ b/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.ts @@ -32,6 +32,7 @@ export class AccelerationsListComponent implements OnInit, OnDestroy { dir: 'rtl' | 'ltr' = 'ltr'; paramSubscription: Subscription; pools: { [id: number]: SinglePoolStats } = {}; + nonEmptyAccelerations: boolean = true; constructor( private servicesApiService: ServicesApiServices, @@ -115,6 +116,7 @@ export class AccelerationsListComponent implements OnInit, OnDestroy { for (const acc of accelerations) { acc.boost = acc.boostCost != null ? acc.boostCost : acc.bidBoost; } + this.nonEmptyAccelerations = accelerations.length > 0; if (this.widget) { return of(accelerations.slice(0, 6)); } else {