-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
775 lines (727 loc) · 43.7 KB
/
index.html
File metadata and controls
775 lines (727 loc) · 43.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
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Task Manager</title>
<!-- PWA Meta Tags -->
<meta name="description" content="Complete task and habit management system with gamification">
<meta name="theme-color" content="#4CAF50">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="TaskManager">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="css/styles.css">
<script defer type="module" src="js/storage.js"></script>
<script defer type="module" src="js/app.js"></script>
</head>
<body>
<div class="app-container">
<!-- Header -->
<header class="header">
<div class="header-content">
<h1>📋 Task Manager</h1>
<div class="header-stats">
<div class="stat">
<span class="stat-label">Level</span>
<span class="stat-value" id="userLevel">1</span>
<span class="stat-sublabel" id="levelProgress" style="font-size: 0.7rem; color: #ccc; display: block; margin-top: -2px;">0/30 tasks</span>
</div>
<div class="stat">
<span class="stat-label">Streak</span>
<span class="stat-value" id="dailyStreak">0</span>
</div>
</div>
</div>
</header>
<!-- Date Navigator -->
<div class="date-navigator">
<button class="date-nav-btn" id="prevDayBtn" aria-label="Previous day">‹</button>
<div class="date-display">
<span id="selectedDateDisplay">Today</span>
<button class="today-btn" id="goTodayBtn" style="display:none;">Back to Today</button>
</div>
<button class="date-nav-btn" id="nextDayBtn" aria-label="Next day">›</button>
</div>
<!-- Navigation Tabs -->
<button class="hamburger-menu" id="hamburgerMenu" aria-label="Toggle navigation">
<span></span>
<span></span>
<span></span>
</button>
<nav class="nav-tabs" id="navTabs">
<button class="nav-tab active" data-tab="dashboard">🏠 Dashboard</button>
<button class="nav-tab" data-tab="tasks">✓ Tasks</button>
<button class="nav-tab" data-tab="projects">📁 Projects</button>
<button class="nav-tab" data-tab="habits">⭐ Habits</button>
<button class="nav-tab" data-tab="wishlist">🎁 Wish List</button>
<button class="nav-tab" data-tab="shopping">🛒 Shopping</button>
<button class="nav-tab" data-tab="notes">📝 Notes</button>
<button class="nav-tab" data-tab="finances">💰 Finances</button>
<button class="nav-tab" data-tab="settings">⚙️ Settings</button>
</nav>
<!-- Main Content -->
<main class="main-content">
<!-- Dashboard Tab -->
<section class="tab-content active" id="dashboard-tab">
<div class="dashboard-grid">
<!-- Today's Overview -->
<div class="card dashboard-card">
<h2>Today's Overview</h2>
<div class="overview-stats">
<div class="overview-item overview-item-clickable" id="todayTasksItem">
<span class="label">Tasks Due Today</span>
<span class="value" id="todayTasksCount">0</span>
</div>
<div class="overview-item overview-item-clickable" id="overdueTasksItem">
<span class="label">Overdue Tasks</span>
<span class="value overdue" id="overdueTasksCount">0</span>
</div>
<div class="overview-item">
<span class="label">Completed Today</span>
<span class="value" id="completedTodayCount">0</span>
</div>
<div class="overview-item">
<span class="label">Incomplete Habits</span>
<span class="value" id="incompleteHabitsCount">0</span>
</div>
</div>
<div class="incomplete-habits-list" id="incompleteHabitsList" style="margin-top: 1rem;">
<!-- Incomplete habits will be populated here -->
</div>
</div>
<!-- Recent Activity -->
<div class="card dashboard-card full-width">
<h2>Recent Activity</h2>
<div class="activity-list" id="recentActivity">
<p class="empty-state">No activity yet. Start completing tasks!</p>
</div>
</div>
<!-- Project Progress -->
<div class="card dashboard-card full-width">
<h2>Active Projects</h2>
<div class="projects-summary" id="projectsSummary">
<p class="empty-state">No active projects. Create one to get started!</p>
</div>
</div>
</div>
</section>
<!-- Tasks Tab -->
<section class="tab-content" id="tasks-tab">
<div class="tasks-container">
<div class="tasks-header">
<h2>Tasks</h2>
<div class="tasks-header-actions">
<button class="btn btn-secondary" id="toggleTaskViewBtn">⊞ Expand Details</button>
<button class="btn btn-primary" id="addTaskBtn">+ Add Task</button>
</div>
</div>
<!-- Task Filters -->
<div class="filters">
<select id="statusFilter" class="filter-select">
<option value="">All Statuses</option>
<option value="pending">Pending</option>
<option value="completed">Completed</option>
<option value="overdue">Overdue</option>
</select>
<input type="text" id="searchTasks" class="filter-input" placeholder="Search tasks...">
<button class="btn btn-secondary" id="hideCompletedBtn">👁 Hide Completed</button>
<button class="btn btn-secondary" id="resetFiltersBtn">↺ Reset Filters</button>
</div>
<!-- Task List -->
<div class="task-list" id="taskList">
<p class="empty-state">No tasks yet. Add one to get started!</p>
</div>
</div>
<!-- Task Modal -->
<div class="modal" id="taskModal">
<div class="modal-content">
<div class="modal-header">
<h3>Task Details</h3>
<button class="close-btn">×</button>
</div>
<form id="taskForm" class="task-form">
<div class="form-group">
<label for="taskTitle">Title *</label>
<input type="text" id="taskTitle" required>
</div>
<div class="form-group">
<label for="taskDescription">Description</label>
<textarea id="taskDescription" rows="4"></textarea>
</div>
<div class="form-row">
<div class="form-group">
<label for="taskDueDate">Due Date</label>
<input type="date" id="taskDueDate">
</div>
</div>
<div class="form-group">
<label for="taskRepeatType">Repeat Type</label>
<select id="taskRepeatType">
<option value="none">None</option>
<option value="daily">Daily</option>
<option value="weekly">Weekly</option>
<option value="monthly">Monthly</option>
<option value="yearly">Yearly</option>
<option value="custom">Custom Days</option>
<option value="movable">Movable (From Completion)</option>
</select>
</div>
<div class="form-group" id="repeatUnitGroup" style="display: none;">
<label for="taskRepeatUnit">Repeat Every</label>
<div class="repeat-unit-input">
<input type="number" id="taskRepeatUnit" min="1" value="1">
<span id="repeatUnitLabel">week(s)</span>
</div>
</div>
<div class="form-group" id="taskDaysGroup" style="display: none;">
<label>Days of Week</label>
<div class="days-selector">
<label class="day-checkbox"><input type="checkbox" name="taskDay" value="0"> Sunday</label>
<label class="day-checkbox"><input type="checkbox" name="taskDay" value="1"> Monday</label>
<label class="day-checkbox"><input type="checkbox" name="taskDay" value="2"> Tuesday</label>
<label class="day-checkbox"><input type="checkbox" name="taskDay" value="3"> Wednesday</label>
<label class="day-checkbox"><input type="checkbox" name="taskDay" value="4"> Thursday</label>
<label class="day-checkbox"><input type="checkbox" name="taskDay" value="5"> Friday</label>
<label class="day-checkbox"><input type="checkbox" name="taskDay" value="6"> Saturday</label>
</div>
</div>
<div class="form-group" id="customRepeatGroup" style="display: none;">
<label for="customRepeatDays">Repeat Every (Days)</label>
<input type="number" id="customRepeatDays" min="1">
</div>
<div class="form-group" id="movableRepeatGroup" style="display: none;">
<label for="movableRepeatDays">Days Until Due (From Completion)</label>
<input type="number" id="movableRepeatDays" min="1">
</div>
<div class="form-group">
<label for="taskProject">Project</label>
<select id="taskProject">
<option value="">None</option>
</select>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save Task</button>
<button type="button" class="btn btn-secondary" id="deleteTaskBtn" style="display: none;">Delete</button>
<button type="button" class="btn btn-secondary" id="cancelTaskBtn">Cancel</button>
</div>
</form>
</div>
</div>
</section>
<!-- Projects Tab -->
<section class="tab-content" id="projects-tab">
<div class="projects-container">
<div class="projects-header">
<h2>Projects</h2>
<button class="btn btn-primary" id="addProjectBtn">+ Add Project</button>
</div>
<!-- Projects List -->
<div class="projects-list" id="projectsList">
<p class="empty-state">No projects yet. Create one to organize your tasks!</p>
</div>
</div>
<!-- Project Modal -->
<div class="modal" id="projectModal">
<div class="modal-content">
<div class="modal-header">
<h3>Project Details</h3>
<button class="close-btn">×</button>
</div>
<form id="projectForm" class="project-form">
<div class="form-group">
<label for="projectName">Name *</label>
<input type="text" id="projectName" required>
</div>
<div class="form-group">
<label for="projectDescription">Description</label>
<textarea id="projectDescription" rows="3"></textarea>
</div>
<div class="form-group">
<label for="projectColor">Color Tag</label>
<input type="color" id="projectColor" value="#3b82f6">
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save Project</button>
<button type="button" class="btn btn-secondary" id="deleteProjectBtn" style="display: none;">Delete</button>
<button type="button" class="btn btn-secondary" id="cancelProjectBtn">Cancel</button>
</div>
</form>
</div>
</div>
<!-- Project Detail Modal -->
<div class="modal" id="projectDetailModal">
<div class="modal-content" style="max-width: 800px;">
<div class="modal-header">
<h3 id="projectDetailTitle">Project Details</h3>
<button class="close-btn">×</button>
</div>
<div class="project-detail-content">
<p id="projectDetailDescription" style="margin-bottom: 1rem; color: #666;"></p>
<div class="project-detail-stats" style="display: flex; gap: 1rem; margin-bottom: 1.5rem;">
<div class="summary-card" style="flex: 1;">
<span class="label">Total Tasks</span>
<span class="value" id="projectDetailTotalTasks">0</span>
</div>
<div class="summary-card" style="flex: 1;">
<span class="label">Completed</span>
<span class="value" id="projectDetailCompletedTasks">0</span>
</div>
<div class="summary-card" style="flex: 1;">
<span class="label">Progress</span>
<span class="value" id="projectDetailProgress">0%</span>
</div>
</div>
<h4 style="margin-bottom: 0.5rem;">Related Tasks</h4>
<div class="task-list" id="projectDetailTaskList">
<p class="empty-state">No tasks in this project yet.</p>
</div>
<div class="form-actions" style="margin-top: 1.5rem;">
<button type="button" class="btn btn-primary" id="editProjectFromDetailBtn">Edit Project</button>
<button type="button" class="btn btn-secondary" id="closeProjectDetailBtn">Close</button>
</div>
</div>
</div>
</div>
</section>
<!-- Habits Tab -->
<section class="tab-content" id="habits-tab">
<div class="habits-container">
<div class="habits-header">
<h2>Daily Habits</h2>
<button class="btn btn-primary" id="addHabitBtn">+ Add Habit</button>
</div>
<!-- Habits List -->
<div class="habits-list" id="habitsList">
<p class="empty-state">No habits yet. Create daily habits to build streaks!</p>
</div>
</div>
<!-- Habit Modal -->
<div class="modal" id="habitModal">
<div class="modal-content">
<div class="modal-header">
<h3>Daily Habit</h3>
<button class="close-btn">×</button>
</div>
<form id="habitForm" class="habit-form">
<div class="form-group">
<label for="habitName">Habit Name *</label>
<input type="text" id="habitName" required>
</div>
<div class="form-group">
<label for="habitDescription">Description</label>
<textarea id="habitDescription" rows="3"></textarea>
</div>
<div class="form-group">
<label for="habitIcon">Icon/Emoji</label>
<div class="emoji-selector">
<input type="hidden" id="habitIcon" value="⭐">
<div class="emoji-display" id="habitIconDisplay">⭐</div>
<button type="button" class="btn btn-secondary" id="habitEmojiBtn">Choose Emoji</button>
</div>
</div>
<div class="form-group">
<label for="habitCategory">Category</label>
<select id="habitCategory">
<option value="">Select category...</option>
<option value="__add_new__">+ Add New Category</option>
</select>
<div id="habitCategoryInput" style="display: none; margin-top: 0.5rem;">
<input type="text" id="habitCategoryText" placeholder="Enter new category name">
<div style="display: flex; gap: 0.5rem; margin-top: 0.5rem;">
<button type="button" class="btn btn-secondary" id="habitCategorySave">Add</button>
<button type="button" class="btn btn-secondary" id="habitCategoryCancel">Cancel</button>
</div>
</div>
</div>
<div class="form-group">
<label for="habitTargetGoal">Daily Target Goal</label>
<input type="number" id="habitTargetGoal" min="1" value="1" placeholder="e.g., 10 for 10 push-ups">
<small style="color: #666; font-size: 0.85rem;">How many times should this habit be completed per day?</small>
</div>
<div class="form-group">
<label>Days of Week</label>
<div class="days-selector">
<label class="day-checkbox"><input type="checkbox" name="habitDay" value="0"> Sunday</label>
<label class="day-checkbox"><input type="checkbox" name="habitDay" value="1"> Monday</label>
<label class="day-checkbox"><input type="checkbox" name="habitDay" value="2"> Tuesday</label>
<label class="day-checkbox"><input type="checkbox" name="habitDay" value="3"> Wednesday</label>
<label class="day-checkbox"><input type="checkbox" name="habitDay" value="4"> Thursday</label>
<label class="day-checkbox"><input type="checkbox" name="habitDay" value="5"> Friday</label>
<label class="day-checkbox"><input type="checkbox" name="habitDay" value="6"> Saturday</label>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save Habit</button>
<button type="button" class="btn btn-secondary" id="deleteHabitBtn" style="display: none;">Delete</button>
<button type="button" class="btn btn-secondary" id="cancelHabitBtn">Cancel</button>
</div>
</form>
</div>
</div>
<!-- Emoji Picker Modal -->
<div class="modal" id="emojiModal">
<div class="modal-content emoji-picker-modal">
<div class="modal-header">
<h3>Choose Emoji</h3>
<button class="close-btn" id="closeEmojiBtn">×</button>
</div>
<div class="emoji-grid" id="emojiGrid">
<!-- Emojis will be populated by JavaScript -->
</div>
</div>
</div>
</section>
<!-- Finances Tab -->
<section class="tab-content" id="finances-tab">
<div class="finances-container">
<div class="finances-header">
<h2>Finances</h2>
<div class="finance-buttons">
<button class="btn btn-success" id="addExpenseBtn">+ Add Expense</button>
<button class="btn btn-success" id="addRevenueBtn">+ Add Revenue</button>
</div>
</div>
<!-- Finance Summary -->
<div class="finance-summary">
<div class="summary-card income">
<span class="label">Total Income</span>
<span class="value" id="totalIncome">$0.00</span>
</div>
<div class="summary-card expense">
<span class="label">Total Expenses</span>
<span class="value" id="totalExpenses">$0.00</span>
</div>
<div class="summary-card balance">
<span class="label">Net Balance</span>
<span class="value" id="netBalance">$0.00</span>
</div>
</div>
<!-- Date Range Filter -->
<div class="filters" style="margin-bottom: 1rem;">
<button class="btn btn-secondary" id="prevMonthBtn" style="margin-right: 0.5rem;">‹ Prev</button>
<label style="margin-right: 0.5rem;">From:</label>
<input type="date" id="financeStartDate" class="filter-input" style="width: auto;">
<label style="margin-left: 1rem; margin-right: 0.5rem;">To:</label>
<input type="date" id="financeEndDate" class="filter-input" style="width: auto;">
<button class="btn btn-secondary" id="filterFinancesBtn" style="margin-left: 0.5rem;">Apply</button>
<button class="btn btn-secondary" id="resetFinanceFilterBtn" style="margin-left: 0.5rem;">This Month</button>
<button class="btn btn-secondary" id="nextMonthBtn" style="margin-left: 0.5rem;">Next ›</button>
</div>
<!-- Tabs for Expenses, Revenue, Charts -->
<div class="finance-tabs">
<button class="finance-tab active" data-finance-tab="expenses">Expenses</button>
<button class="finance-tab" data-finance-tab="revenue">Revenue</button>
<button class="finance-tab" data-finance-tab="charts">Charts</button>
</div>
<!-- Expenses List -->
<div class="finance-content active" id="expenses-content">
<div class="finance-list" id="expensesList">
<p class="empty-state">No expenses. Add one to track spending!</p>
</div>
</div>
<!-- Revenue List -->
<div class="finance-content" id="revenue-content">
<div class="finance-list" id="revenueList">
<p class="empty-state">No revenue. Add one to track income!</p>
</div>
</div>
<!-- Charts -->
<div class="finance-content" id="charts-content">
<div class="finance-charts">
<div class="chart-section">
<h3 class="chart-title">Expenses by Category</h3>
<div id="expensePieChart" class="chart-container"></div>
</div>
<div class="chart-section">
<h3 class="chart-title">Income & Spending Flow</h3>
<div id="sankeyChart" class="chart-container"></div>
</div>
</div>
</div>
</div>
<!-- Finance Modal -->
<div class="modal" id="financeModal">
<div class="modal-content">
<div class="modal-header">
<h3 id="financeModalTitle">Add Finance Item</h3>
<button class="close-btn">×</button>
</div>
<form id="financeForm" class="finance-form">
<div class="form-group">
<label for="financeDescription">Description *</label>
<input type="text" id="financeDescription" required>
</div>
<div class="form-group">
<label for="financeAmount">Amount *</label>
<input type="number" id="financeAmount" step="0.01" min="0" required>
</div>
<div class="form-group">
<label for="financeDate">Date</label>
<input type="date" id="financeDate">
</div>
<div class="form-group" id="financeRecurringGroup">
<label for="financeRecurring">Recurring</label>
<select id="financeRecurring">
<option value="once">One-time</option>
<option value="monthly">Monthly</option>
<option value="yearly">Yearly</option>
</select>
</div>
<div class="form-group">
<label for="financeCategory">Category</label>
<select id="financeCategory">
<option value="">Select category...</option>
<option value="__add_new__">+ Add New Category</option>
</select>
<div id="financeCategoryInput" style="display: none; margin-top: 0.5rem;">
<input type="text" id="financeCategoryText" placeholder="Enter new category name">
<div style="display: flex; gap: 0.5rem; margin-top: 0.5rem;">
<button type="button" class="btn btn-secondary" id="financeCategorySave">Add</button>
<button type="button" class="btn btn-secondary" id="financeCategoryCancel">Cancel</button>
</div>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-secondary" id="deleteFinanceBtn" style="display: none;">Delete</button>
<button type="button" class="btn btn-secondary" id="cancelFinanceBtn">Cancel</button>
</div>
</form>
</div>
</div>
</section>
<!-- Wish List Tab -->
<section class="tab-content" id="wishlist-tab">
<div class="wishlist-container">
<div class="wishlist-header">
<h2>Wish List</h2>
<div class="wishlist-header-actions">
<button class="btn btn-secondary" id="addWishListBtn">+ Add List</button>
<button class="btn btn-primary" id="addWishItemBtn">+ Add Item</button>
</div>
</div>
<div id="wishListContent">
<p class="empty-state">No items in your wish list. Add a list or item to get started!</p>
</div>
</div>
<!-- Wish List Modal (for creating/editing named lists) -->
<div class="modal" id="wishListModal">
<div class="modal-content">
<div class="modal-header">
<h3 id="wishListModalTitle">Add List</h3>
<button class="close-btn">×</button>
</div>
<form id="wishListForm">
<div class="form-group">
<label for="wishListName">List Name *</label>
<input type="text" id="wishListName" required>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-danger" id="deleteWishListBtn" style="display: none;">Delete</button>
<button type="button" class="btn btn-secondary" id="cancelWishListBtn">Cancel</button>
</div>
</form>
</div>
</div>
<!-- Wish Item Modal -->
<div class="modal" id="wishItemModal">
<div class="modal-content">
<div class="modal-header">
<h3 id="wishItemModalTitle">Add Wish List Item</h3>
<button class="close-btn">×</button>
</div>
<form id="wishItemForm">
<div class="form-group">
<label for="wishItemTitle">Title *</label>
<input type="text" id="wishItemTitle" required>
</div>
<div class="form-group">
<label for="wishItemList">List</label>
<select id="wishItemList">
<option value="">Uncategorized</option>
</select>
</div>
<div class="form-group">
<label for="wishItemUrl">URL (optional)</label>
<input type="url" id="wishItemUrl" placeholder="https://...">
</div>
<div class="form-group">
<label for="wishItemPrice">Approximate Price (optional)</label>
<input type="number" id="wishItemPrice" min="0" step="0.01" placeholder="0.00">
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-secondary" id="deleteWishItemBtn" style="display: none;">Delete</button>
<button type="button" class="btn btn-secondary" id="cancelWishItemBtn">Cancel</button>
</div>
</form>
</div>
</div>
</section>
<!-- Notes Tab -->
<section class="tab-content" id="notes-tab">
<div class="notes-container">
<div class="notes-header">
<h2>Notes</h2>
<button class="btn btn-primary" id="addNoteBtn">+ Add Note</button>
</div>
<div class="notes-list" id="notesList">
<p class="empty-state">No notes yet. Add one to get started!</p>
</div>
</div>
<!-- Note Modal -->
<div class="modal" id="noteModal">
<div class="modal-content">
<div class="modal-header">
<h3 id="noteModalTitle">Add Note</h3>
<button class="close-btn">×</button>
</div>
<form id="noteForm">
<div class="form-group">
<label for="noteTitle">Title</label>
<input type="text" id="noteTitle" placeholder="Note title">
</div>
<div class="form-group">
<label for="noteContent">Content</label>
<textarea id="noteContent" rows="8" placeholder="Write your note here…"></textarea>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-secondary" id="deleteNoteBtn" style="display: none;">Delete</button>
<button type="button" class="btn btn-secondary" id="cancelNoteBtn">Cancel</button>
</div>
</form>
</div>
</div>
</section>
<!-- Shopping List Tab -->
<section class="tab-content" id="shopping-tab">
<div class="shopping-container">
<div class="shopping-header">
<h2>🛒 Shopping List</h2>
<div class="shopping-header-actions">
<button class="btn btn-secondary" id="clearCompletedShoppingBtn">Clear Checked</button>
<button class="btn btn-primary" id="addShoppingItemBtn">+ Add Item</button>
</div>
</div>
<div class="shopping-list" id="shoppingList">
<p class="empty-state">No items in your shopping list. Add one to get started!</p>
</div>
</div>
<!-- Shopping Item Modal -->
<div class="modal" id="shoppingItemModal">
<div class="modal-content">
<div class="modal-header">
<h3 id="shoppingItemModalTitle">Add Shopping Item</h3>
<button class="close-btn">×</button>
</div>
<form id="shoppingItemForm">
<div class="form-group">
<label for="shoppingItemName">Item Name *</label>
<input type="text" id="shoppingItemName" required placeholder="e.g. Milk">
</div>
<div class="form-group">
<label for="shoppingItemQuantity">Quantity (optional)</label>
<input type="text" id="shoppingItemQuantity" placeholder="e.g. 2 litres">
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-secondary" id="deleteShoppingItemBtn" style="display: none;">Delete</button>
<button type="button" class="btn btn-secondary" id="cancelShoppingItemBtn">Cancel</button>
</div>
</form>
</div>
</div>
</section>
<!-- Settings Tab -->
<section class="tab-content" id="settings-tab">
<div class="settings-container">
<h2>Settings</h2>
<div class="settings-section">
<h3>Leveling System</h3>
<div class="setting-item">
<label for="tasksPerLevel">Tasks per Level</label>
<div style="display: flex; align-items: center; gap: 1rem;">
<input type="number" id="tasksPerLevel" min="1" max="100" value="30" style="width: 100px; padding: 0.5rem;">
<button class="btn btn-primary" id="saveTasksPerLevel">Save</button>
</div>
<p style="margin: 0.5rem 0 0 0; font-size: 0.85rem; color: #666;">Number of completed tasks required to reach the next level (default: 30)</p>
</div>
<div class="setting-item" style="background: #f9f9f9; padding: 1rem; border-radius: 8px; margin-top: 1rem;">
<h4 style="margin: 0 0 0.5rem 0;">Current Status</h4>
<p style="margin: 0.25rem 0; font-size: 0.9rem;">
<strong>Current Level:</strong> <span id="settingsCurrentLevel">1</span>
</p>
<p style="margin: 0.25rem 0; font-size: 0.9rem;">
<strong>Total Completed Tasks:</strong> <span id="settingsTotalCompleted">0</span>
</p>
<p style="margin: 0.25rem 0; font-size: 0.9rem;">
<strong>Tasks to Next Level:</strong> <span id="settingsTasksToNext">30</span>
</p>
</div>
</div>
<div class="settings-section">
<h3>Data Management</h3>
<div class="setting-item">
<label>Export Data</label>
<button class="btn btn-secondary" id="exportBtn">Download JSON</button>
</div>
<div class="setting-item">
<label>Import Data</label>
<input type="file" id="importFile" accept=".json" style="display: none;">
<button class="btn btn-secondary" id="importBtn">Upload JSON</button>
</div>
<div class="setting-item">
<label>Migrate Data</label>
<button class="btn btn-secondary" id="migrateBtn">Migrate to Latest Version</button>
<p style="margin: 0.5rem 0 0 0; font-size: 0.85rem; color: #666;">Ensures all data is in the latest format. Safe to run at any time.</p>
</div>
<div class="setting-item">
<label>Clear All Data</label>
<button class="btn btn-danger" id="clearDataBtn">Clear Local Storage</button>
</div>
</div>
<div class="settings-section">
<h3>Category Management</h3>
<p style="font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.75rem;">Categories are shared across Tasks, Habits, and Finance.</p>
<div id="categoryManagement">
<ul class="category-list" id="categoryList"></ul>
<div class="category-add-row">
<input type="text" id="newCategoryText" placeholder="New category name" class="category-add-input">
<button class="btn btn-primary btn-sm" onclick="app.addCategoryFromSettings()">Add</button>
</div>
</div>
</div>
<div class="settings-section">
<h3>Data Version</h3>
<p>Version: <span id="dataVersion">1.0.0</span></p>
<p>Last Updated: <span id="lastUpdated">Never</span></p>
</div>
<div class="settings-section">
<h3>About</h3>
<p>Task Manager - Your complete task and habit management system.</p>
<p>All data is stored locally in your browser.</p>
</div>
</div>
</section>
</main>
</div>
<!-- Service Worker Registration -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/service-worker.js')
.then(registration => {
console.log('Service Worker registered:', registration);
})
.catch(error => {
console.log('Service Worker registration failed:', error);
});
});
}
</script>
</body>
</html>