Merge branch 'master' into nymkappa/bugfix/pool-ranking

This commit is contained in:
wiz
2022-06-17 08:08:37 +09:00
committed by GitHub
12 changed files with 70 additions and 43 deletions

View File

@@ -127,7 +127,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
},
xAxis: [
{
name: formatterXAxisLabel(this.locale, this.windowPreference),
name: this.template === 'widget' ? '' : formatterXAxisLabel(this.locale, this.windowPreference),
nameLocation: 'middle',
nameTextStyle: {
padding: [20, 0, 0, 0],

View File

@@ -319,7 +319,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
},
xAxis: [
{
name: formatterXAxisLabel(this.locale, this.windowPreference),
name: this.template === 'widget' ? '' : formatterXAxisLabel(this.locale, this.windowPreference),
nameLocation: 'middle',
nameTextStyle: {
padding: [20, 0, 0, 0],

View File

@@ -49,9 +49,12 @@
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title" i18n="dashboard.latest-blocks">Latest blocks</h5>
<a class="title-link" href="" [routerLink]="['/blocks' | relativeUrl]">
<h5 class="card-title d-inline" i18n="dashboard.latest-blocks">Latest blocks</h5>
<span>&nbsp;</span>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: '#4a68b9'"></fa-icon>
</a>
<app-blocks-list [widget]=true></app-blocks-list>
<div><a [routerLink]="['/blocks' | relativeUrl]" i18n="dashboard.view-more">View more &raquo;</a></div>
</div>
</div>
</div>
@@ -60,9 +63,12 @@
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title" i18n="dashboard.adjustments">Adjustments</h5>
<a class="title-link" href="" [routerLink]="['/graphs/mining/hashrate-difficulty' | relativeUrl]">
<h5 class="card-title d-inline" i18n="dashboard.adjustments">Adjustments</h5>
<span>&nbsp;</span>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: '#4a68b9'"></fa-icon>
</a>
<app-difficulty-adjustments-table></app-difficulty-adjustments-table>
<div><a [routerLink]="['/graphs/mining/hashrate-difficulty' | relativeUrl]" i18n="dashboard.view-more">View more &raquo;</a></div>
</div>
</div>
</div>

View File

@@ -97,3 +97,10 @@
.card-text {
font-size: 22px;
}
.title-link, .title-link:hover, .title-link:focus, .title-link:active {
display: block;
margin-bottom: 10px;
text-decoration: none;
color: inherit;
}

View File

@@ -5,24 +5,27 @@
<div *ngIf="widget">
<div class="pool-distribution" *ngIf="(miningStatsObservable$ | async) as miningStats; else loadingReward">
<div class="item">
<h5 class="card-title" i18n="mining.miners-luck" i18n-ngbTooltip="mining.miners-luck"
ngbTooltip="Pools Luck (1w)" placement="bottom" #minersluck [disableTooltip]="!isEllipsisActive(minersluck)">Pools Luck (1w)</h5>
<p class="card-text">
<h5 class="card-title d-inline-block" i18n="mining.miners-luck" i18n-ngbTooltip="mining.miners-luck-1w"
ngbTooltip="Pools luck (1 week)" placement="bottom" #minersluck [disableTooltip]="!isEllipsisActive(minersluck)">Pools luck</h5>
<p class="card-text" i18n-ngbTooltip="mining.pools-luck-desc"
ngbTooltip="The overall luck of all mining pools over the past week. A luck bigger than 100% means the average block time for the current epoch is less than 10 minutes." placement="bottom">
{{ miningStats['minersLuck'] }}%
</p>
</div>
<div class="item">
<h5 class="card-title" i18n="master-page.blocks" i18n-ngbTooltip="master-page.blocks"
ngbTooltip="Blocks (1w)" placement="bottom" #blockscount [disableTooltip]="!isEllipsisActive(blockscount)">Blocks (1w)</h5>
<p class="card-text">
{{ miningStats.blockCount }}
<h5 class="card-title d-inline-block" i18n="mining.miners-count" i18n-ngbTooltip="mining.miners-count-1w"
ngbTooltip="Pools count (1w)" placement="bottom" #poolscount [disableTooltip]="!isEllipsisActive(poolscount)">Pools count</h5>
<p class="card-text" i18n-ngbTooltip="mining.pools-count-desc"
ngbTooltip="How many unique pools found at least one block over the past week." placement="bottom">
{{ miningStats.pools.length }}
</p>
</div>
<div class="item">
<h5 class="card-title" i18n="mining.miners-count" i18n-ngbTooltip="mining.miners-count"
ngbTooltip="Pools Count (1w)" placement="bottom" #poolscount [disableTooltip]="!isEllipsisActive(poolscount)">Pools Count (1w)</h5>
<p class="card-text">
{{ miningStats.pools.length }}
<h5 class="card-title d-inline-block" i18n="master-page.blocks" i18n-ngbTooltip="master-page.blocks"
ngbTooltip="Blocks (1w)" placement="bottom" #blockscount [disableTooltip]="!isEllipsisActive(blockscount)">Blocks (1w)</h5>
<p class="card-text" i18n-ngbTooltip="mining.blocks-count-desc"
ngbTooltip="The number of blocks found over the past week." placement="bottom">
{{ miningStats.blockCount }}
</p>
</div>
</div>
@@ -142,4 +145,4 @@
</p>
</div>
</div>
</ng-template>
</ng-template>

View File

@@ -89,7 +89,7 @@
flex-direction: row;
}
h5 {
margin-bottom: 10px;
margin-bottom: 5px;
}
.item {
max-width: 160px;
@@ -103,6 +103,7 @@
}
}
&:nth-child(3) {
width: 50%;
order: 3;
@media (min-width: 485px) {
order: 2;