-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
475 lines (412 loc) · 23.7 KB
/
options.html
File metadata and controls
475 lines (412 loc) · 23.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="script-src 'self'; object-src 'self';">
<title>Brand Kit Dashboard - Settings</title>
<link rel="stylesheet" href="styles/options.css">
</head>
<body>
<div class="settings-container">
<header class="settings-header">
<h1>⚙️ Brand Kit Dashboard Settings</h1>
<p>Customize your dashboard to match your brand colors and preferences</p>
</header>
<!-- Navigation Menu -->
<nav class="settings-nav" id="settingsNav">
<div class="nav-content">
<h3>Quick Navigation</h3>
<ul class="nav-list">
<li><a href="#brand-colors" class="nav-link">Brand Colors</a></li>
<li><a href="#background" class="nav-link">Background</a></li>
<li><a href="#card-appearance" class="nav-link">Card Appearance</a></li>
<li><a href="#general-settings" class="nav-link">General</a></li>
<li><a href="#business-info" class="nav-link">Business Info</a></li>
<li><a href="#custom-header" class="nav-link">Custom Header</a></li>
<li><a href="#card-visibility" class="nav-link">Card Visibility</a></li>
<li><a href="#todoist" class="nav-link">Todoist</a></li>
<li><a href="#trackersSection" class="nav-link">Trackers</a></li>
<li><a href="#linksSection" class="nav-link">Quick Links</a></li>
<li><a href="#notesSection" class="nav-link">Notes</a></li>
<li><a href="#quickResponsesSection" class="nav-link">Quick Responses</a></li>
<li><a href="#export-import" class="nav-link">Export/Import</a></li>
</ul>
</div>
</nav>
<div class="settings-content">
<!-- Admin Lock Section -->
<section class="settings-section admin-lock-section">
<div class="admin-lock-header">
<h2>Admin Access</h2>
<div class="admin-status" id="adminStatus">
<span id="adminStatusText">Settings are locked</span>
<button id="lockUnlockBtn" class="lock-unlock-btn">Unlock Settings</button>
</div>
</div>
<!-- Admin Password Setup (shown when no password set) -->
<div id="adminPasswordSetup" class="admin-password-setup" style="display: none;">
<p class="section-description">Set an admin password to protect all settings. Staff members can view settings but cannot make changes.</p>
<div class="input-group">
<label for="adminPasswordInput">Admin Password</label>
<input type="password" id="adminPasswordInput" class="admin-password-input" placeholder="Enter password to protect settings">
<small>Leave empty to allow changes without password protection</small>
<div class="button-group-inline" style="margin-top: 1rem;">
<button id="setPasswordBtn" class="save-settings-btn" style="flex: 1;">Set Password</button>
</div>
</div>
</div>
<!-- Admin Unlock (shown when password is set) -->
<div id="adminUnlockForm" class="admin-unlock-form" style="display: none;">
<p class="section-description">Enter admin password to unlock settings and make changes.</p>
<div class="input-group">
<label for="adminUnlockPassword">Admin Password</label>
<input type="password" id="adminUnlockPassword" class="admin-password-input" placeholder="Enter admin password">
<div class="button-group-inline" style="margin-top: 1rem;">
<button id="unlockAdminBtn" class="unlock-btn" style="flex: 1;">Unlock Settings</button>
<button id="lockAdminBtn" class="lock-btn" style="display: none;">Lock Settings</button>
</div>
</div>
</div>
</section>
<!-- Brand Colors Section -->
<section class="settings-section locked" id="brand-colors">
<h2>Brand Colors</h2>
<div class="section-content">
<p class="section-description">Set your brand colors to customize the dashboard appearance</p>
<div class="color-group">
<div class="color-input-wrapper">
<label for="primaryColor">Primary Color</label>
<div class="color-picker-wrapper">
<input type="color" id="primaryColor" value="#4A90E2">
<input type="text" id="primaryColorText" value="#4A90E2" class="color-text-input">
</div>
<div class="color-preview-box">
<div class="preview-color" id="primaryColorPreview" style="background-color: #4A90E2;"></div>
</div>
</div>
<div class="color-input-wrapper">
<label for="secondaryColor">Secondary Color</label>
<div class="color-picker-wrapper">
<input type="color" id="secondaryColor" value="#50C878">
<input type="text" id="secondaryColorText" value="#50C878" class="color-text-input">
</div>
<div class="color-preview-box">
<div class="preview-color" id="secondaryColorPreview" style="background-color: #50C878;"></div>
</div>
</div>
<div class="color-input-wrapper">
<label for="accentColor">Accent Color</label>
<div class="color-picker-wrapper">
<input type="color" id="accentColor" value="#FF6B6B">
<input type="text" id="accentColorText" value="#FF6B6B" class="color-text-input">
</div>
<div class="color-preview-box">
<div class="preview-color" id="accentColorPreview" style="background-color: #FF6B6B;"></div>
</div>
</div>
</div>
</div>
</section>
<!-- Background Section -->
<section class="settings-section locked" id="background">
<h2>Background</h2>
<p class="section-description">Customize the background image and overlay</p>
<div class="input-group">
<label>Background Image</label>
<div style="display: flex; gap: 1rem; margin-bottom: 0.5rem;">
<div style="flex: 1;">
<label for="backgroundImage" style="display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: #64748b;">Image URL</label>
<input type="text" id="backgroundImage" placeholder="https://example.com/image.jpg or data URL" style="width: 100%;">
</div>
<div style="flex: 1;">
<label for="backgroundImageUpload" style="display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: #64748b;">Or Upload Image</label>
<input type="file" id="backgroundImageUpload" accept="image/*" style="width: 100%; padding: 0.5rem; border: 2px solid #e2e8f0; border-radius: 6px; font-size: 0.875rem;">
</div>
</div>
<small>Enter a URL to a background image, or upload an image file. Leave empty for default.</small>
<div id="backgroundImagePreview" style="margin-top: 1rem; display: none;">
<label style="display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: #64748b;">Preview</label>
<div style="border: 2px solid #e2e8f0; border-radius: 8px; overflow: hidden; max-width: 400px; max-height: 200px;">
<img id="backgroundImagePreviewImg" src="" alt="Background preview" style="width: 100%; height: 100%; object-fit: cover; display: block;">
</div>
<button type="button" id="clearBackgroundImage" class="reset-btn" style="margin-top: 0.5rem; padding: 0.5rem 1rem; font-size: 0.875rem;">Clear Image</button>
</div>
</div>
<div class="input-group">
<label class="toggle-label" style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem;">
<span>Enable Background Overlay</span>
<input type="checkbox" id="overlayEnabled" checked>
<span class="toggle-switch"></span>
</label>
<small style="display: block; margin-bottom: 1rem; color: #64748b;">Toggle the overlay on/off to show or hide the background image</small>
</div>
<div class="input-group" id="overlayControls">
<label for="backgroundColor">Background Overlay Color</label>
<div class="color-picker-wrapper">
<input type="color" id="backgroundColor" value="#0F172A">
<input type="text" id="backgroundColorText" value="rgba(15, 23, 42, 0.2)" class="color-text-input">
</div>
<label for="overlayOpacity" style="display: block; margin-top: 1rem; margin-bottom: 0.5rem; font-size: 0.875rem; color: #64748b;">
Overlay Opacity: <span id="overlayOpacityValue">20</span>%
</label>
<input type="range" id="overlayOpacity" min="0" max="100" value="20" style="width: 100%;">
<small>Adjust the overlay transparency. Lower values allow more of the background image to show through.</small>
</div>
</section>
<!-- Card Appearance Section -->
<section class="settings-section locked" id="card-appearance">
<h2>Card Appearance</h2>
<p class="section-description">Customize card colors and text</p>
<div class="input-group">
<label for="cardBackground">Card Background Color</label>
<div class="color-picker-wrapper">
<input type="color" id="cardBackground" value="#FFFFFF">
<input type="text" id="cardBackgroundText" value="rgba(255, 255, 255, 0.95)" class="color-text-input">
</div>
<div class="color-preview-box">
<div class="preview-color" id="cardBackgroundPreview" style="background-color: rgba(255, 255, 255, 0.95);"></div>
</div>
<label for="cardBackgroundOpacity" style="display: block; margin-top: 1rem; margin-bottom: 0.5rem; font-size: 0.875rem; color: #64748b;">
Card Background Opacity: <span id="cardBackgroundOpacityValue">95</span>%
</label>
<input type="range" id="cardBackgroundOpacity" min="0" max="100" value="95" style="width: 100%;">
<small>Adjust the card background transparency. Lower values make cards more transparent.</small>
</div>
<div class="input-group">
<label for="textPrimary">Primary Text Color</label>
<div class="color-picker-wrapper">
<input type="color" id="textPrimary" value="#1E293B">
<input type="text" id="textPrimaryText" value="#1E293B" class="color-text-input">
</div>
</div>
<div class="input-group">
<label for="textSecondary">Secondary Text Color</label>
<div class="color-picker-wrapper">
<input type="color" id="textSecondary" value="#64748B">
<input type="text" id="textSecondaryText" value="#64748B" class="color-text-input">
</div>
</div>
<div class="input-group">
<label for="textLight">Header Text Color</label>
<div class="color-picker-wrapper">
<input type="color" id="textLight" value="#FFFFFF">
<input type="text" id="textLightText" value="#FFFFFF" class="color-text-input">
</div>
<small>Color for text in the header area (greeting, date, business info)</small>
</div>
<div class="input-group">
<label for="borderColor">Border Color</label>
<div class="color-picker-wrapper">
<input type="color" id="borderColor" value="#E2E8F0">
<input type="text" id="borderColorText" value="rgba(226, 232, 240, 0.5)" class="color-text-input">
</div>
<label for="borderColorOpacity" style="display: block; margin-top: 1rem; margin-bottom: 0.5rem; font-size: 0.875rem; color: #64748b;">
Border Opacity: <span id="borderColorOpacityValue">50</span>%
</label>
<input type="range" id="borderColorOpacity" min="0" max="100" value="50" style="width: 100%;">
<small>Color for card borders and dividers. Adjust opacity for subtle or bold borders.</small>
</div>
<div class="input-group">
<label for="shadowIntensity">Shadow Intensity</label>
<label for="shadowIntensity" style="display: block; margin-top: 0.5rem; margin-bottom: 0.5rem; font-size: 0.875rem; color: #64748b;">
Shadow Intensity: <span id="shadowIntensityValue">15</span>%
</label>
<input type="range" id="shadowIntensity" min="0" max="100" value="15" style="width: 100%;">
<small>Adjust the intensity of card shadows. Higher values create more prominent shadows.</small>
</div>
<div class="input-group">
<label for="borderRadius">Border Radius</label>
<label for="borderRadius" style="display: block; margin-top: 0.5rem; margin-bottom: 0.5rem; font-size: 0.875rem; color: #64748b;">
Border Radius: <span id="borderRadiusValue">8</span>px
</label>
<input type="range" id="borderRadius" min="0" max="24" value="8" step="1" style="width: 100%;">
<small>Adjust the border radius for all cards, buttons, and UI elements. Higher values create more rounded corners.</small>
</div>
</section>
<!-- General Settings -->
<section class="settings-section locked" id="general-settings">
<h2>General Settings</h2>
<div class="input-group">
<label for="userName">Team/User Name</label>
<input type="text" id="userName" placeholder="Team">
<small>This name appears in the greeting</small>
</div>
<div class="input-group">
<label>Company Logo</label>
<input type="file" id="companyLogoUpload" accept="image/png" style="width: 100%; padding: 0.5rem; border: 2px solid #e2e8f0; border-radius: 6px; font-size: 0.875rem; margin-bottom: 0.5rem;">
<small>Upload a square PNG logo (recommended: 200x200px or larger). Will appear in the top-left corner.</small>
<div id="companyLogoPreview" style="margin-top: 1rem; display: none;">
<div style="border: 2px solid #e2e8f0; border-radius: 8px; overflow: hidden; max-width: 150px; max-height: 150px; background: white; padding: 0.5rem;">
<img id="companyLogoPreviewImg" src="" alt="Logo preview" style="width: 100%; height: 100%; object-fit: contain; display: block;">
</div>
<button type="button" id="clearCompanyLogo" class="reset-btn" style="margin-top: 0.5rem; padding: 0.5rem 1rem; font-size: 0.875rem;">Clear Logo</button>
</div>
<input type="text" id="companyLogo" style="display: none;">
</div>
<div class="input-group">
<label for="companyLogoUrl">Logo Link URL (Optional)</label>
<input type="url" id="companyLogoUrl" placeholder="https://example.com">
<small>Set a URL to make the logo clickable. Users can click the logo to navigate to this website.</small>
</div>
</section>
<!-- Business Information -->
<section class="settings-section locked" id="business-info">
<h2>Business Information</h2>
<p class="section-description">Add up to 4 lines of business information (address, phone, etc.). You can use <code>{{userName}}</code> to insert the team/user name.</p>
<div class="input-group">
<label for="businessInfoLine1">Line 1</label>
<input type="text" id="businessInfoLine1" placeholder="e.g., 123 Main Street">
</div>
<div class="input-group">
<label for="businessInfoLine2">Line 2</label>
<input type="text" id="businessInfoLine2" placeholder="e.g., Suite 100">
</div>
<div class="input-group">
<label for="businessInfoLine3">Line 3</label>
<input type="text" id="businessInfoLine3" placeholder="e.g., City, State 12345">
</div>
<div class="input-group">
<label for="businessInfoLine4">Line 4</label>
<input type="text" id="businessInfoLine4" placeholder="e.g., Phone: (555) 123-4567">
</div>
</section>
<!-- Custom Header -->
<section class="settings-section locked" id="custom-header">
<h2>Custom Header</h2>
<p class="section-description">Customize the header text. Use placeholders: <code>{{greeting}}</code>, <code>{{date}}</code>, <code>{{userName}}</code> (case-insensitive)</p>
<div class="input-group">
<label for="customHeaderTitle">Header Title</label>
<input type="text" id="customHeaderTitle" placeholder="e.g., Welcome, {{greeting}}!">
<small>Use <code>{{greeting}}</code> (or <code>{{Greeting}}</code>) to insert the time-based greeting. Use <code>{{userName}}</code> to insert the team/user name.</small>
</div>
<div class="input-group">
<label for="customHeaderText">Header Text</label>
<input type="text" id="customHeaderText" placeholder="e.g., Today is {{date}}">
<small>Use <code>{{date}}</code> (or <code>{{Date}}</code>) to insert the current date and time. Use <code>{{userName}}</code> to insert the team/user name.</small>
</div>
</section>
<!-- Card Visibility -->
<section class="settings-section locked" id="card-visibility">
<h2>Card Visibility & Order</h2>
<p class="section-description">Arrange card order and control which cards are visible on the dashboard. Drag cards to reorder them left to right.</p>
<div class="input-group">
<label style="display: block; margin-bottom: 0.75rem; font-weight: 600; color: var(--text-primary);">Card Order & Visibility</label>
<div id="cardOrderList" class="card-order-list"></div>
<small style="display: block; margin-top: 0.75rem; color: #64748b;">Drag cards to reorder. Cards appear left to right on the dashboard in the order shown above.</small>
</div>
<div class="input-group" style="margin-top: 1.5rem;">
<button id="addTextCardBtn" class="btn-secondary" style="width: 100%;">+ Add Blank Text Card</button>
<small style="display: block; margin-top: 0.5rem; color: #64748b;">Add a custom text card to display information on the dashboard</small>
</div>
<div id="textCardsList" class="text-cards-list" style="margin-top: 1.5rem;"></div>
</section>
<!-- Todoist Settings -->
<section class="settings-section locked" id="todoist">
<h2>Todoist Integration</h2>
<p class="section-description">Connect your Todoist account to display today's tasks on your dashboard</p>
<div class="input-group">
<label for="todoistApiKey">Todoist API Token</label>
<input type="text" id="todoistApiKey" placeholder="Your Todoist API token">
<small>
Get your API token from
<a href="https://todoist.com/app/settings/integrations" target="_blank">Todoist Settings → Integrations</a>
</small>
</div>
</section>
<!-- Trackers Section -->
<section class="settings-section" id="trackersSection">
<h2>Trackers</h2>
<p class="section-description">Create countdowns or countups to track important dates and events. Only pinned trackers appear on the dashboard.</p>
<div class="locked-message" id="trackersLocked">
<p>🔒 Unlock settings above to manage trackers.</p>
</div>
<div id="trackersManagement" class="trackers-management" style="display: none;">
<button id="addTrackerBtn" class="add-tracker-btn">+ Add Tracker</button>
<div class="trackers-list" id="trackersList"></div>
</div>
</section>
<!-- Quick Links Section -->
<section class="settings-section" id="linksSection">
<h2>Quick Links</h2>
<p class="section-description">Manage quick links that appear on the dashboard. Links can be added individually or in batch.</p>
<div class="locked-message" id="linksLocked">
<p>🔒 Unlock settings above to manage links.</p>
</div>
<div id="linksManagement" class="links-management" style="display: none;">
<div class="links-header">
<h3>Manage Quick Links</h3>
<div class="links-header-actions">
<button id="addLinkBtn" class="add-link-btn">+ Add Link</button>
<button id="batchAddLinkBtn" class="add-link-btn">+ Batch Add</button>
</div>
</div>
<div id="linksList" class="admin-links-list">
<!-- Links will be loaded here -->
</div>
</div>
</section>
<!-- Notes Section -->
<section class="settings-section" id="notesSection">
<h2>Notes</h2>
<p class="section-description">Manage notes that appear on the dashboard.</p>
<div class="locked-message" id="notesLocked">
<p>🔒 Unlock settings above to manage notes.</p>
</div>
<div id="notesManagement" class="notes-management" style="display: none;">
<div class="notes-header">
<h3>Manage Notes</h3>
<button id="addNoteBtn" class="add-note-btn">+ Add Note</button>
</div>
<div id="notesList" class="admin-notes-list">
<!-- Notes will be loaded here -->
</div>
</div>
</section>
<!-- Quick Responses Admin Section -->
<section class="settings-section" id="quickResponsesSection">
<h2>Quick Responses</h2>
<p class="section-description">Manage text templates that appear in the extension popup. Users can click to copy them to clipboard.</p>
<div class="locked-message" id="quickResponsesLocked">
<p>🔒 Unlock settings above to manage quick responses.</p>
</div>
<div id="responsesManagement" class="responses-management" style="display: none;">
<div class="responses-header">
<h3>Manage Quick Responses</h3>
<button id="addResponseBtn" class="add-response-btn">+ Add Response</button>
</div>
<div id="responsesList" class="admin-responses-list">
<!-- Responses will be loaded here -->
</div>
</div>
</section>
<!-- Export/Import Section -->
<section class="settings-section locked" id="export-import">
<h2>Export & Import Settings</h2>
<p class="section-description">Backup your settings or share them with your team</p>
<div class="input-group">
<div class="button-group-inline">
<button id="exportBtn" class="export-btn">Export Settings</button>
<button id="importBtn" class="import-btn">Import Settings</button>
</div>
<small>Export creates a JSON file you can share. Import loads settings from a JSON file.</small>
<input type="file" id="importFile" accept=".json" style="display: none;">
</div>
</section>
<!-- Actions -->
<div class="settings-actions">
<button id="saveBtn" class="save-settings-btn">Save Settings</button>
<button id="resetBtn" class="reset-btn">Reset to Defaults</button>
<button id="previewBtn" class="preview-btn">Preview Dashboard</button>
<button id="openDashboardBtn" class="open-dashboard-btn" style="display: none;">Open Dashboard</button>
</div>
<div id="statusMessage" class="status-message"></div>
</div>
</div>
<!-- Scroll to Top Button -->
<button id="scrollToTop" class="scroll-to-top" aria-label="Scroll to top" style="display: none;">
↑
</button>
<script src="scripts/options.js"></script>
</body>
</html>