You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
4.6 KiB
HTML
71 lines
4.6 KiB
HTML
<div fxLayout="column" fxFlex="98" fxLayout.gt-sm="row wrap" fxLayoutAlign="start stretch" fxLayoutAlign.gt-sm="space-between start" *ngIf="!sweepAll; else sweepAllBlock;" class="padding-gap overflow-x-hidden">
|
|
<mat-form-field fxFlex.gt-sm="55">
|
|
<input matInput [(ngModel)]="transaction.address" placeholder="Bitcoin Address" tabindex="1" name="address" #address="ngModel">
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex.gt-sm="30">
|
|
<input matInput [(ngModel)]="transaction.amount" placeholder="Amount" name="amount" type="number" step="100" min="0" tabindex="2" #amount="ngModel" [disabled]="sweepAll">
|
|
<span matSuffix> {{selAmountUnit}} </span>
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex.gt-sm="10" fxLayoutAlign="start end">
|
|
<mat-select [value]="selAmountUnit" tabindex="3" required name="amountUnit" (selectionChange)="onAmountUnitChange($event)">
|
|
<mat-option *ngFor="let amountUnit of amountUnits" [value]="amountUnit">{{amountUnit}}</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<div fxLayout="column" fxFlex="100" fxFlex.gt-sm="60" fxLayout.gt-sm="row wrap" fxLayoutAlign="start stretch" fxLayoutAlign.gt-sm="space-between start">
|
|
<mat-form-field fxFlex="48">
|
|
<mat-select [(value)]="selTransType" tabindex="4">
|
|
<mat-option *ngFor="let transType of transTypes" [value]="transType.id">
|
|
{{transType.name}}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex="48" *ngIf="selTransType=='1'">
|
|
<input matInput [(ngModel)]="transaction.blocks" placeholder="Number of Blocks" type="number" name="blocks" step="1" min="0" required tabindex="5" #blocks="ngModel">
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex="48" *ngIf="selTransType=='2'">
|
|
<input matInput [(ngModel)]="transaction.fees" placeholder="Fee ({{nodeData?.smaller_currency_unit}}/Byte)" type="number" name="fees" step="1" min="0" required tabindex="6" #fees="ngModel">
|
|
</mat-form-field>
|
|
</div>
|
|
<div fxFlex="50" fxLayoutAlign="space-between start">
|
|
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="7" type="reset" (click)="resetData()">Clear Fields</button>
|
|
<button fxFlex="48" fxLayoutAlign="center center" mat-raised-button color="primary"
|
|
[disabled]="invalidValues" type="submit" tabindex="8" (click)="onSendFunds()">
|
|
<p *ngIf="invalidValues && (address.touched || address.dirty) && (amount.touched || amount.dirty); else sendText">
|
|
Invalid Values</p>
|
|
<ng-template #sendText>
|
|
<p>Send Funds</p>
|
|
</ng-template>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<ng-template #sweepAllBlock>
|
|
<div fxLayout="column" fxFlex="100" class="padding-gap overflow-x-hidden">
|
|
<div fxLayout="column" fxFlex="98" fxLayout.gt-sm="row wrap" fxLayoutAlign="start stretch" fxLayoutAlign.gt-sm="space-between start">
|
|
<mat-form-field fxFlex.gt-sm="55">
|
|
<input matInput [(ngModel)]="transaction.address" placeholder="Bitcoin Address" tabindex="1" name="address" #addressSweep="ngModel">
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex.gt-sm="20">
|
|
<mat-select [(value)]="selTransType" tabindex="4">
|
|
<mat-option *ngFor="let transType of transTypes" [value]="transType.id">
|
|
{{transType.name}}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex.gt-sm="20" fxLayoutAlign="start end" *ngIf="selTransType=='1'">
|
|
<input matInput [(ngModel)]="transaction.blocks" placeholder="Number of Blocks" type="number" name="blocks" step="1" min="0" required tabindex="5" #blocks="ngModel">
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex.gt-sm="20" fxLayoutAlign="start end" *ngIf="selTransType=='2'">
|
|
<input matInput [(ngModel)]="transaction.fees" placeholder="Fee ({{nodeData?.smaller_currency_unit}}/Byte)" type="number" name="fees" step="1" min="0" required tabindex="6" #feesSweep="ngModel">
|
|
</mat-form-field>
|
|
</div>
|
|
<div>
|
|
<div fxFlex="100" fxFlex.gt-sm="30" fxLayout="row wrap" fxLayoutAlign="space-between start">
|
|
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="7" type="reset" (click)="resetData()">Clear Fields</button>
|
|
<button fxFlex="48" fxLayoutAlign="center center" mat-raised-button color="primary" [disabled]="invalidValues" type="submit" tabindex="8" (click)="onSendFunds()">
|
|
<p *ngIf="invalidValues && (addressSweep.touched || addressSweep.dirty); else sendTextSweep">Invalid Values</p>
|
|
<ng-template #sendTextSweep><p>Send Funds</p></ng-template>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ng-template> |