Make the acceleration preview dismissable
This commit is contained in:
parent
1c92394563
commit
e986cfd30b
@ -238,4 +238,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<button type="button" class="close dismiss-preview" (click)="onDismiss()">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
@ -109,4 +109,14 @@
|
|||||||
|
|
||||||
.item {
|
.item {
|
||||||
white-space: initial;
|
white-space: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dismiss-preview {
|
||||||
|
position: absolute;
|
||||||
|
top: 0.4em;
|
||||||
|
right: 0.6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
:host ::ng-deep .alert {
|
||||||
|
margin-right: 1.6em;
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges, HostListener, ChangeDetectorRef } from '@angular/core';
|
import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges, HostListener, ChangeDetectorRef, Output, EventEmitter } from '@angular/core';
|
||||||
import { ApiService } from '../../services/api.service';
|
import { ApiService } from '../../services/api.service';
|
||||||
import { Subscription, catchError, of, tap } from 'rxjs';
|
import { Subscription, catchError, of, tap } from 'rxjs';
|
||||||
import { StorageService } from '../../services/storage.service';
|
import { StorageService } from '../../services/storage.service';
|
||||||
@ -40,6 +40,7 @@ export const MAX_BID_RATIO = 4;
|
|||||||
export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges {
|
export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
@Input() tx: Transaction | undefined;
|
@Input() tx: Transaction | undefined;
|
||||||
@Input() scrollEvent: boolean;
|
@Input() scrollEvent: boolean;
|
||||||
|
@Output() dismiss = new EventEmitter();
|
||||||
|
|
||||||
math = Math;
|
math = Math;
|
||||||
error = '';
|
error = '';
|
||||||
@ -207,4 +208,8 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
|
|||||||
onResize(): void {
|
onResize(): void {
|
||||||
this.isMobile = window.innerWidth <= 767.98;
|
this.isMobile = window.innerWidth <= 767.98;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onDismiss(): void {
|
||||||
|
this.dismiss.emit();
|
||||||
|
}
|
||||||
}
|
}
|
@ -87,7 +87,7 @@
|
|||||||
<h2>Accelerate</h2>
|
<h2>Accelerate</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<app-accelerate-preview [tx]="tx" [scrollEvent]="scrollIntoAccelPreview"></app-accelerate-preview>
|
<app-accelerate-preview [tx]="tx" [scrollEvent]="scrollIntoAccelPreview" (dismiss)="showAccelerationSummary = false;"></app-accelerate-preview>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user