[accelerator] re-add missing accelerator button on mobile, set location.hash when click on accelerate button

This commit is contained in:
nymkappa 2024-04-14 13:54:25 +09:00
parent d1e382ddf7
commit dff811f615
No known key found for this signature in database
GPG Key ID: 92358FC85D9645DE
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' && !tx?.acceleration) {
<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;