Skip to content

Commit

Permalink
Re-enable graph timespan controls while isLoading
Browse files Browse the repository at this point in the history
  • Loading branch information
natsoni committed May 24, 2024
1 parent 2c04896 commit bd5abf6
Show file tree
Hide file tree
Showing 23 changed files with 13 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>

<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="daysAvailable">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" [class.active]="radioGroupForm.get('dateSpan').value === '24h'">
<input type="radio" [value]="'24h'" fragment="24h" [routerLink]="['/graphs/acceleration/fees' | relativeUrl]" formControlName="dateSpan"> 24H
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,3 @@ h5 {
font-size: 1rem;
color: var(--title-fg);
}

.disabled {
pointer-events: none;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>

<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(statsObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" *ngIf="stats.blockCount >= 144" [class.active]="radioGroupForm.get('dateSpan').value === '24h'">
<input type="radio" [value]="'24h'" fragment="24h" [routerLink]="['/graphs/mining/block-fee-rates' | relativeUrl]" formControlName="dateSpan"> 24h
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,3 @@
max-width: 80px;
margin: 15px auto 3px;
}

.disabled {
pointer-events: none;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>

<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(statsObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" *ngIf="stats.blockCount >= 4320" [class.active]="radioGroupForm.get('dateSpan').value === '1m'">
<input type="radio" [value]="'1m'" fragment="1m" [routerLink]="['/graphs/mining/block-fees' | relativeUrl]" formControlName="dateSpan"> 1M
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,3 @@
height: 100%;
max-height: 270px;
}

.disabled {
pointer-events: none;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>

<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(statsObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" *ngIf="stats.blockCount >= 144" [class.active]="radioGroupForm.get('dateSpan').value === '24h'">
<input type="radio" [value]="'24h'" fragment="24h" [routerLink]="['/graphs/mining/block-fees-subsidy' | relativeUrl]" formControlName="dateSpan"> 24h
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,3 @@
height: 100%;
max-height: 270px;
}

.disabled {
pointer-events: none;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>

<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(statsObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" *ngIf="stats.blockCount >= 144" [class.active]="radioGroupForm.get('dateSpan').value === '24h'">
<input type="radio" [value]="'24h'" fragment="24h" [routerLink]="['/graphs/mining/block-health' | relativeUrl]" formControlName="dateSpan"> 24h
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,3 @@
height: 100%;
max-height: 270px;
}

.disabled {
pointer-events: none;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>

<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(statsObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" *ngIf="stats.blockCount >= 4320" [class.active]="radioGroupForm.get('dateSpan').value === '1m'">
<input type="radio" [value]="'1m'" fragment="1m" [routerLink]="['/graphs/mining/block-rewards' | relativeUrl]" formControlName="dateSpan"> 1M
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,3 @@
height: 100%;
max-height: 270px;
}

.disabled {
pointer-events: none;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>

<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(blockSizesWeightsObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" *ngIf="stats.blockCount >= 144" [class.active]="radioGroupForm.get('dateSpan').value === '24h'">
<input type="radio" [value]="'24h'" fragment="24h" [routerLink]="['/graphs/mining/block-sizes-weights' | relativeUrl]" formControlName="dateSpan"> 24h
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,3 @@
height: 100%;
max-height: 270px;
}

.disabled {
pointer-events: none;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h5 class="card-title" i18n="block.difficulty">Difficulty</h5>
</div>

<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(hashrateObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" *ngIf="stats.blockCount >= 12960" [class.active]="radioGroupForm.get('dateSpan').value === '3m'">
<input type="radio" [value]="'3m'" fragment="3m" [routerLink]="['/graphs/mining/hashrate-difficulty' | relativeUrl]" [attr.data-cy]="'3m'" formControlName="dateSpan"> 3M
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,3 @@
max-width: 80px;
margin: 15px auto 3px;
}

.disabled {
pointer-events: none;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>

<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(hashrateObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" *ngIf="stats.blockCount >= 25920" [class.active]="radioGroupForm.get('dateSpan').value === '6m'">
<input type="radio" [value]="'6m'" fragment="6m" [routerLink]="['/graphs/mining/pools-dominance' | relativeUrl]" [attr.data-cy]="'6m'" formControlName="dateSpan"> 6M
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,3 @@
.loadingGraphs.widget {
top: 75%;
}

.disabled {
pointer-events: none;
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges, On
itemFormatted += `<div class="item">
<div class="indicator-container">${colorSpan(bestItem.color)}</div>
<div class="grow"></div>
<div class="value">${formatNumber(bestItem.value[1], this.locale, '1.0-0')}<span class="symbol">vB/s</span></div>
<div class="value">${formatNumber(bestItem.value[1], this.locale, '1.0-0')} <span class="symbol">vB/s</span></div>
</div>`;
}
return `<div class="tx-wrapper-tooltip-chart ${(this.template === 'advanced') ? 'tx-wrapper-tooltip-chart-advanced' : ''}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</div>
<form [formGroup]="radioGroupForm" class="formRadioGroup"
*ngIf="!widget && (miningStatsObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" name="radioBasic" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle" name="radioBasic">
<label class="btn btn-primary btn-sm" *ngIf="stats.totalBlockCount >= 144" [class.active]="radioGroupForm.get('dateSpan').value === '24h'">
<input type="radio" [value]="'24h'" fragment="24h" [routerLink]="['/graphs/mining/pools' | relativeUrl]" [attr.data-cy]="'24h'" formControlName="dateSpan"> 24h
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@
margin: 15px auto 3px;
}

.disabled {
pointer-events: none;
opacity: 0.5;
}

td {
.difference {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</a>
</div>
<div class="btn-toggle-rows" name="radioBasic">
<div class="btn-group btn-group-toggle" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle">
<label class="btn btn-primary btn-sm" [class.active]="radioGroupForm.get('dateSpan').value === '2h'">
<input type="radio" [value]="'2h'" [routerLink]="['/graphs' | relativeUrl]" fragment="2h" formControlName="dateSpan"> 2H
(LIVE)
Expand All @@ -40,7 +40,7 @@
<input type="radio" [value]="'3m'" [routerLink]="['/graphs' | relativeUrl]" fragment="3m" formControlName="dateSpan"> 3M
</label>
</div>
<div class="btn-group btn-group-toggle" [class]="{'disabled': isLoading}">
<div class="btn-group btn-group-toggle">
<label class="btn btn-primary btn-sm" [class.active]="radioGroupForm.get('dateSpan').value === '6m'">
<input type="radio" [value]="'6m'" [routerLink]="['/graphs' | relativeUrl]" fragment="6m" formControlName="dateSpan"> 6M
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,3 @@
display: block;
}
}

.disabled {
pointer-events: none;
opacity: 0.5;
}

0 comments on commit bd5abf6

Please sign in to comment.