Align acceleration pie chart

This commit is contained in:
natsoni 2024-06-26 18:03:14 +09:00
parent d175c34e5b
commit d45104f7c9
No known key found for this signature in database
GPG key ID: C65917583181743B
3 changed files with 17 additions and 3 deletions

View file

@ -4,8 +4,11 @@
<table>
<tbody>
<tr>
<td class="td-width field-label" i18n="transaction.accelerated-to-feerate|Accelerated to feerate">Accelerated to</td>
<td class="field-value">
<td class="td-width field-label" [class]="isMobile() ? 'mobile' : ''" i18n="transaction.accelerated-to-feerate|Accelerated to feerate">Accelerated to</td>
<td class="pie-chart" rowspan="2" *ngIf="isMobile()">
<ng-container *ngTemplateOutlet="pieChart"></ng-container>
</td>
<td class="field-value" [class]="isMobile() ? 'mobile' : ''">
<div class="effective-fee-container">
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize)) {
<app-fee-rate [fee]="accelerationInfo.acceleratedFeeRate"></app-fee-rate>
@ -14,7 +17,7 @@
}
</div>
</td>
<td class="pie-chart" rowspan="2">
<td class="pie-chart" rowspan="2" *ngIf="!isMobile()">
<ng-container *ngTemplateOutlet="pieChart"></ng-container>
</td>
</tr>

View file

@ -16,6 +16,9 @@
width: auto;
min-width: auto;
}
&.mobile {
width: 100%;
}
}
.field-value {
@ -23,6 +26,10 @@
width: 100%;
}
&.mobile {
width: auto;
}
.hashrate-label {
@media (max-width: 420px) {
display: none;

View file

@ -128,4 +128,8 @@ export class ActiveAccelerationBox implements OnChanges {
}
this.chartInstance = ec;
}
isMobile() {
return window.innerWidth <= 767.98;
}
}