mirror of
https://github.com/mempool/mempool.git
synced 2025-02-25 15:10:12 +01:00
Merge pull request #5226 from mempool/natsoni/fix-accel-pie-chart
Fix logic for pool pie chart position
This commit is contained in:
commit
d91c6bceed
4 changed files with 8 additions and 11 deletions
|
@ -4,11 +4,11 @@
|
|||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<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()">
|
||||
<td class="td-width field-label" [class]="chartPositionLeft ? 'chart-left' : ''" i18n="transaction.accelerated-to-feerate|Accelerated to feerate">Accelerated to</td>
|
||||
<td class="pie-chart" rowspan="2" *ngIf="chartPositionLeft">
|
||||
<ng-container *ngTemplateOutlet="pieChart"></ng-container>
|
||||
</td>
|
||||
<td class="field-value" [class]="isMobile() ? 'mobile' : ''">
|
||||
<td class="field-value" [class]="chartPositionLeft ? 'chart-left' : ''">
|
||||
<div class="effective-fee-container">
|
||||
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize)) {
|
||||
<app-fee-rate [fee]="accelerationInfo.acceleratedFeeRate"></app-fee-rate>
|
||||
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
</div>
|
||||
</td>
|
||||
<td class="pie-chart" rowspan="2" *ngIf="!isMobile()">
|
||||
<td class="pie-chart" rowspan="2" *ngIf="!chartPositionLeft">
|
||||
<ng-container *ngTemplateOutlet="pieChart"></ng-container>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
width: auto;
|
||||
min-width: auto;
|
||||
}
|
||||
&.mobile {
|
||||
&.chart-left {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
&.mobile {
|
||||
&.chart-left {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ export class ActiveAccelerationBox implements OnChanges {
|
|||
@Input() miningStats: MiningStats;
|
||||
@Input() pools: number[];
|
||||
@Input() chartOnly: boolean = false;
|
||||
@Input() chartPositionLeft: boolean = false;
|
||||
|
||||
acceleratedByPercentage: string = '';
|
||||
|
||||
|
@ -132,8 +133,4 @@ export class ActiveAccelerationBox implements OnChanges {
|
|||
}
|
||||
this.chartInstance = ec;
|
||||
}
|
||||
|
||||
isMobile() {
|
||||
return window.innerWidth <= 767.98;
|
||||
}
|
||||
}
|
|
@ -650,7 +650,7 @@
|
|||
<ng-template #acceleratingRow>
|
||||
<tr>
|
||||
<td rowspan="2" colspan="2" style="padding: 0;">
|
||||
<app-active-acceleration-box [tx]="tx" [accelerationInfo]="accelerationInfo" [miningStats]="miningStats"></app-active-acceleration-box>
|
||||
<app-active-acceleration-box [tx]="tx" [accelerationInfo]="accelerationInfo" [miningStats]="miningStats" [chartPositionLeft]="isMobile"></app-active-acceleration-box>
|
||||
</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
|
|
Loading…
Add table
Reference in a new issue