Prototype accelerate checkout properties

This commit is contained in:
Mononaut 2024-04-13 09:05:05 +00:00
parent 5f2d7b32ae
commit 29851537eb
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
3 changed files with 24 additions and 3 deletions

View File

@ -21,10 +21,14 @@
<div class="row"> <div class="row">
<div class="col-sm"> <div class="col-sm">
<div class="form-group form-check"> <div class="form-group form-check">
<input type="radio" class="form-check-input" id="wait" name="accelerate"> <input type="radio" class="form-check-input" id="wait" name="accelerate" checked="checked">
<label class="form-check-label d-flex flex-column" for="wait"> <label class="form-check-label d-flex flex-column" for="wait">
<span class="font-weight-bold">Wait</span> <span class="font-weight-bold">Wait</span>
<span class="text-muted">Settlement unlikely to occur within 24 hours</span> @if (!eta) {
<span class="text-muted">Settlement unlikely to occur within 24 hours</span>
} @else {
<span class="text-muted">Settlement estimated to occur <app-time kind="until" [time]="eta" [fastRender]="false" [fixedRender]="true"></app-time></span>
}
</label> </label>
</div> </div>
</div> </div>
@ -39,4 +43,5 @@
</div> </div>
</form> </form>
<span class="close-button" (click)="closeModal()"></span>
</div> </div>

View File

@ -0,0 +1,5 @@
.close-button {
position: absolute;
top: 0.5em;
right: 0.5em;
}

View File

@ -1,4 +1,6 @@
import { Component, OnInit, OnDestroy } from '@angular/core'; import { Component, OnInit, OnDestroy, Output, EventEmitter, Input } from '@angular/core';
import { Transaction } from '../../interfaces/electrs.interface';
import { MempoolPosition } from '../../interfaces/node-api.interface';
@Component({ @Component({
selector: 'app-accelerate-checkout', selector: 'app-accelerate-checkout',
@ -6,6 +8,10 @@ import { Component, OnInit, OnDestroy } from '@angular/core';
styleUrls: ['./accelerate-checkout.component.scss'] styleUrls: ['./accelerate-checkout.component.scss']
}) })
export class AccelerateCheckout implements OnInit, OnDestroy { export class AccelerateCheckout implements OnInit, OnDestroy {
@Input() tx: Transaction ;
@Input() eta: number;
@Output() close = new EventEmitter<null>();
constructor() { constructor() {
} }
@ -14,4 +20,9 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
ngOnDestroy() { ngOnDestroy() {
} }
closeModal(): void {
console.log('close modal')
this.close.emit();
}
} }