-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
355 lines (346 loc) · 11.9 KB
/
popup.html
File metadata and controls
355 lines (346 loc) · 11.9 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>zCloudPass</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="popup.css" />
</head>
<body>
<div id="app">
<!-- ─── Login View ─── -->
<div id="login-view" class="view">
<div class="header-logo">
<div class="logo-glow"></div>
<img src="icons/icon.svg" width="72" />
</div>
<h1 class="app-title">zCloudPass</h1>
<p class="app-subtitle">Sign in to your password vault</p>
<form id="login-form" autocomplete="off">
<div class="form-group">
<label for="email">Email</label>
<div class="input-wrapper">
<svg
class="input-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path
d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"
/>
<polyline points="22,6 12,13 2,6" />
</svg>
<input
type="email"
id="email"
placeholder="you@example.com"
required
/>
</div>
</div>
<div class="form-group">
<label for="master-password">Master Password</label>
<div class="input-wrapper">
<svg
class="input-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<rect x="3" y="11" width="18" height="11" rx="2" />
<path d="M7 11V7a5 5 0 0 1 10 0v4" />
</svg>
<input
type="password"
id="master-password"
placeholder="••••••••"
required
/>
</div>
</div>
<details class="api-toggle">
<summary>Advanced</summary>
<div class="form-group" style="margin-top: 8px">
<label for="api-url">API URL</label>
<div class="input-wrapper">
<svg
class="input-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<circle cx="12" cy="12" r="10" />
<line x1="2" y1="12" x2="22" y2="12" />
<path
d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10A15.3 15.3 0 0 1 12 2z"
/>
</svg>
<input
type="url"
id="api-url"
placeholder="https://zcloudpass-backend.onrender.com/api/v1"
/>
</div>
</div>
</details>
<div id="login-error" class="error-msg hidden"></div>
<button type="submit" id="login-btn" class="btn-primary">
<span class="btn-text">Sign In</span>
<span class="btn-loader hidden">
<svg
class="spin"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2.5"
>
<path
d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"
/>
</svg>
</span>
</button>
</form>
</div>
<!-- ─── Dashboard View ─── -->
<div id="dashboard-view" class="view hidden">
<div class="dash-header">
<div class="dash-user">
<div class="user-avatar">
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" />
<circle cx="12" cy="7" r="4" />
</svg>
</div>
<div class="user-info">
<span id="user-email" class="user-email">user@example.com</span>
<span class="user-status">
<span class="status-dot"></span>
Vault Connected
</span>
</div>
</div>
<button id="logout-btn" class="btn-icon" title="Sign Out">
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<polyline points="16 17 21 12 16 7" />
<line x1="21" y1="12" x2="9" y2="12" />
</svg>
</button>
</div>
<!-- Tab bar -->
<div class="tab-bar">
<button class="tab active" data-tab="passwords">
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<rect x="3" y="11" width="18" height="11" rx="2" />
<path d="M7 11V7a5 5 0 0 1 10 0v4" />
</svg>
Passwords
</button>
<button class="tab" data-tab="save">
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path
d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"
/>
<polyline points="17 21 17 13 7 13 7 21" />
<polyline points="7 3 7 8 15 8" />
</svg>
Save New
</button>
</div>
<!-- Passwords Tab -->
<div id="tab-passwords" class="tab-panel">
<div class="search-box">
<svg
class="search-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<circle cx="11" cy="11" r="8" />
<line x1="21" y1="21" x2="16.65" y2="16.65" />
</svg>
<input
type="text"
id="search-input"
placeholder="Search passwords…"
/>
</div>
<div id="entries-list" class="entries-list">
<div class="empty-state">
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
>
<rect x="3" y="11" width="18" height="11" rx="2" />
<path d="M7 11V7a5 5 0 0 1 10 0v4" />
<circle cx="12" cy="16" r="1" />
</svg>
<p>No passwords saved yet</p>
<span>Login to any site to capture credentials</span>
</div>
</div>
</div>
<!-- Save Tab -->
<div id="tab-save" class="tab-panel hidden">
<form id="save-form" autocomplete="off">
<div class="form-group">
<label for="save-name">Site Name</label>
<div class="input-wrapper">
<svg
class="input-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<rect x="2" y="3" width="20" height="14" rx="2" />
<line x1="8" y1="21" x2="16" y2="21" />
<line x1="12" y1="17" x2="12" y2="21" />
</svg>
<input
type="text"
id="save-name"
placeholder="Example Site"
required
/>
</div>
</div>
<div class="form-group">
<label for="save-url">Website URL</label>
<div class="input-wrapper">
<svg
class="input-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<circle cx="12" cy="12" r="10" />
<line x1="2" y1="12" x2="22" y2="12" />
<path
d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10A15.3 15.3 0 0 1 12 2z"
/>
</svg>
<input
type="text"
id="save-url"
placeholder="https://example.com"
/>
</div>
</div>
<div class="form-group">
<label for="save-username">Username</label>
<div class="input-wrapper">
<svg
class="input-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" />
<circle cx="12" cy="7" r="4" />
</svg>
<input
type="text"
id="save-username"
placeholder="michael@dundlermifflin.com"
required
/>
</div>
</div>
<div class="form-group">
<label for="save-password">Password</label>
<div class="input-wrapper">
<svg
class="input-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<rect x="3" y="11" width="18" height="11" rx="2" />
<path d="M7 11V7a5 5 0 0 1 10 0v4" />
</svg>
<input
type="password"
id="save-password"
placeholder="••••••••"
required
/>
<button
type="button"
id="toggle-save-pw"
class="pw-toggle"
title="Show password"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" />
<circle cx="12" cy="12" r="3" />
</svg>
</button>
</div>
</div>
<div id="save-error" class="error-msg hidden"></div>
<div id="save-success" class="success-msg hidden"></div>
<button type="submit" id="save-btn" class="btn-primary">
<span class="btn-text">Save to Vault</span>
<span class="btn-loader hidden">
<svg
class="spin"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2.5"
>
<path
d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"
/>
</svg>
</span>
</button>
</form>
</div>
</div>
</div>
<script src="popup.js"></script>
</body>
</html>