From 7481e27ec2c8e318ff6050aff1dab17af4f9e16f Mon Sep 17 00:00:00 2001 From: nymkappa Date: Thu, 17 Mar 2022 17:50:19 +0100 Subject: [PATCH 1/2] If mining dashboard is enabled, opens /mining/blocks instead of /blocks --- frontend/src/app/dashboard/dashboard.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html index a871f6141..3e0dcf938 100644 --- a/frontend/src/app/dashboard/dashboard.component.html +++ b/frontend/src/app/dashboard/dashboard.component.html @@ -128,7 +128,7 @@ -
View all »
+
View all »
From a7900f6466ee5477f22c232676310d3c37363e1c Mon Sep 17 00:00:00 2001 From: nymkappa Date: Thu, 17 Mar 2022 18:17:22 +0100 Subject: [PATCH 2/2] If mining dashboard is enabled, shows pools instead of timestamp --- .../blocks-list/blocks-list.component.html | 2 +- frontend/src/app/dashboard/dashboard.component.html | 12 ++++++++++-- frontend/src/app/dashboard/dashboard.component.scss | 10 ++++++++++ frontend/src/app/dashboard/dashboard.component.ts | 9 +++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/blocks-list/blocks-list.component.html b/frontend/src/app/components/blocks-list/blocks-list.component.html index e71ad7817..d0eaa25ea 100644 --- a/frontend/src/app/components/blocks-list/blocks-list.component.html +++ b/frontend/src/app/components/blocks-list/blocks-list.component.html @@ -7,7 +7,7 @@ - diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html index 3e0dcf938..3a028adc8 100644 --- a/frontend/src/app/dashboard/dashboard.component.html +++ b/frontend/src/app/dashboard/dashboard.component.html @@ -110,14 +110,22 @@
Height + Pool Timestamp Mined
- + + - + +
HeightMinedMinedPool TXs Size
{{ block.height }} + + + {{ block.extras.pool.name }} + + {{ block.tx_count | number }}
diff --git a/frontend/src/app/dashboard/dashboard.component.scss b/frontend/src/app/dashboard/dashboard.component.scss index 6fb2ee125..65d68f122 100644 --- a/frontend/src/app/dashboard/dashboard.component.scss +++ b/frontend/src/app/dashboard/dashboard.component.scss @@ -305,3 +305,13 @@ width: 100%; vertical-align: middle; } + +.clear-link { + color: white; +} + +.pool-name { + display: inline-block; + vertical-align: text-top; + padding-left: 10px; +} diff --git a/frontend/src/app/dashboard/dashboard.component.ts b/frontend/src/app/dashboard/dashboard.component.ts index 610f45765..910d6a81a 100644 --- a/frontend/src/app/dashboard/dashboard.component.ts +++ b/frontend/src/app/dashboard/dashboard.component.ts @@ -149,6 +149,15 @@ export class DashboardComponent implements OnInit { } acc.unshift(block); acc = acc.slice(0, 6); + + if (this.stateService.env.MINING_DASHBOARD === true) { + for (const block of acc) { + // @ts-ignore: Need to add an extra field for the template + block.extras.pool.logo = `./resources/mining-pools/` + + block.extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg'; + } + } + return acc; }, []), );