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/cln/sign-verify-message/verify/verify.component.html

32 lines
2.1 KiB
HTML

<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch">
<form #form="ngForm" fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-sm="row wrap">
<mat-form-field fxLayout="column" fxFlex="100" fxLayoutAlign="start end">
<mat-label>Message to verify</mat-label>
<textarea autoFocus matInput rows="1" required tabindex="1" name="message" [(ngModel)]="message" (keyup)="onChange()"></textarea>
<mat-error *ngIf="!message">Message is required.</mat-error>
</mat-form-field>
<mat-form-field fxLayout="column" fxFlex="100" fxLayoutAlign="start end">
<mat-label>Signature provided</mat-label>
<input #sign="ngModel" matInput name="signature" tabindex="2" required [(ngModel)]="signature" (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" tabindex="4" type="submit" (click)="onVerify()">Verify</button>
</div>
<div *ngIf="showVerifyStatus && verifyRes.verified" fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch" fxLayout.gt-sm="row wrap">
<mat-divider class="my-2" />
<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 padding-gap">
<p>{{verifyRes?.pubkey}}</p>
</div>
<div *ngIf="verifyRes.verified" fxLayout="row" class="mt-2">
<button mat-stroked-button color="primary" tabindex="5" rtlClipboard type="button" [payload]="verifyRes?.pubkey" (copied)="onCopyField($event)">Copy Pubkey</button>
</div>
</div>
</form>
</div>