mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 22:58:30 +01:00
Merge branch 'nymkappa/menu' into nymkappa/accelerate-preview
This commit is contained in:
commit
f9895a492c
2 changed files with 11 additions and 10 deletions
|
@ -132,11 +132,10 @@
|
|||
</ng-template>
|
||||
<ng-template #estimationTmpl>
|
||||
<ng-template [ngIf]="this.mempoolPosition.block >= 7" [ngIfElse]="belowBlockLimit">
|
||||
<span class="eta d-flex align-items-center">
|
||||
<span class="flex-grow-1" i18n="transaction.eta.in-several-hours|Transaction ETA in several hours or more">In several hours (or more)</span>
|
||||
<button class="btn btn-sm btn-purple accelerate" *ngIf="acceleratorAvailable && accelerateCtaType === 'button'" (click)="onAccelerateClicked()">
|
||||
Accelerate
|
||||
</button>
|
||||
<span class="eta" [class]="acceleratorAvailable ? 'd-flex justify-content-end' : ''">
|
||||
<span i18n="transaction.eta.in-several-hours|Transaction ETA in several hours or more">In several hours (or more)</span>
|
||||
<span *ngIf="acceleratorAvailable" class="ml-2"></span>
|
||||
<a *ngIf="acceleratorAvailable && accelerateCtaType === 'button'" [href]="'/services/accelerator/accelerate?txid=' + tx.txid" class="btn badge badge-primary accelerate ml-auto" i18n="transaction.accelerate|Accelerate button label">Accelerate</a>
|
||||
</span>
|
||||
</ng-template>
|
||||
<ng-template #belowBlockLimit>
|
||||
|
@ -144,11 +143,10 @@
|
|||
<app-time kind="until" [time]="(60 * 1000 * this.mempoolPosition.block) + now" [fastRender]="false" [fixedRender]="true"></app-time>
|
||||
</ng-template>
|
||||
<ng-template #timeEstimateDefault>
|
||||
<span class="d-flex align-items-center">
|
||||
<app-time class="flex-grow-1" kind="until" *ngIf="(da$ | async) as da;" [time]="da.timeAvg * (this.mempoolPosition.block + 1) + now + da.timeOffset" [fastRender]="false" [fixedRender]="true"></app-time>
|
||||
<button class="btn btn-sm btn-purple accelerate" *ngIf="acceleratorAvailable && accelerateCtaType === 'button'" (click)="onAccelerateClicked()">
|
||||
Accelerate
|
||||
</button>
|
||||
<span [class]="acceleratorAvailable ? 'd-flex justify-content-end' : ''">
|
||||
<app-time kind="until" *ngIf="(da$ | async) as da;" [time]="da.timeAvg * (this.mempoolPosition.block + 1) + now + da.timeOffset" [fastRender]="false" [fixedRender]="true"></app-time>
|
||||
<span *ngIf="acceleratorAvailable" class="ml-2"></span>
|
||||
<a *ngIf="acceleratorAvailable && accelerateCtaType === 'button'" [href]="'/services/accelerator/accelerate?txid=' + tx.txid" class="btn badge badge-primary accelerate ml-auto" i18n="transaction.accelerate|Accelerate button label">Accelerate</a>
|
||||
</span>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
|
|
|
@ -83,6 +83,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
blockConversion: Price;
|
||||
tooltipPosition: { x: number, y: number };
|
||||
isMobile: boolean;
|
||||
acceleratorAvailable: boolean = false;
|
||||
|
||||
featuresEnabled: boolean;
|
||||
segwitEnabled: boolean;
|
||||
|
@ -112,6 +113,8 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.acceleratorAvailable = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && this.stateService.env.ACCELERATOR && this.stateService.network === '';
|
||||
|
||||
this.websocketService.want(['blocks', 'mempool-blocks']);
|
||||
this.stateService.networkChanged$.subscribe(
|
||||
(network) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue