Merge pull request #4969 from mempool/nymkappa/missing-accelerate-button-mobile

[accelerator] re-add missing accelerator button on mobile, set locati…
This commit is contained in:
wiz 2024-04-16 17:02:25 +09:00 committed by GitHub
commit 83cea33727
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -540,8 +540,8 @@
} @else { } @else {
<span class="eta justify-content-end" [class]="(acceleratorAvailable && accelerateCtaType === 'button') ? 'd-flex align-items-center' : ''"> <span class="eta justify-content-end" [class]="(acceleratorAvailable && accelerateCtaType === 'button') ? 'd-flex align-items-center' : ''">
<app-time kind="until" *ngIf="(da$ | async) as da;" [time]="da.adjustedTimeAvg * (this.mempoolPosition.block + 1) + now + da.timeOffset" [fastRender]="false" [fixedRender]="true"></app-time> <app-time kind="until" *ngIf="(da$ | async) as da;" [time]="da.adjustedTimeAvg * (this.mempoolPosition.block + 1) + now + da.timeOffset" [fastRender]="false" [fixedRender]="true"></app-time>
@if (!isMobile && !tx.acceleration && acceleratorAvailable && accelerateCtaType === 'button' && !tx?.acceleration) { @if (!tx?.acceleration && acceleratorAvailable && accelerateCtaType === 'button') {
<a [href]="'/services/accelerator/accelerate?txid=' + tx.txid" class="btn btn-sm accelerate btn-small-height" i18n="transaction.accelerate|Accelerate button label" (click)="onAccelerateClicked()">Accelerate</a> <a class="btn btn-sm accelerate btn-small-height" i18n="transaction.accelerate|Accelerate button label" (click)="onAccelerateClicked()">Accelerate</a>
} }
</span> </span>
} }

View File

@ -629,6 +629,8 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
if (!this.txId) { if (!this.txId) {
return; return;
} }
document.location.hash = '#accelerate';
this.enterpriseService.goal(8); this.enterpriseService.goal(8);
this.showAccelerationSummary = true && this.acceleratorAvailable; this.showAccelerationSummary = true && this.acceleratorAvailable;
this.scrollIntoAccelPreview = !this.scrollIntoAccelPreview; this.scrollIntoAccelPreview = !this.scrollIntoAccelPreview;