keys.component.html raw
1 <div class="header-pane">
2 <lib-icon-button
3 icon="chevron-left"
4 (click)="navigateBack()"
5 ></lib-icon-button>
6 <span>Keys</span>
7 </div>
8
9 @if(identity) {
10 <span>Public Key</span>
11
12 <!-- PUBKEY NPUB -->
13 <div class="sam-mt-h sam-flex-row gap">
14 <span class="text-muted" style="width: 48px">NPUB</span>
15 <div class="input-group">
16 <input
17 id="pubkeyNpubInput"
18 #pubkeyNpubInput
19 type="text"
20 class="form-control"
21 [ngModel]="identity.pubkeyNpub"
22 [readOnly]="true"
23 />
24 <button
25 class="btn btn-outline-secondary"
26 type="button"
27 (click)="
28 copyToClipboard(identity.pubkeyNpub); toast.show('Copied to clipboard')
29 "
30 >
31 <i
32 class="bi bi-copy"
33 [class.bi-eye]="pubkeyNpubInput.type === 'password'"
34 [class.bi-eye-slash]="pubkeyNpubInput.type === 'text'"
35 ></i>
36 </button>
37 </div>
38 </div>
39
40 <!-- PUBKEY HEX -->
41 <div class="sam-mt-h sam-flex-row gap">
42 <span class="text-muted" style="width: 48px">HEX</span>
43 <div class="input-group">
44 <input
45 id="pubkeyHexInput"
46 #pubkeyHexInput
47 type="text"
48 class="form-control"
49 [ngModel]="identity.pubkeyHex"
50 [readOnly]="true"
51 />
52 <button
53 class="btn btn-outline-secondary"
54 type="button"
55 (click)="
56 copyToClipboard(identity.pubkeyHex); toast.show('Copied to clipboard')
57 "
58 >
59 <i
60 class="bi bi-copy"
61 [class.bi-eye]="pubkeyHexInput.type === 'password'"
62 [class.bi-eye-slash]="pubkeyHexInput.type === 'text'"
63 ></i>
64 </button>
65 </div>
66 </div>
67
68 <span class="sam-mt-2">Private Key</span>
69
70 <!-- PRIVATE NSEC -->
71 <div class="sam-mt-h sam-flex-row gap">
72 <span class="text-muted" style="width: 48px">NSEC</span>
73 <div class="input-group">
74 <input
75 id="privkeyNsecInput"
76 #privkeyNsecInput
77 type="password"
78 class="form-control"
79 [ngModel]="identity.privkeyNsec"
80 [readOnly]="true"
81 />
82 <button
83 class="btn btn-outline-secondary"
84 type="button"
85 (click)="
86 copyToClipboard(identity.privkeyNsec); toast.show('Copied to clipboard')
87 "
88 >
89 <i class="bi bi-copy"></i>
90 </button>
91 <button
92 class="btn btn-outline-secondary"
93 type="button"
94 (click)="toggleType(privkeyNsecInput)"
95 >
96 <i
97 class="bi bi-eye"
98 [class.bi-eye]="privkeyNsecInput.type === 'password'"
99 [class.bi-eye-slash]="privkeyNsecInput.type === 'text'"
100 ></i>
101 </button>
102 </div>
103 </div>
104
105 <!-- PRIVATE HEX -->
106 <div class="sam-mt-h sam-flex-row gap">
107 <span class="text-muted" style="width: 48px">HEX</span>
108 <div class="input-group">
109 <input
110 id="privkeyHexInput"
111 #privkeyHexInput
112 type="password"
113 class="form-control"
114 [ngModel]="identity.privkeyHex"
115 [readOnly]="true"
116 />
117 <button
118 class="btn btn-outline-secondary"
119 type="button"
120 (click)="
121 copyToClipboard(identity.privkeyHex); toast.show('Copied to clipboard')
122 "
123 >
124 <i class="bi bi-copy"></i>
125 </button>
126 <button
127 class="btn btn-outline-secondary"
128 type="button"
129 (click)="toggleType(privkeyHexInput)"
130 >
131 <i
132 class="bi bi-eye"
133 [class.bi-eye]="privkeyHexInput.type === 'password'"
134 [class.bi-eye-slash]="privkeyHexInput.type === 'text'"
135 ></i>
136 </button>
137 </div>
138 </div>
139
140 <span class="sam-mt-2">Encrypted Key (NIP-49)</span>
141
142 <button class="btn btn-primary sam-mt-h" (click)="navigateToNcryptsec()">
143 Get ncryptsec
144 </button>
145 }
146
147 <lib-toast #toast [bottom]="16"></lib-toast>
148