mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2025-03-13 11:35:42 +01:00
36 lines
2.1 KiB
HTML
36 lines
2.1 KiB
HTML
<div fxLayout="row">
|
|
<div fxFlex="100">
|
|
<mat-card-header fxLayout="row" fxLayoutAlign="space-between center" class="modal-info-header">
|
|
<div fxFlex="95" fxLayoutAlign="start start">
|
|
<span class="page-title">Initiate a Swapout</span>
|
|
</div>
|
|
<button tabindex="5" fxFlex="5" fxLayoutAlign="center" class="btn-close-x p-0" [mat-dialog-close]="false" default
|
|
mat-button>X</button>
|
|
</mat-card-header>
|
|
<mat-card-content class="padding-gap-x-large">
|
|
<form fxLayout="row wrap" fxLayoutAlign="start space-between" fxFlex="100" #swapOutForm="ngForm">
|
|
<p fxLayoutAlign="start center" class="pb-2 word-break">Swapout with {{sPeer?.alias}}</p>
|
|
<mat-form-field fxFlex="100" fxLayoutAlign="start end">
|
|
<input matInput [value]="sPeer.short_channel_id" placeholder="Short Channel ID" tabindex="1" name="shortChanId" disabled>
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex="100">
|
|
<input matInput autoFocus [(ngModel)]="swapAmount" (keyup)="onAmountChange()" placeholder="Amount"
|
|
type="number" [step]="100" [min]="1" [max]="sPeer.local_balance" tabindex="2" name="swapAmt" #swapAmt="ngModel" required>
|
|
<span matSuffix class="ml-1"> Sats </span>
|
|
<mat-error *ngIf="swapAmt.errors?.required">Amount is required.</mat-error>
|
|
<mat-error *ngIf="swapAmt.errors?.max">Amount must be less than or equal to {{sPeer.local_balance}}.</mat-error>
|
|
<mat-hint>Remaining Local: {{sPeer.local_balance - ((swapAmount) ? swapAmount : 0) | number}}<br>{{swapAmountHint}}</mat-hint>
|
|
</mat-form-field>
|
|
<div fxFlex="100" class="alert alert-danger mt-2" *ngIf="swapOutError !== ''">
|
|
<fa-icon [icon]="faExclamationTriangle" class="mr-1 alert-icon"></fa-icon>
|
|
<span *ngIf="swapOutError !== ''">{{swapOutError}}</span>
|
|
</div>
|
|
<div fxLayout="row" fxFlex="100" class="mt-1" fxLayoutAlign="end center">
|
|
<button class="mr-1" mat-button color="primary" tabindex="3" type="button" (click)="resetData()">Clear
|
|
Field</button>
|
|
<button mat-button color="primary" (click)="onExecuteSwapout()" tabindex="4">Execute</button>
|
|
</div>
|
|
</form>
|
|
</mat-card-content>
|
|
</div>
|
|
</div>
|