From 6cdd41a8f7ee08deadbf801409084ec0ee26a24d Mon Sep 17 00:00:00 2001 From: nymkappa Date: Mon, 28 Feb 2022 17:52:55 +0900 Subject: [PATCH] Add difficulty adjustment table in mining dashboard --- .../hashrate-chart/hashrate-chart.component.html | 13 +++++-------- .../hashrate-chart/hashrate-chart.component.ts | 5 +++-- .../mining-dashboard.component.html | 16 ++++++++++++++-- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html index ea5c5a2a7..9c30a3334 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html @@ -1,6 +1,6 @@
-
+
-
- +
diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts index 7efb83098..db7d79d93 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -22,7 +22,8 @@ import { selectPowerOfTen } from 'src/app/bitcoin.utils'; `], }) export class HashrateChartComponent implements OnInit { - @Input() widget: boolean = false; + @Input() tableOnly = false; + @Input() widget = false; @Input() right: number | string = 45; @Input() left: number | string = 75; @@ -114,7 +115,7 @@ export class HashrateChartComponent implements OnInit { } return { availableTimespanDay: availableTimespanDay, - difficulty: tableData + difficulty: this.tableOnly ? tableData.slice(0, 8) : tableData }; }), ); diff --git a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html index 3652e9e2d..9d0eebe88 100644 --- a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html +++ b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html @@ -44,11 +44,10 @@
- +
+ +
\ No newline at end of file