new-identity.component.html raw
1 <div class="sam-text-header">
2 <span>New Identity</span>
3 </div>
4
5 <div class="content">
6 <input
7 id="nickElement"
8 type="text"
9 placeholder="Nick"
10 class="form-control form-control-lg"
11 style="font-size: 1rem"
12 [(ngModel)]="identity.nick"
13 autocomplete="off"
14 (ngModelChange)="validateCanSave()"
15 />
16
17 <div class="sam-mt input-group mb-3">
18 <input
19 id="privkeyInputElement"
20 #privkeyInputElement
21 type="password"
22 placeholder="Private Key (HEX or NSEC)"
23 class="form-control form-control-lg"
24 style="font-size: 1rem"
25 [(ngModel)]="identity.privkeyInput"
26 autocomplete="off"
27 (ngModelChange)="validateCanSave()"
28 />
29 <button
30 class="btn btn-outline-secondary"
31 type="button"
32 (click)="toggleType(privkeyInputElement)"
33 >
34 <i
35 class="bi bi-eye"
36 [class.bi-eye]="privkeyInputElement.type === 'password'"
37 [class.bi-eye-slash]="privkeyInputElement.type === 'text'"
38 ></i>
39 </button>
40 </div>
41
42 <button
43 class="sam-mt"
44 (click)="onClickGeneratePrivkey()"
45 type="button"
46 class="btn btn-link"
47 >
48 Generate private key
49 </button>
50 </div>
51
52 <div class="sam-footer-grid-2">
53 <button type="button" class="btn btn-secondary" (click)="navigateBack()">
54 Cancel
55 </button>
56
57 <button
58 [disabled]="!canSave"
59 type="button"
60 class="btn btn-primary"
61 (click)="onClickSave()"
62 >
63 Save
64 </button>
65 </div>
66
67 <!----------->
68 <!-- ALERT -->
69 <!----------->
70 @if(alertMessage) {
71 <div
72 style="
73 position: absolute;
74 bottom: 60px;
75 align-self: center;
76 margin-left: 16px;
77 margin-right: 16px;
78 "
79 >
80 <div class="alert alert-danger sam-flex-row gap" role="alert">
81 <i class="bi bi-exclamation-triangle"></i>
82 <span>{{ alertMessage }}</span>
83 </div>
84 </div>
85 }
86