From 9e64592acaea9d004832508573a5bfb0f5ecfad7 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Fri, 11 Feb 2022 18:29:38 +0900 Subject: [PATCH] Add mining pool logo in the pool stats page --- frontend/src/app/components/pool/pool.component.html | 3 ++- frontend/src/app/components/pool/pool.component.ts | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/components/pool/pool.component.html b/frontend/src/app/components/pool/pool.component.html index 08e742eb9..90bbc0ffc 100644 --- a/frontend/src/app/components/pool/pool.component.html +++ b/frontend/src/app/components/pool/pool.component.html @@ -1,7 +1,8 @@
-

+

+ {{ poolStats.pool.name }}

diff --git a/frontend/src/app/components/pool/pool.component.ts b/frontend/src/app/components/pool/pool.component.ts index a89c9a7b4..69b3ac761 100644 --- a/frontend/src/app/components/pool/pool.component.ts +++ b/frontend/src/app/components/pool/pool.component.ts @@ -48,6 +48,11 @@ export class PoolComponent implements OnInit { } return this.apiService.getPoolStats$(this.poolId, params[1] ?? '1w'); }), + map((poolStats) => { + return Object.assign({ + logo: `./resources/mining-pools/` + poolStats.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg' + }, poolStats); + }) ); this.blocks$ = this.fromHeightSubject