Mining dashboard layout matches main dashboard layout

This commit is contained in:
nymkappa 2022-02-28 17:31:10 +09:00
parent 16331d1be7
commit b2dec5e20a
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
9 changed files with 43 additions and 20 deletions

View File

@ -1,4 +1,4 @@
<div class="main-title" i18n="dashboard.difficulty-adjustment">Difficulty Adjustment</div> <div *ngIf="showTitle" class="main-title" i18n="dashboard.difficulty-adjustment">Difficulty Adjustment</div>
<div class="card-wrapper"> <div class="card-wrapper">
<div class="card"> <div class="card">
<div class="card-body more-padding"> <div class="card-body more-padding">

View File

@ -28,8 +28,9 @@ export class DifficultyComponent implements OnInit {
isLoadingWebSocket$: Observable<boolean>; isLoadingWebSocket$: Observable<boolean>;
difficultyEpoch$: Observable<EpochProgress>; difficultyEpoch$: Observable<EpochProgress>;
@Input() showProgress: boolean = true; @Input() showProgress = true;
@Input() showHalving: boolean = false; @Input() showHalving = false;
@Input() showTitle = true;
constructor( constructor(
public stateService: StateService, public stateService: StateService,

View File

@ -29,7 +29,7 @@
.chart-widget { .chart-widget {
width: 100%; width: 100%;
height: 100%; height: 100%;
max-height: 275px; max-height: 325px;
} }
.formRadioGroup { .formRadioGroup {

View File

@ -27,7 +27,7 @@
<div *ngIf="hashrateObservable$ | async" [class]="!widget ? 'chart' : 'chart-widget'" <div *ngIf="hashrateObservable$ | async" [class]="!widget ? 'chart' : 'chart-widget'"
echarts [initOpts]="chartInitOptions" [options]="chartOptions"></div> echarts [initOpts]="chartInitOptions" [options]="chartOptions"></div>
<div class="text-center loadingGraphs" [class]="widget ? 'widget' : ''" *ngIf="isLoading"> <div class="text-center loadingGraphs" *ngIf="isLoading">
<div class="spinner-border text-light"></div> <div class="spinner-border text-light"></div>
</div> </div>

View File

@ -29,7 +29,7 @@
.chart-widget { .chart-widget {
width: 100%; width: 100%;
height: 100%; height: 100%;
max-height: 275px; max-height: 325px;
} }
.formRadioGroup { .formRadioGroup {

View File

@ -3,26 +3,37 @@
<div class="row row-cols-1 row-cols-md-2"> <div class="row row-cols-1 row-cols-md-2">
<div class="col"> <div class="col">
<div class="card double"> <div class="main-title">Placeholder</div>
<div class="card" style="height: 123px">
</div>
</div>
<!-- difficulty adjustment -->
<div class="col">
<div class="main-title" i18n="dashboard.difficulty-adjustment">Difficulty Adjustment</div>
<div class="card" style="height: 123px">
<app-difficulty [showTitle]="false"></app-difficulty>
</div>
</div>
<!-- pool distribution -->
<div class="col">
<div class="card" style="height: 385px">
<div class="card-body"> <div class="card-body">
<!-- pool distribution -->
<h5 class="card-title"> <h5 class="card-title">
<a href="" [routerLink]="['/mining/pools' | relativeUrl]" i18n="mining.pool-share"> <a href="" [routerLink]="['/mining/pools' | relativeUrl]" i18n="mining.pool-share">
Mining Pools Share (1w) Mining Pools Share (1w)
</a> </a>
</h5> </h5>
<app-pool-ranking [widget]=true></app-pool-ranking> <app-pool-ranking [widget]=true></app-pool-ranking>
<!-- pools hashrate -->
<app-hashrate-chart-pools [widget]=true></app-hashrate-chart-pools>
</div> </div>
</div> </div>
</div> </div>
<!-- hashrate -->
<div class="col"> <div class="col">
<div class="card"> <div class="card" style="height: 385px">
<div class="card-body"> <div class="card-body">
<!-- hashrate -->
<h5 class="card-title"> <h5 class="card-title">
<a class="link" href="" [routerLink]="['/mining/hashrate' | relativeUrl]" i18n="mining.hashrate"> <a class="link" href="" [routerLink]="['/mining/hashrate' | relativeUrl]" i18n="mining.hashrate">
Hashrate (1y) Hashrate (1y)
@ -31,7 +42,22 @@
<app-hashrate-chart [widget]=true></app-hashrate-chart> <app-hashrate-chart [widget]=true></app-hashrate-chart>
</div> </div>
</div> </div>
</div> </div>
<!-- pools hashrate -->
<div class="col">
<div class="card" style="height: 385px">
<div class="card-body">
<!-- pool dominance -->
<h5 class="card-title">
<a href="" [routerLink]="['/mining/hashrate/pools' | relativeUrl]" i18n="mining.pool-historical-dominance">
Mining Pools Dominance (1y)
</a>
</h5>
<app-hashrate-chart-pools [widget]=true></app-hashrate-chart-pools>
</div>
</div>
</div>
</div> </div>
</div> </div>

View File

@ -12,10 +12,6 @@
.card { .card {
background-color: #1d1f31; background-color: #1d1f31;
height: 340px;
}
.card.double {
height: 620px;
} }
.card-title { .card-title {

View File

@ -2,7 +2,7 @@
<div [class]="widget ? 'chart-widget' : 'chart'" <div [class]="widget ? 'chart-widget' : 'chart'"
echarts [initOpts]="chartInitOptions" [options]="chartOptions" (chartInit)="onChartInit($event)"></div> echarts [initOpts]="chartInitOptions" [options]="chartOptions" (chartInit)="onChartInit($event)"></div>
<div class="text-center loadingGraphs" [class]="widget ? 'widget' : ''" *ngIf="isLoading"> <div class="text-center loadingGraphs" *ngIf="isLoading">
<div class="spinner-border text-light"></div> <div class="spinner-border text-light"></div>
</div> </div>

View File

@ -7,7 +7,7 @@
.chart-widget { .chart-widget {
width: 100%; width: 100%;
height: 100%; height: 100%;
max-height: 275px; max-height: 325px;
} }
.formRadioGroup { .formRadioGroup {