From d536d63d69a1b0534b669879d2ae20a24aecf7f0 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Tue, 6 Sep 2022 11:01:46 +0200 Subject: [PATCH] Add skeleton loader in node per isp/country lists --- .../nodes-per-country.component.html | 30 ++++++++++++++++++- .../nodes-per-country.component.ts | 8 ++++- .../nodes-per-isp.component.html | 30 ++++++++++++++++++- .../nodes-per-isp/nodes-per-isp.component.ts | 8 ++++- 4 files changed, 72 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.html b/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.html index 16f4265a2..b4658a708 100644 --- a/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.html +++ b/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.html @@ -6,6 +6,7 @@
+ @@ -14,7 +15,8 @@ - + + + + + + + + + + + + + + + +
Alias First seenChannels City
{{ node.alias }} @@ -39,6 +41,32 @@
+ + + + + + + + + + + +
diff --git a/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.ts b/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.ts index 644e6741a..e0bf5eb66 100644 --- a/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.ts +++ b/frontend/src/app/lightning/nodes-per-country/nodes-per-country.component.ts @@ -16,11 +16,17 @@ export class NodesPerCountry implements OnInit { nodes$: Observable; country: {name: string, flag: string}; + skeletonLines: number[] = []; + constructor( private apiService: ApiService, private seoService: SeoService, private route: ActivatedRoute, - ) { } + ) { + for (let i = 0; i < 20; ++i) { + this.skeletonLines.push(i); + } + } ngOnInit(): void { this.nodes$ = this.apiService.getNodeForCountry$(this.route.snapshot.params.country) diff --git a/frontend/src/app/lightning/nodes-per-isp/nodes-per-isp.component.html b/frontend/src/app/lightning/nodes-per-isp/nodes-per-isp.component.html index a8931d843..d27126fd2 100644 --- a/frontend/src/app/lightning/nodes-per-isp/nodes-per-isp.component.html +++ b/frontend/src/app/lightning/nodes-per-isp/nodes-per-isp.component.html @@ -3,6 +3,7 @@
+ @@ -11,7 +12,8 @@ - + + + + + + + + + + + + + + + +
Alias First seenChannels City
{{ node.alias }} @@ -36,6 +38,32 @@
+ + + + + + + + + + + +
diff --git a/frontend/src/app/lightning/nodes-per-isp/nodes-per-isp.component.ts b/frontend/src/app/lightning/nodes-per-isp/nodes-per-isp.component.ts index cc57056fc..f7edf783a 100644 --- a/frontend/src/app/lightning/nodes-per-isp/nodes-per-isp.component.ts +++ b/frontend/src/app/lightning/nodes-per-isp/nodes-per-isp.component.ts @@ -15,11 +15,17 @@ export class NodesPerISP implements OnInit { nodes$: Observable; isp: {name: string, id: number}; + skeletonLines: number[] = []; + constructor( private apiService: ApiService, private seoService: SeoService, private route: ActivatedRoute, - ) { } + ) { + for (let i = 0; i < 20; ++i) { + this.skeletonLines.push(i); + } + } ngOnInit(): void { this.nodes$ = this.apiService.getNodeForISP$(this.route.snapshot.params.isp)