-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
539 lines (533 loc) · 24.7 KB
/
index.html
File metadata and controls
539 lines (533 loc) · 24.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Password Manager</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
/>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div id="app">
<header class="app-header">
<!-- <h1>Password Manager</h1> -->
<div class="toolbar-buttons">
<div class="toolbar-left">
<button id="add-entry-btn" class="toolbar-btn-labeled" title="Add Entry">
<i class="fa-solid fa-plus btn-icon"></i>
<span class="btn-label">Add</span>
</button>
<button
id="delete-entry-btn"
class="toolbar-btn-labeled"
title="Delete Selected"
>
<i class="fa-solid fa-trash btn-icon"></i>
<span class="btn-label">Delete</span>
</button>
<button
id="copy-entry-btn"
class="toolbar-btn-labeled"
title="Duplicate Selected"
>
<i class="fa-solid fa-clone btn-icon"></i>
<span class="btn-label">Duplicate</span>
</button>
<div class="toolbar-spacer"></div>
<button id="import-csv-btn" class="toolbar-btn-labeled" title="Import CSV">
<i class="fa-solid fa-file-import btn-icon"></i>
<span class="btn-label">Import</span>
</button>
<button id="export-csv-btn" class="toolbar-btn-labeled" title="Export CSV">
<i class="fa-solid fa-file-export btn-icon"></i>
<span class="btn-label">Export</span>
</button>
<div class="toolbar-spacer"></div>
<button
id="toolbar-generate-btn"
class="toolbar-btn-labeled"
title="Generate Password"
>
<i class="fa-solid fa-wand-magic-sparkles btn-icon"></i>
<span class="btn-label">Generate</span>
</button>
</div>
<div class="toolbar-right">
<button id="settings-btn" class="toolbar-btn" title="Settings">
<i class="fa-solid fa-gear"></i>
</button>
</div>
</div>
</header>
<main class="app-main">
<section class="grid-panel">
<input
type="text"
id="search-input"
class="search-input"
placeholder="Search by name, category, URL, or username"
/>
<table class="password-grid">
<thead>
<tr>
<th class="col-name">
<button
id="sort-passwords-btn"
class="sort-header-btn"
title="Sort by name"
>
Passwords <i class="fa-solid fa-sort-up"></i>
</button>
</th>
<th class="col-updated">
<button
id="sort-updated-btn"
class="sort-header-btn"
title="Sort by date"
>
Last Updated <i class="fa-solid fa-sort"></i>
</button>
</th>
</tr>
</thead>
<tbody id="password-grid-body"></tbody>
</table>
</section>
<section class="detail-panel">
<h2>Details</h2>
<form id="detail-form">
<div class="form-row">
<label for="name">Name</label>
<div class="input-with-button">
<input type="text" id="name" name="name" />
<button
type="button"
id="copy-name-btn"
class="icon-button"
title="Copy name"
>
<i class="fa-solid fa-copy"></i>
</button>
</div>
</div>
<div class="form-row">
<label for="url">URL</label>
<div class="input-with-button">
<input type="url" id="url" name="url" />
<button
type="button"
id="launch-url-btn"
class="icon-button"
title="Open URL"
>
<i class="fa-solid fa-external-link-alt"></i>
</button>
</div>
</div>
<div class="form-row">
<label for="category">Category</label>
<div class="input-with-button">
<input type="text" id="category" name="category" />
<button
type="button"
id="copy-category-btn"
class="icon-button"
title="Copy category"
>
<i class="fa-solid fa-copy"></i>
</button>
</div>
</div>
<div class="form-row">
<label for="username">Username</label>
<div class="input-with-button">
<input type="text" id="username" name="username" />
<button
type="button"
id="copy-username-btn"
class="icon-button"
title="Copy username"
>
<i class="fa-solid fa-copy"></i>
</button>
</div>
</div>
<div class="form-row password-row">
<label for="password">Password</label>
<div class="input-with-button">
<div class="password-input-wrapper">
<input type="password" id="password" name="password" />
<button
type="button"
id="toggle-password"
class="icon-button-inline"
aria-label="Show password"
>
<i class="fa-solid fa-eye"></i>
</button>
</div>
<button
type="button"
id="generate-password-btn"
class="icon-button"
title="Generate password"
>
<i class="fa-solid fa-wand-magic-sparkles"></i>
</button>
<button
type="button"
id="copy-password-btn"
class="icon-button"
title="Copy password"
>
<i class="fa-solid fa-copy"></i>
</button>
</div>
</div>
<div class="form-row">
<label for="notes">Notes</label>
<textarea id="notes" name="notes" rows="4"></textarea>
</div>
<div class="form-actions">
<button type="button" id="save-btn" class="primary">
<i class="fa-solid fa-floppy-disk"></i> Save Changes
</button>
<button type="button" id="discard-btn" class="secondary">
<i class="fa-solid fa-xmark"></i> Discard Changes
</button>
<button type="button" id="history-btn" class="secondary">
<i class="fa-solid fa-clock-rotate-left"></i> View History
</button>
</div>
<div class="lock-button-container">
<button type="button" id="lock-btn" class="lock-button">
<i class="fa-solid fa-lock"></i> Lock App
</button>
</div>
</form>
</section>
</main>
</div>
<div id="master-password-modal" class="modal" aria-hidden="false" style="display: flex">
<div class="modal-backdrop"></div>
<div
class="modal-content"
role="dialog"
aria-modal="true"
aria-labelledby="master-password-title"
>
<header class="modal-header">
<h2 id="master-password-title">Master Password</h2>
</header>
<div class="modal-body">
<div id="master-password-create-form" style="display: none">
<p>Set up a master password to protect your data:</p>
<div class="form-row">
<label for="master-password-input">Master Password</label>
<input type="password" id="master-password-input" />
</div>
<div class="form-row">
<label for="master-password-confirm">Confirm Password</label>
<input type="password" id="master-password-confirm" />
</div>
<button type="button" id="master-password-create-btn" class="primary">
Create Master Password
</button>
</div>
<div id="master-password-verify-form" style="display: none">
<p>Enter your master password to continue:</p>
<div class="form-row">
<label for="master-password-verify-input">Master Password</label>
<input type="password" id="master-password-verify-input" />
</div>
<button type="button" id="master-password-verify-btn" class="primary">
Unlock
</button>
<p
id="master-password-error"
style="color: red; margin-top: 10px; display: none"
>
Incorrect password
</p>
</div>
</div>
</div>
</div>
<div id="settings-modal" class="modal hidden" aria-hidden="true">
<div class="modal-backdrop"></div>
<div
class="modal-content"
role="dialog"
aria-modal="true"
aria-labelledby="settings-modal-title"
>
<header class="modal-header">
<h2 id="settings-modal-title">Settings</h2>
<button
type="button"
id="settings-close-btn"
class="icon-button"
aria-label="Close"
>
✕
</button>
</header>
<div class="modal-body">
<div class="form-row">
<label>Theme</label>
<button
type="button"
id="theme-toggle-btn"
class="secondary"
style="width: auto; padding: 8px 16px"
>
<i class="fa-solid fa-sun"></i> <span id="theme-label">Light</span>
</button>
</div>
<div class="form-row">
<label for="timeout-select">Auto-lock timeout</label>
<select id="timeout-select">
<option value="0">Never</option>
<option value="1">1 minute</option>
<option value="5">5 minutes</option>
<option value="10">10 minutes</option>
<option value="15">15 minutes</option>
<option value="30">30 minutes</option>
<option value="60">1 hour</option>
</select>
</div>
<div class="form-row">
<label>Master Password</label>
<button
type="button"
id="change-master-password-btn"
class="secondary"
style="width: auto; padding: 8px 16px"
>
<i class="fa-solid fa-key"></i> Change Master Password
</button>
</div>
</div>
<footer class="modal-footer">
<button type="button" id="settings-save-btn" class="primary">Save</button>
</footer>
</div>
</div>
<div id="change-master-password-modal" class="modal hidden" aria-hidden="true">
<div class="modal-backdrop"></div>
<div
class="modal-content"
role="dialog"
aria-modal="true"
aria-labelledby="change-master-password-title"
>
<header class="modal-header">
<h2 id="change-master-password-title">Change Master Password</h2>
<button
type="button"
id="change-master-password-close-btn"
class="icon-button"
aria-label="Close"
>
✕
</button>
</header>
<div class="modal-body">
<div class="form-row">
<label for="current-master-password">Current Password</label>
<input type="password" id="current-master-password" />
</div>
<div class="form-row">
<label for="new-master-password">New Password</label>
<input type="password" id="new-master-password" />
</div>
<div class="form-row">
<label for="confirm-new-master-password">Confirm New Password</label>
<input type="password" id="confirm-new-master-password" />
</div>
<p
id="change-master-password-error"
style="color: red; margin-top: 10px; display: none"
></p>
</div>
<footer class="modal-footer">
<button type="button" id="change-master-password-cancel-btn" class="secondary">
Cancel
</button>
<button type="button" id="change-master-password-save-btn" class="primary">
Change Password
</button>
</footer>
</div>
</div>
<div id="custom-dialog-modal" class="modal hidden" aria-hidden="true">
<div class="modal-backdrop"></div>
<div
class="modal-content dialog-content"
role="dialog"
aria-modal="true"
aria-labelledby="dialog-title"
>
<header class="modal-header">
<h2 id="dialog-title"></h2>
</header>
<div class="modal-body">
<p id="dialog-message"></p>
</div>
<footer class="modal-footer">
<button
type="button"
id="dialog-cancel-btn"
class="secondary"
style="display: none"
>
Cancel
</button>
<button type="button" id="dialog-ok-btn" class="primary">OK</button>
</footer>
</div>
</div>
<div id="generate-password-modal" class="modal hidden" aria-hidden="true">
<div class="modal-backdrop"></div>
<div
class="modal-content"
role="dialog"
aria-modal="true"
aria-labelledby="generate-password-title"
>
<header class="modal-header">
<h2 id="generate-password-title">Generate Password</h2>
<button
type="button"
id="generate-close-btn"
class="icon-button"
aria-label="Close"
>
✕
</button>
</header>
<div class="modal-body">
<div class="form-row">
<label for="gen-length"
>Length: <span id="gen-length-value">16</span></label
>
<input type="range" id="gen-length" min="4" max="30" value="16" />
</div>
<div class="gen-options-grid">
<div class="form-row">
<label>
<input type="checkbox" id="gen-uppercase" checked />
<span>Uppercase (A-Z)</span>
</label>
</div>
<div class="form-row">
<label>
<input type="checkbox" id="gen-lowercase" checked />
<span>Lowercase (a-z)</span>
</label>
</div>
<div class="form-row">
<label>
<input type="checkbox" id="gen-numbers" checked />
<span>Numbers (0-9)</span>
</label>
</div>
<div class="form-row">
<label>
<input type="checkbox" id="gen-symbols" checked />
<span>Symbols (!@#$%^&*)</span>
</label>
</div>
</div>
<div class="form-row">
<label for="gen-preview">Preview</label>
<div class="input-with-button">
<input type="text" id="gen-preview" readonly />
<button
type="button"
id="gen-copy-btn"
class="icon-button"
title="Copy password"
>
<i class="fa-solid fa-copy"></i>
</button>
<button
type="button"
id="gen-refresh-btn"
class="icon-button"
title="Regenerate"
>
<i class="fa-solid fa-arrows-rotate"></i>
</button>
</div>
</div>
</div>
<footer class="modal-footer">
<button type="button" id="generate-cancel-btn" class="secondary">Cancel</button>
<button
type="button"
id="generate-copy-footer-btn"
class="secondary"
style="display: none"
>
<i class="fa-solid fa-copy"></i> Copy Password
</button>
<button type="button" id="generate-use-btn" class="primary">
Use Password
</button>
</footer>
</div>
</div>
<div id="history-modal" class="modal hidden" aria-hidden="true">
<div class="modal-backdrop"></div>
<div
class="modal-content history-modal-content"
role="dialog"
aria-modal="true"
aria-labelledby="history-modal-title"
>
<header class="modal-header">
<h2 id="history-modal-title">Password History</h2>
<button
type="button"
id="history-close-btn"
class="icon-button"
aria-label="Close history"
>
✕
</button>
</header>
<div class="modal-body">
<div class="history-controls">
<label for="history-limit"
>Keep last N passwords for this entry (0 = unlimited):</label
>
<input type="number" id="history-limit" min="0" />
<button type="button" id="history-apply-limit" class="secondary">
<i class="fa-solid fa-floppy-disk"></i> Save Limit
</button>
<button type="button" id="history-clear" class="secondary danger">
<i class="fa-solid fa-trash"></i> Clear History
</button>
</div>
<table class="history-grid">
<thead>
<tr>
<th>Changed At</th>
<th>Password</th>
<th> Actions</th>
</tr>
</thead>
<tbody id="history-grid-body"></tbody>
</table>
</div>
<footer class="modal-footer">
<button type="button" id="history-done" class="primary">Done</button>
</footer>
</div>
</div>
<script type="module" src="dist/renderer.js"></script>
</body>
</html>