66 < script defer src ="security.build.js "> </ script >
77 < link rel ="stylesheet " href ="/options.build.css " />
88 < title > Security Settings</ title >
9+ < style >
10+ .input , select .input {
11+ background-color : # 49483e ;
12+ border : 1px solid # 49483e ;
13+ border-radius : 8px ;
14+ color : # f8f8f2 ;
15+ }
16+ .input : focus , select .input : focus {
17+ border-color : # a6e22e ;
18+ outline : 2px solid # a6e22e ;
19+ outline-offset : 2px ;
20+ }
21+ .input ::placeholder {
22+ color : # b0b0a8 ;
23+ }
24+ </ style >
925 </ head >
1026
1127 < body class ="p-4 md:p-8 lg:p-16 max-w-5xl mx-auto ">
@@ -18,13 +34,13 @@ <h1 class="section-header">Security Settings</h1>
1834 </ button >
1935 </ div >
2036
21- <!-- LOCKED STATE — unlock before accessing settings -->
37+ <!-- LOCKED STATE — existing vault detected -->
2238 < div id ="locked-view " class ="section " style ="display:none; ">
23- < h2 class ="section-header "> Unlock Required </ h2 >
24- < p class ="text-sm italic ">
25- Enter your master password to access security settings .
39+ < h2 class ="section-header "> Existing Vault Detected </ h2 >
40+ < p class ="text-sm " style =" color:#b0b0a8; ">
41+ An encrypted vault already exists. Enter your master password to restore access to your keys and vault data .
2642 </ p >
27- < form id ="unlock-form " class ="mt-3 ">
43+ < form id ="unlock-form " class ="mt-4 ">
2844 < div class ="mt-2 ">
2945 < label for ="unlock-password "> Master Password</ label >
3046 < br />
@@ -39,14 +55,36 @@ <h2 class="section-header">Unlock Required</h2>
3955 </ div >
4056 < div
4157 id ="unlock-error "
42- class ="text-red-500 text- sm font-bold mt-1 "
43- style ="display:none; "
58+ class ="text-sm font-bold mt-1 "
59+ style ="display:none;color:#f92672; "
4460 aria-live ="assertive "
4561 > </ div >
46- < div class ="mt-2 ">
47- < button class ="button " type ="submit "> Unlock </ button >
62+ < div class ="mt-2 " style =" padding-top:24px; " >
63+ < button class ="button " type ="submit "> Restore Vault </ button >
4864 </ div >
4965 </ form >
66+
67+ < hr style ="border:0;border-top:1px solid #49483e;margin:32px 0; " />
68+
69+ <!-- Delete and start fresh -->
70+ < div id ="delete-vault-section ">
71+ < h3 class ="subsection-header "> Forgot Password?</ h3 >
72+ < p class ="text-sm " style ="color:#b0b0a8;margin-bottom:12px; ">
73+ If you've forgotten your password, you can delete the existing vault and start fresh. This will permanently delete all your profiles, keys, and vault data.
74+ </ p >
75+ < button id ="show-delete-confirm-btn " class ="button " type ="button " style ="border-color:#f92672;color:#f92672; ">
76+ Delete Vault & Start Fresh
77+ </ button >
78+ <!-- Confirmation dialog (hidden by default) -->
79+ < div id ="delete-confirm-dialog " class ="hidden " style ="margin-top:16px;padding:16px;background:#3e3d32;border-radius:8px;border:1px solid #f92672; ">
80+ < p style ="color:#f92672;font-size:0.9rem;font-weight:bold;margin-bottom:8px; "> Are you sure?</ p >
81+ < p style ="color:#b0b0a8;font-size:0.85rem;margin-bottom:16px; "> This will permanently delete all your profiles, private keys, and vault data. This cannot be undone.</ p >
82+ < div class ="flex gap-2 ">
83+ < button id ="confirm-delete-btn " class ="button " type ="button " style ="border-color:#f92672;color:#f92672; "> Yes, Delete Everything</ button >
84+ < button id ="cancel-delete-btn " class ="button " type ="button "> Cancel</ button >
85+ </ div >
86+ </ div >
87+ </ div >
5088 </ div >
5189
5290 <!-- UNLOCKED STATE — all settings -->
@@ -75,7 +113,7 @@ <h2 class="section-header">Master Password</h2>
75113 <!-- No password set: show Set Password form -->
76114 < div id ="set-password-section " class ="mt-3 " style ="display:none; ">
77115 < h3 class ="subsection-header "> Set Master Password</ h3 >
78- < p class ="text-sm text-red-700 font-bold mt-1 ">
116+ < p class ="text-sm font-bold mt-1 " style =" color:#cca066; ">
79117 Warning: There is no password recovery. If you lose your
80118 master password, you lose access to your private keys.
81119 Keep a backup of your nsec/hex keys before enabling this.
@@ -110,11 +148,11 @@ <h3 class="subsection-header">Set Master Password</h3>
110148 </ div >
111149 < div
112150 id ="security-error "
113- class ="text-red-500 text- sm font-bold mt-1 "
114- style ="display:none; "
151+ class ="text-sm font-bold mt-1 "
152+ style ="display:none;color:#f92672; "
115153 aria-live ="assertive "
116154 > </ div >
117- < div class ="mt-2 ">
155+ < div class ="mt-2 " style =" padding-top:24px; " >
118156 < button
119157 class ="button "
120158 type ="submit "
@@ -167,11 +205,11 @@ <h3 class="subsection-header">Change Master Password</h3>
167205 </ div >
168206 < div
169207 id ="change-error "
170- class ="text-red-500 text- sm font-bold mt-1 "
171- style ="display:none; "
208+ class ="text-sm font-bold mt-1 "
209+ style ="display:none;color:#f92672; "
172210 aria-live ="assertive "
173211 > </ div >
174- < div class ="mt-2 ">
212+ < div class ="mt-2 " style =" padding-top:24px; " >
175213 < button
176214 class ="button "
177215 type ="submit "
@@ -183,8 +221,10 @@ <h3 class="subsection-header">Change Master Password</h3>
183221 </ div >
184222 </ form >
185223
224+ < hr style ="border:0;border-top:1px solid #49483e;margin:32px 0; " />
225+
186226 <!-- Remove Password -->
187- < h3 class ="subsection-header mt-6 "> Remove Master Password</ h3 >
227+ < h3 class ="subsection-header "> Remove Master Password</ h3 >
188228 < p class ="text-sm italic mt-1 ">
189229 This will decrypt your keys and store them without
190230 encryption. You must enter your current password to confirm.
@@ -203,11 +243,11 @@ <h3 class="subsection-header mt-6">Remove Master Password</h3>
203243 </ div >
204244 < div
205245 id ="remove-error "
206- class ="text-red-500 text- sm font-bold mt-1 "
207- style ="display:none; "
246+ class ="text-sm font-bold mt-1 "
247+ style ="display:none;color:#f92672; "
208248 aria-live ="assertive "
209249 > </ div >
210- < div class ="mt-2 ">
250+ < div class ="mt-2 " style =" padding-top:24px; " >
211251 < button
212252 class ="button "
213253 type ="submit "
@@ -229,7 +269,7 @@ <h2 class="section-header">Auto-Lock</h2>
229269 </ p >
230270
231271 < div id ="autolock-disabled-msg " class ="mt-3 " style ="display:none; ">
232- < p class ="text-sm font-bold " style ="color:#fd971f ; ">
272+ < p class ="text-sm font-bold " style ="color:#cca066 ; ">
233273 Set a master password above to enable auto-lock.
234274 </ p >
235275 </ div >
@@ -248,8 +288,8 @@ <h2 class="section-header">Auto-Lock</h2>
248288 </ div >
249289 < div
250290 id ="autolock-success "
251- class ="text-green-700 text- sm font-bold mt-2 "
252- style ="display:none; "
291+ class ="text-sm font-bold mt-2 "
292+ style ="display:none;color:#a6e22e; "
253293 aria-live ="polite "
254294 > </ div >
255295 </ div >
0 commit comments