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.
RTL/src/app/clightning/sign-verify-message/verify/verify.component.html

30 lines
2.1 KiB
HTML

<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch">
<form fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-sm="row wrap" #form="ngForm">
<mat-form-field fxFlex="100" fxLayoutAlign="start end">
<textarea autoFocus matInput [(ngModel)]="message" rows="1" placeholder="Message to verify" required tabindex="1" name="message" (keyup)="onChange()"></textarea>
<mat-error *ngIf="!message">Message is required.</mat-error>
</mat-form-field>
<mat-form-field fxFlex="100" fxLayoutAlign="start end">
<input matInput placeholder="Signature provided" name="signature" [(ngModel)]="signature" tabindex="2" required #sign="ngModel" (keyup)="onChange()">
<mat-error *ngIf="!signature">Signature is required.</mat-error>
</mat-form-field>
<p *ngIf="showVerifyStatus && !verifyRes.verified" fxFlex="100" class="color-warn" fxLayoutAlign="start center"><mat-icon class="mr-1 icon-small">close</mat-icon>Verification failed, please double check message and signature</p>
<div fxLayout="row" class="my-1">
<button class="mr-1" mat-stroked-button color="primary" tabindex="3" type="reset" (click)="resetData()">Clear Fields</button>
<button mat-flat-button color="primary" (click)="onVerify()" tabindex="4" type="submit">Verify</button>
</div>
<div *ngIf="showVerifyStatus && verifyRes.verified" fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch" fxLayout.gt-sm="row wrap">
<mat-divider [inset]="true" class="my-2"></mat-divider>
<div fxLayout="row" fxFlex="100" fxLayoutAlign="start center">
<p *ngIf="verifyRes.verified">Pubkey Used</p>
</div>
<div *ngIf="verifyRes.verified" fxLayout="column" fxFlex="100" fxLayoutAlign="start start" class="bordered-box read-only h-4 padding-gap">
<p>{{verifyRes?.pubkey}}</p>
</div>
<div fxLayout="row" class="mt-2" *ngIf="verifyRes.verified">
<button mat-stroked-button color="primary" tabindex="5" rtlClipboard [payload]="verifyRes?.pubkey" (copied)="onCopyField($event)" type="button">Copy Pubkey</button>
</div>
</div>
</form>
</div>