From 8f9804a9960c0616635a9f3f11cbc36ff9a8856b Mon Sep 17 00:00:00 2001 From: nymkappa Date: Thu, 17 Feb 2022 10:29:01 +0900 Subject: [PATCH] Fix pools ranking titles --- .../pool-ranking/pool-ranking.component.html | 1 + .../pool-ranking/pool-ranking.component.scss | 11 +++++++++++ .../components/pool-ranking/pool-ranking.component.ts | 8 ++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.html b/frontend/src/app/components/pool-ranking/pool-ranking.component.html index a687e41c7..65c9a9dc1 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.html +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.html @@ -1,3 +1,4 @@ +
Mining Pools Share ({{ poolsWindowPreference }})
diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.scss b/frontend/src/app/components/pool-ranking/pool-ranking.component.scss index 3cf52b6ce..601e767f0 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.scss +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.scss @@ -30,3 +30,14 @@ padding: .3em !important; } } + + .main-title { + position: relative; + color: #ffffff91; + margin-top: -13px; + font-size: 10px; + text-transform: uppercase; + font-weight: 500; + text-align: center; + padding-bottom: 3px; +} diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts index 5a5b2390f..9cebb6574 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts @@ -155,8 +155,7 @@ export class PoolRankingComponent implements OnInit { this.chartOptions = { title: { - text: $localize`:@@mining.pool-chart-title:${network}:NETWORK: mining pools share`, - subtext: $localize`:@@mining.pool-chart-sub-title:Estimated from the # of blocks mined (${this.poolsWindowPreference})`, + text: this.widget ? '' : $localize`:@@mining.pool-chart-title:${network}:NETWORK: mining pools share`, left: 'center', textStyle: { color: '#FFF', @@ -171,10 +170,11 @@ export class PoolRankingComponent implements OnInit { }, series: [ { - top: this.isMobile() ? '5%' : '20%', + top: this.widget ? '0%' : (this.isMobile() ? '5%' : '10%'), + bottom: this.widget ? '0%' : (this.isMobile() ? '0%' : '5%'), name: 'Mining pool', type: 'pie', - radius: this.isMobile() ? ['10%', '50%'] : ['20%', '80%'], + radius: this.widget ? ['20%', '60%'] : (this.isMobile() ? ['10%', '50%'] : ['20%', '70%']), data: this.generatePoolsChartSerieData(miningStats), labelLine: { lineStyle: {