-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1603 lines (1459 loc) · 93.6 KB
/
index.html
File metadata and controls
1603 lines (1459 loc) · 93.6 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
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#111827" />
<meta name="description" content="TaskMore - Your Personal Productivity App" />
<title>TaskMore</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.2/dist/chart.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/date-fns/2.30.0/date_fns.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns@3.0.0/dist/chartjs-adapter-date-fns.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tone/14.8.49/Tone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.0/Sortable.min.js"></script>
<style>
body { font-family: 'Inter', sans-serif; }
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
.custom-scrollbar::-webkit-scrollbar { width: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #374151; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #6b7280; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.active-sidebar-link {
background-color: #374151;
color: #c4b5fd;
outline: none;
border: 2px solid #7c3aed; /* purple-600 */
}
.active-sidebar-link span.unicode-icon { color: #c4b5fd; }
.sidebar-link:hover { background-color: #374151; color: #e5e7eb; }
.sidebar-link:hover span.unicode-icon { color: #e5e7eb; }
.sidebar-link span.unicode-icon { color: #9ca3af; }
.task-card { cursor: grab; }
.task-card:active { cursor: grabbing; }
.sortable-ghost { opacity: 0.4; background: #374151; border: 2px dashed #4b5563; }
.column { min-height: 150px; }
[hidden] { display: none !important; }
#productivityChartContainer { height: 350px; }
.reports-filter-btn.active-filter {
background-color: #8b5cf6;
color: white;
font-weight: 600;
}
.ascension-section-title {
color: #a78bfa;
font-size: 1.25rem;
font-weight: 600;
margin-bottom: 0.75rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid #4b5563;
}
.ascension-sub-title {
color: #c4b5fd;
font-size: 1.125rem;
font-weight: 600;
margin-bottom: 0.5rem;
margin-top: 1rem;
}
.onboarding-modal {
position: fixed;
inset: 0;
background-color: rgba(17, 24, 39, 0.95);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
padding: 2rem;
}
.onboarding-modal-content {
background-color: #1f2937;
padding: 2rem;
border-radius: 0.75rem;
border: 1px solid #374151;
max-width: 600px;
width: 100%;
text-align: center;
box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3), 0 10px 10px -5px rgba(0,0,0,0.2);
}
.onboarding-modal-icon {
font-size: 4rem;
color: #a78bfa;
margin-bottom: 1rem;
}
.onboarding-modal-title {
font-size: 1.875rem;
font-weight: 700;
color: #c4b5fd;
margin-bottom: 1rem;
}
.onboarding-modal-text {
font-size: 1.125rem;
color: #d1d5db;
margin-bottom: 2rem;
line-height: 1.75;
}
.onboarding-modal-actions button {
padding: 0.75rem 1.5rem;
font-size: 1rem;
font-weight: 600;
border-radius: 0.375rem;
transition: background-color 0.2s;
}
.onboarding-modal-actions .next-btn {
background-color: #8b5cf6;
color: white;
}
.onboarding-modal-actions .next-btn:hover {
background-color: #7c3aed;
}
.onboarding-modal-actions .skip-btn {
background-color: transparent;
color: #9ca3af;
margin-right: 0.5rem;
}
.onboarding-modal-actions .skip-btn:hover {
color: #d1d5db;
}
.theme-forest-green body { background-color: #064e3b; color: #a7f3d0; }
.theme-forest-green .bg-gray-800, .theme-forest-green #pomodoro-settings-panel { background-color: #047857; }
.theme-forest-green .bg-gray-900 { background-color: #065f46; }
.theme-forest-green .text-purple-400, .theme-forest-green .ascension-section-title, .theme-forest-green .ascension-sub-title { color: #34d399; }
.theme-forest-green .active-sidebar-link { background-color: #059669; color: #a7f3d0; border-color: #10b981; }
.theme-forest-green .reports-filter-btn.active-filter { background-color: #10b981; }
.theme-forest-green .shop-item-card .text-purple-300, .theme-forest-green .inventory-item-card .text-purple-300 { color: #6ee7b7; }
.theme-forest-green .bg-purple-600 { background-color: #059669; }
.theme-forest-green .bg-purple-600:hover { background-color: #047857; }
.theme-ocean-blue body { background-color: #1e3a8a; color: #bfdbfe; }
.theme-ocean-blue .bg-gray-800, .theme-ocean-blue #pomodoro-settings-panel { background-color: #1e40af; }
.theme-ocean-blue .bg-gray-900 { background-color: #1c3d52; }
.theme-ocean-blue .text-purple-400, .theme-ocean-blue .ascension-section-title, .theme-ocean-blue .ascension-sub-title { color: #60a5fa; }
.theme-ocean-blue .active-sidebar-link { background-color: #1d4ed8; color: #bfdbfe; border-color: #3b82f6; }
.theme-ocean-blue .reports-filter-btn.active-filter { background-color: #2563eb; }
.theme-ocean-blue .shop-item-card .text-purple-300, .theme-ocean-blue .inventory-item-card .text-purple-300 { color: #93c5fd; }
.theme-ocean-blue .bg-purple-600 { background-color: #2563eb; }
.theme-ocean-blue .bg-purple-600:hover { background-color: #1d4ed8; }
.theme-minimalist-light body { background-color: #f3f4f6; color: #1f2937; }
.theme-minimalist-light .bg-gray-800, .theme-minimalist-light #pomodoro-settings-panel { background-color: #e5e7eb; border-color: #d1d5db; }
.theme-minimalist-light .bg-gray-900 { background-color: #f9fafb; }
.theme-minimalist-light .text-gray-300 { color: #374151; }
.theme-minimalist-light .text-gray-200 { color: #111827; }
.theme-minimalist-light .text-gray-400 { color: #6b7280; }
.theme-minimalist-light .text-gray-100 { color: #111827; }
.theme-minimalist-light .border-gray-700 { border-color: #d1d5db; }
.theme-minimalist-light .border-gray-600 { border-color: #e5e7eb; }
.theme-minimalist-light .text-purple-400, .theme-minimalist-light .ascension-section-title, .theme-minimalist-light .ascension-sub-title { color: #6d28d9; }
.theme-minimalist-light .active-sidebar-link { background-color: #d1d5db; color: #4c1d95; border-color: #8b5cf6; }
.theme-minimalist-light .active-sidebar-link span.unicode-icon { color: #4c1d95; }
.theme-minimalist-light .sidebar-link:hover { background-color: #e5e7eb; color: #374151; }
.theme-minimalist-light .sidebar-link span.unicode-icon { color: #6b7280; }
.theme-minimalist-light .sidebar-link:hover span.unicode-icon { color: #374151; }
.theme-minimalist-light .reports-filter-btn.active-filter { background-color: #7c3aed; color: white; }
.theme-minimalist-light .bg-gray-700 { background-color: #d1d5db; }
.theme-minimalist-light .bg-gray-600 { background-color: #9ca3af; }
.theme-minimalist-light .text-yellow-400 { color: #f59e0b; }
.theme-minimalist-light .shop-item-card, .theme-minimalist-light .inventory-item-card { background-color: #e5e7eb; border-color: #d1d5db; }
.theme-minimalist-light .shop-item-card .text-purple-300, .theme-minimalist-light .inventory-item-card .text-purple-300 { color: #5b21b6; }
.theme-minimalist-light .bg-purple-600 { background-color: #7c3aed; }
.theme-minimalist-light .bg-purple-600:hover { background-color: #6d28d9; }
.theme-minimalist-light .custom-scrollbar-track { background: #e5e7eb; }
.theme-minimalist-light .custom-scrollbar-thumb { background: #9ca3af; }
.theme-minimalist-light .custom-scrollbar-thumb:hover { background: #6b7280; }
.theme-minimalist-light #pomodoro-settings-panel input { background-color: #f3f4f6; color: #1f2937; border-color: #9ca3af; }
.theme-cosmic-void body { background-color: #0c0a09; color: #e7e5e4; }
.theme-cosmic-void .bg-gray-800, .theme-cosmic-void #pomodoro-settings-panel { background-color: #1c1917; border-color: #292524; }
.theme-cosmic-void .bg-gray-900 { background-color: #131110; }
.theme-cosmic-void .text-purple-400, .theme-cosmic-void .ascension-section-title, .theme-cosmic-void .ascension-sub-title { color: #f472b6; }
.theme-cosmic-void .active-sidebar-link { background-color: #292524; color: #fda4af; border-color: #ec4899; }
.theme-cosmic-void .active-sidebar-link span.unicode-icon { color: #fda4af; }
.theme-cosmic-void .reports-filter-btn.active-filter { background-color: #db2777; }
.theme-cosmic-void .text-yellow-400 { color: #fde047; }
.theme-cosmic-void .shop-item-card, .theme-cosmic-void .inventory-item-card { background-color: #1c1917; border-color: #292524; }
.theme-cosmic-void .shop-item-card .text-purple-300, .theme-cosmic-void .inventory-item-card .text-purple-300 { color: #f9a8d4; }
.theme-cosmic-void .bg-purple-600 { background-color: #db2777; }
.theme-cosmic-void .bg-purple-600:hover { background-color: #be185d; }
.theme-cosmic-void #pomodoro-settings-panel input { background-color: #292524; color: #e7e5e4; border-color: #44403c; }
.theme-sunset-glow body { background-color: #4a044e; color: #fef08a; }
.theme-sunset-glow .bg-gray-800, .theme-sunset-glow #pomodoro-settings-panel { background-color: #7e22ce; border-color: #6b21a8; }
.theme-sunset-glow .bg-gray-900 { background-color: #581c87; }
.theme-sunset-glow .text-gray-300 { color: #facc15; }
.theme-sunset-glow .text-gray-200 { color: #fef9c3; }
.theme-sunset-glow .text-gray-400 { color: #fde047; }
.theme-sunset-glow .text-gray-100 { color: #fef9c3; }
.theme-sunset-glow .border-gray-700 { border-color: #6b21a8; }
.theme-sunset-glow .border-gray-600 { border-color: #581c87; }
.theme-sunset-glow .text-purple-400, .theme-sunset-glow .ascension-section-title, .theme-sunset-glow .ascension-sub-title { color: #fb923c; }
.theme-sunset-glow .active-sidebar-link { background-color: #6b21a8; color: #fef08a; border-color: #f97316; }
.theme-sunset-glow .active-sidebar-link span.unicode-icon { color: #fef08a; }
.theme-sunset-glow .sidebar-link:hover { background-color: #7e22ce; color: #fef9c3; }
.theme-sunset-glow .sidebar-link span.unicode-icon { color: #fde047; }
.theme-sunset-glow .sidebar-link:hover span.unicode-icon { color: #fef9c3; }
.theme-sunset-glow .reports-filter-btn.active-filter { background-color: #f97316; color: white; }
.theme-sunset-glow .bg-gray-700 { background-color: #7e22ce; }
.theme-sunset-glow .bg-gray-600 { background-color: #9333ea; }
.theme-sunset-glow .text-yellow-400 { color: #facc15; }
.theme-sunset-glow .shop-item-card, .theme-sunset-glow .inventory-item-card { background-color: #7e22ce; border-color: #6b21a8; }
.theme-sunset-glow .shop-item-card .text-purple-300, .theme-sunset-glow .inventory-item-card .text-purple-300 { color: #fca5a5; }
.theme-sunset-glow .bg-purple-600 { background-color: #f97316; }
.theme-sunset-glow .bg-purple-600:hover { background-color: #ea580c; }
.theme-sunset-glow .custom-scrollbar-track { background: #581c87; }
.theme-sunset-glow .custom-scrollbar-thumb { background: #a855f7; }
.theme-sunset-glow .custom-scrollbar-thumb:hover { background: #9333ea; }
.theme-sunset-glow #pomodoro-settings-panel input { background-color: #6b21a8; color: #fef08a; border-color: #581c87; }
.theme-shadow-stealth body { background-color: #0d0d0d; color: #a0a0a0; }
.theme-shadow-stealth .bg-gray-800, .theme-shadow-stealth #pomodoro-settings-panel { background-color: #1a1a1a; border-color: #2c2c2c; }
.theme-shadow-stealth .bg-gray-900 { background-color: #000000; }
.theme-shadow-stealth .text-gray-300 { color: #888888; }
.theme-shadow-stealth .text-gray-200 { color: #b0b0b0; }
.theme-shadow-stealth .text-gray-400 { color: #707070; }
.theme-shadow-stealth .text-gray-100 { color: #c0c0c0; }
.theme-shadow-stealth .border-gray-700 { border-color: #2c2c2c; }
.theme-shadow-stealth .border-gray-600 { border-color: #3d3d3d; }
.theme-shadow-stealth .text-purple-400, .theme-shadow-stealth .ascension-section-title, .theme-shadow-stealth .ascension-sub-title { color: #9a9a9a; }
.theme-shadow-stealth .active-sidebar-link { background-color: #2c2c2c; color: #cccccc; border-color: #555555; }
.theme-shadow-stealth .active-sidebar-link span.unicode-icon { color: #cccccc; }
.theme-shadow-stealth .sidebar-link:hover { background-color: #3d3d3d; color: #dddddd; }
.theme-shadow-stealth .sidebar-link span.unicode-icon { color: #888888; }
.theme-shadow-stealth .sidebar-link:hover span.unicode-icon { color: #dddddd; }
.theme-shadow-stealth .reports-filter-btn.active-filter { background-color: #4d4d4d; color: white; }
.theme-shadow-stealth .bg-gray-700 { background-color: #2c2c2c; }
.theme-shadow-stealth .bg-gray-600 { background-color: #3d3d3d; }
.theme-shadow-stealth .text-yellow-400 { color: #b8860b; }
.theme-shadow-stealth .shop-item-card, .theme-shadow-stealth .inventory-item-card { background-color: #1a1a1a; border-color: #2c2c2c; }
.theme-shadow-stealth .shop-item-card .text-purple-300, .theme-shadow-stealth .inventory-item-card .text-purple-300 { color: #999999; }
.theme-shadow-stealth .bg-purple-600 { background-color: #4d4d4d; }
.theme-shadow-stealth .bg-purple-600:hover { background-color: #333333; }
.theme-shadow-stealth .custom-scrollbar-track { background: #1a1a1a; }
.theme-shadow-stealth .custom-scrollbar-thumb { background: #4d4d4d; }
.theme-shadow-stealth .custom-scrollbar-thumb:hover { background: #666666; }
.theme-shadow-stealth #pomodoro-settings-panel input { background-color: #2c2c2c; color: #a0a0a0; border-color: #3d3d3d; }
.theme-shadow-stealth .onboarding-modal-content { background-color: #151515; border-color: #252525;}
.theme-shadow-stealth .onboarding-modal-icon { color: #7f7f7f; }
.theme-shadow-stealth .onboarding-modal-title { color: #9a9a9a; }
.theme-shadow-stealth .onboarding-modal-text { color: #888888; }
.theme-shadow-stealth .onboarding-modal-actions .next-btn { background-color: #4d4d4d; }
.theme-shadow-stealth .onboarding-modal-actions .next-btn:hover { background-color: #333333; }
.theme-shadow-stealth .onboarding-modal-actions .skip-btn { color: #707070; }
.theme-sakura-spring body { background-color: #fff0f5; color: #581c87; }
.theme-sakura-spring .bg-gray-800, .theme-sakura-spring #pomodoro-settings-panel { background-color: #fce7f3; border-color: #fbcfe8; }
.theme-sakura-spring .bg-gray-900 { background-color: #fff5fa; }
.theme-sakura-spring .text-gray-300 { color: #701a75; }
.theme-sakura-spring .text-gray-200 { color: #4a044e; }
.theme-sakura-spring .text-gray-400 { color: #86198f; }
.theme-sakura-spring .text-gray-100 { color: #3b0764; }
.theme-sakura-spring .border-gray-700 { border-color: #fbcfe8; }
.theme-sakura-spring .border-gray-600 { border-color: #f9a8d4; }
.theme-sakura-spring .text-purple-400, .theme-sakura-spring .ascension-section-title, .theme-sakura-spring .ascension-sub-title { color: #c026d3; }
.theme-sakura-spring .active-sidebar-link { background-color: #fbcfe8; color: #86198f; border-color: #db2777; }
.theme-sakura-spring .active-sidebar-link span.unicode-icon { color: #86198f; }
.theme-sakura-spring .sidebar-link:hover { background-color: #fce7f3; color: #581c87; }
.theme-sakura-spring .sidebar-link span.unicode-icon { color: #a21caf; }
.theme-sakura-spring .sidebar-link:hover span.unicode-icon { color: #581c87; }
.theme-sakura-spring .reports-filter-btn.active-filter { background-color: #db2777; color: white; }
.theme-sakura-spring .bg-gray-700 { background-color: #fce7f3; }
.theme-sakura-spring .bg-gray-600 { background-color: #f9a8d4; }
.theme-sakura-spring .text-yellow-400 { color: #f472b6; }
.theme-sakura-spring .shop-item-card, .theme-sakura-spring .inventory-item-card { background-color: #fce7f3; border-color: #fbcfe8; }
.theme-sakura-spring .shop-item-card .text-purple-300, .theme-sakura-spring .inventory-item-card .text-purple-300 { color: #be185d; }
.theme-sakura-spring .bg-purple-600 { background-color: #db2777; }
.theme-sakura-spring .bg-purple-600:hover { background-color: #be185d; }
.theme-sakura-spring .custom-scrollbar-track { background: #fce7f3; }
.theme-sakura-spring .custom-scrollbar-thumb { background: #f9a8d4; }
.theme-sakura-spring .custom-scrollbar-thumb:hover { background: #f472b6; }
.theme-sakura-spring #pomodoro-settings-panel input { background-color: #fff0f5; color: #581c87; border-color: #fbcfe8; }
.theme-sakura-spring .onboarding-modal-content { background-color: #fef2f6; border-color: #fddde9;}
.theme-sakura-spring .onboarding-modal-icon { color: #c026d3; }
.theme-sakura-spring .onboarding-modal-title { color: #a21caf; }
.theme-sakura-spring .onboarding-modal-text { color: #701a75; }
.theme-sakura-spring .onboarding-modal-actions .next-btn { background-color: #db2777; }
.theme-sakura-spring .onboarding-modal-actions .next-btn:hover { background-color: #be185d; }
.theme-sakura-spring .onboarding-modal-actions .skip-btn { color: #86198f; }
#pomodoro-settings-panel {
background-color: #1f2937;
padding: 0.75rem;
border-radius: 0.375rem;
margin-top: 0.5rem;
border: 1px solid #374151;
}
#pomodoro-settings-panel label {
display: block;
font-size: 0.875rem;
margin-bottom: 0.25rem;
color: #9ca3af;
}
#pomodoro-settings-panel input {
width: 80px;
background-color: #374151;
color: #e5e7eb;
border: 1px solid #4b5563;
border-radius: 0.25rem;
padding: 0.25rem 0.5rem;
text-align: center;
}
#pomodoro-settings-panel button {
margin-top: 0.5rem;
font-size: 0.875rem;
}
.shop-item-card, .inventory-item-card {
background-color: #374151;
border: 1px solid #4b5563;
padding: 1rem;
border-radius: 0.5rem;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.shop-item-card .item-icon, .inventory-item-card .item-icon {
font-size: 2.5rem;
margin-bottom: 0.5rem;
}
</style>
<link rel="stylesheet" href="/index.css">
</head>
<body class="bg-gray-900 text-gray-300 antialiased">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app-loading" class="flex items-center justify-center min-h-screen">
<div class="text-2xl text-gray-500">Loading TaskMore...</div>
</div>
<div id="app-content" class="flex h-screen" hidden>
<aside class="w-72 bg-gray-900 p-6 flex flex-col h-full shadow-lg fixed left-0 top-0 bottom-0 custom-scrollbar overflow-y-auto border-r border-gray-700">
<div class="flex items-center mb-10">
<div class="bg-purple-600 p-2.5 rounded-lg mr-3 shadow">
<span class="text-xl text-white font-bold">✔</span>
</div>
<h1 id="app-title" class="text-2xl font-bold text-purple-400">TaskMore</h1>
</div>
<nav class="flex-grow mt-8">
<ul>
<li class="mb-4">
<a href="#" id="dashboard-link" class="sidebar-link flex items-center text-gray-400 py-2.5 px-4 rounded-lg transition-colors">
<span class="unicode-icon text-xl mr-3">🏠</span> Dashboard
</a>
</li>
<li class="mb-4">
<a href="#" id="board-link" class="sidebar-link flex items-center text-gray-400 py-2.5 px-4 rounded-lg transition-colors">
<span class="unicode-icon text-xl mr-3">📋</span> Tasks Board
</a>
</li>
<li class="mb-4">
<a href="#" id="shop-link" class="sidebar-link flex items-center text-gray-400 py-2.5 px-4 rounded-lg transition-colors">
<span class="unicode-icon text-xl mr-3">🛒</span> Emporium
</a>
</li>
<li class="mb-4">
<a href="#" id="inventory-link" class="sidebar-link flex items-center text-gray-400 py-2.5 px-4 rounded-lg transition-colors">
<span class="unicode-icon text-xl mr-3">🏅</span> Trophy Room
</a>
</li>
<li class="mb-4">
<a href="#" id="reports-link" class="sidebar-link flex items-center text-gray-400 py-2.5 px-4 rounded-lg transition-colors">
<span class="unicode-icon text-xl mr-3">📈</span> Scrivener's Archives
</a>
</li>
<li class="mb-4">
<a href="#" id="ascension-link" class="sidebar-link flex items-center text-gray-400 py-2.5 px-4 rounded-lg transition-colors">
<span class="unicode-icon text-xl mr-3">🚀</span> Ascension Guide
</a>
</li>
</ul>
</nav>
<div class="mt-auto border-t border-gray-700 pt-4">
<p id="onboarding-trigger" class="text-sm text-gray-500 hover:text-purple-400 cursor-pointer">Replay Intro Guide</p>
</div>
</aside>
<main class="flex-1 ml-72 px-8 pb-8 overflow-y-auto custom-scrollbar">
<div id="dashboard-header-container" class="bg-gray-800 p-4 rounded-lg shadow-md sticky top-0 z-20 mb-6 border-b border-gray-700">
<div class="flex flex-wrap justify-between items-center gap-4">
<div class="flex items-center space-x-2 text-gray-200">
<span class="unicode-icon text-2xl text-orange-400">🔥</span>
<span id="streak-counter" class="text-2xl font-semibold">0</span>
</div>
<div class="flex items-center space-x-2 text-gray-200">
<span class="unicode-icon text-2xl text-yellow-400">💰</span>
<span id="coin-counter" class="text-2xl font-semibold">0</span>
</div>
<div id="pomodoro-timer-container" class="flex flex-col items-center text-center">
<div class="flex items-center mb-1">
<div id="pomodoro-time-display" class="text-4xl font-bold text-gray-100">25:00</div>
<button id="pomodoro-settings-toggle-btn" aria-label="Toggle Pomodoro Settings" class="ml-2 text-gray-400 hover:text-purple-400 p-1 rounded-full text-lg">⚙️</button>
</div>
<div id="pomodoro-status-display" class="text-sm text-purple-400 font-semibold mb-2">Focus Session</div>
<div class="flex space-x-2">
<button id="pomodoro-start-btn" class="px-3 py-1.5 text-sm bg-purple-600 hover:bg-purple-700 text-white font-semibold rounded-md shadow-sm">Start</button>
<button id="pomodoro-pause-btn" class="px-3 py-1.5 text-sm bg-gray-600 hover:bg-gray-500 text-gray-200 font-semibold rounded-md shadow-sm">Pause</button>
<button id="pomodoro-reset-btn" class="px-3 py-1.5 text-sm bg-gray-700 hover:bg-gray-600 text-gray-300 font-semibold rounded-md shadow-sm">Reset</button>
</div>
<div id="pomodoro-settings-panel" class="mt-3" hidden>
<div class="flex space-x-4 justify-center">
<div>
<label for="pomodoro-focus-duration">Focus (min)</label>
<input type="number" id="pomodoro-focus-duration" min="1" value="25">
</div>
<div>
<label for="pomodoro-break-duration">Break (min)</label>
<input type="number" id="pomodoro-break-duration" min="1" value="5">
</div>
</div>
<button id="pomodoro-save-settings-btn" class="mt-2 px-3 py-1 text-xs bg-purple-600 hover:bg-purple-700 text-white font-semibold rounded-md shadow-sm">Save Settings</button>
</div>
</div>
<button id="add-task-btn-header" class="action-add-task bg-purple-600 hover:bg-purple-700 text-white font-semibold py-2 px-4 rounded-lg text-sm shadow-md flex items-center">
<span class="unicode-icon text-lg mr-2">➕</span> New Task
</button>
</div>
</div>
<div id="dashboard-view" class="app-view">
<h2 class="text-2xl font-semibold text-purple-400 mb-4">Today's Tasks</h2>
<div id="dashboard-task-list" class="space-y-3"></div>
</div>
<div id="board-view" class="app-view" hidden>
<h2 class="text-2xl font-semibold text-purple-400 mb-6">Tasks Board</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="bg-gray-800 p-4 rounded-xl shadow-lg border border-gray-700">
<h3 class="text-xl font-semibold text-gray-200 mb-4 border-b border-gray-700 pb-3">Backlog</h3>
<div id="backlog-column" data-status="incomplete" class="column space-y-3 custom-scrollbar overflow-y-auto max-h-[60vh] p-1"></div>
</div>
<div class="bg-gray-800 p-4 rounded-xl shadow-lg border border-gray-700">
<h3 class="text-xl font-semibold text-gray-200 mb-4 border-b border-gray-700 pb-3">In Progress</h3>
<div id="inprogress-column" data-status="progress" class="column space-y-3 custom-scrollbar overflow-y-auto max-h-[60vh] p-1"></div>
</div>
<div class="bg-gray-800 p-4 rounded-xl shadow-lg border border-gray-700">
<h3 class="text-xl font-semibold text-gray-200 mb-4 border-b border-gray-700 pb-3">Completed</h3>
<div id="completed-column" data-status="completed" class="column space-y-3 custom-scrollbar overflow-y-auto max-h-[60vh] p-1"></div>
</div>
</div>
</div>
<div id="shop-view" class="app-view" hidden>
<div class="flex items-center mb-8">
<span class="unicode-icon text-3xl text-purple-400 mr-3">🛒</span>
<h2 class="text-3xl font-semibold text-purple-400">Collector's Emporium</h2>
</div>
<div id="shop-items-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<p class="text-gray-500 col-span-full text-center">The Emporium is stocking its shelves... Check back soon!</p>
</div>
</div>
<div id="inventory-view" class="app-view" hidden>
<div class="flex items-center mb-8">
<span class="unicode-icon text-3xl text-purple-400 mr-3">🏅</span>
<h2 class="text-3xl font-semibold text-purple-400">Trophy Room & Collection</h2>
</div>
<div id="inventory-items-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<p class="text-gray-500 col-span-full text-center">Your collection is currently empty. Purchase items from the Emporium or complete onboarding!</p>
</div>
</div>
<div id="reports-view" class="app-view" hidden>
<div class="flex justify-between items-center mb-8">
<div class="flex items-center">
<span class="unicode-icon text-3xl text-purple-400 mr-3">📈</span>
<h2 class="text-3xl font-semibold text-purple-400">Scrivener's Archives</h2>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8">
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
<div class="flex items-center text-gray-400 mb-1">
<span class="unicode-icon text-xl mr-2 text-purple-400">📈</span>
<span>Active Tasks</span>
</div>
<p id="reports-active-tasks-value" class="text-4xl font-bold text-gray-100 mb-1">0</p>
<p class="text-sm text-gray-500">Currently in progress or backlog</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
<div class="flex items-center text-gray-400 mb-1">
<span class="unicode-icon text-xl mr-2 text-purple-400">✅</span>
<span>Completed Tasks</span>
</div>
<p id="reports-completed-tasks-value" class="text-4xl font-bold text-gray-100 mb-1">0</p>
<p class="text-sm text-gray-500">Total tasks conquered</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700 lg:col-start-1">
<div class="flex items-center text-gray-400 mb-1">
<span class="unicode-icon text-xl mr-2 text-gray-400">💡</span>
<span>Focus Sessions</span>
</div>
<p id="reports-pomodoro-sessions-value" class="text-4xl font-bold text-gray-100 mb-1">0</p>
<p class="text-sm text-gray-500">Focus periods completed</p>
</div>
</div>
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
<div class="flex flex-wrap justify-between items-center mb-4 gap-4">
<h3 class="text-xl font-semibold text-purple-400">Task Completion Rate</h3>
<div id="reports-filter-container" class="flex flex-wrap gap-1 sm:gap-2">
<button data-range="today" class="reports-filter-btn px-2 py-1 sm:px-3 sm:py-1.5 text-xs sm:text-sm bg-gray-700 hover:bg-gray-600 text-gray-300 font-medium rounded-md">Today</button>
<button data-range="yesterday" class="reports-filter-btn px-2 py-1 sm:px-3 sm:py-1.5 text-xs sm:text-sm bg-gray-700 hover:bg-gray-600 text-gray-300 font-medium rounded-md">Yesterday</button>
<button data-range="7days" class="reports-filter-btn active-filter px-2 py-1 sm:px-3 sm:py-1.5 text-xs sm:text-sm bg-purple-500 text-white font-medium rounded-md">Last 7 Days</button>
<button data-range="30days" class="reports-filter-btn px-2 py-1 sm:px-3 sm:py-1.5 text-xs sm:text-sm bg-gray-700 hover:bg-gray-600 text-gray-300 font-medium rounded-md">Last 30 Days</button>
<button data-range="90days" class="reports-filter-btn px-2 py-1 sm:px-3 sm:py-1.5 text-xs sm:text-sm bg-gray-700 hover:bg-gray-600 text-gray-300 font-medium rounded-md">Last 3 Months</button>
<button data-range="lastyear" class="reports-filter-btn px-2 py-1 sm:px-3 sm:py-1.5 text-xs sm:text-sm bg-gray-700 hover:bg-gray-600 text-gray-300 font-medium rounded-md">Last Year</button>
</div>
</div>
<div id="productivityChartContainer">
<canvas id="productivityChart"></canvas>
</div>
</div>
</div>
<div id="ascension-view" class="app-view" hidden>
<div class="flex items-center mb-8">
<span class="unicode-icon text-3xl text-purple-400 mr-3">🚀</span>
<h2 class="text-3xl font-semibold text-purple-400">Ascension Guide: Mastering TaskMore</h2>
</div>
<div class="space-y-8 text-gray-300">
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
<h3 class="ascension-section-title">Embark on Your Productivity Quest</h3>
<p class="mb-3">
Welcome, Seeker of Focus, to the Ascension Guide! This is your map to unlocking peak productivity using TaskMore. Here, we transform daily chores into epic quests and mundane minutes into legendary focus sessions. Let's begin your ascent!
</p>
<h4 class="ascension-sub-title">Revisit Your Onboarding</h4>
<p>
Need a refresher on TaskMore's core features? You can replay the introductory guide at any time. Look for the <strong class="text-yellow-300">"Replay Intro Guide"</strong> link at the bottom of the sidebar. It's a great way to quickly re-familiarize yourself with the app's flow and discover how to make the most of your TaskMore experience.
</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
<h3 class="ascension-section-title">The Art of Quest Crafting (Task Management)</h3>
<p class="mb-4">
Clarity is your sharpest blade. A well-defined quest is half conquered. Effective planning is the first step: lay out your week's objectives or daily plans using tasks.
</p>
<h4 class="ascension-sub-title">Define Your Objectives</h4>
<p class="mb-2">
Use the <strong class="text-yellow-300">"New Task"</strong> button (your Quest Scroll) to scribe your objectives. Be specific. Instead of "Work on project," try "Draft Chapter 1 of Project Nebula." The more precise your quest, the clearer your path to productivity.
</p>
<h4 class="ascension-sub-title">Shatter Mighty Quests</h4>
<p class="mb-2">
Large, daunting quests can demoralize even the bravest hero. Break them into smaller, manageable sub-quests. "Write Novel" becomes "Outline Chapter 1," then "Write 500 words of Chapter 1," and so on. Each small victory fuels your momentum. Assign <strong class="text-yellow-300">difficulties</strong> (Easy, Medium, Hard) to gauge effort and rewards appropriately for your plans.
</p>
<h4 class="ascension-sub-title">Survey Your Battlefield (Tasks Board)</h4>
<p>
Visit the <strong class="text-yellow-300">"Tasks Board"</strong>. Your <strong class="text-gray-400">Backlog</strong> is where new quests await. Drag vital quests to <strong class="text-yellow-400">In Progress</strong> when you begin your focus. Once vanquished, drag them to <strong class="text-green-400">Completed</strong> to claim your spoils (XP and Coins!). This visual flow keeps you organized, motivated, and on top of your plans.
</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
<h3 class="ascension-section-title">Wielding the Chrono-Toolkit (Pomodoro Timer)</h3>
<p class="mb-4">
Time is your most precious resource. The Chrono-Toolkit (Pomodoro Timer) helps you bend it to your will, enhancing focus for all your plans.
</p>
<h4 class="ascension-sub-title">The Rhythm of Focus</h4>
<p class="mb-2">
The Pomodoro technique is a dance between intense focus and rejuvenating breaks. Click the <strong class="text-yellow-300">gear icon (⚙️)</strong> next to the timer to customize your <strong class="text-cyan-300">Focus Session</strong> and <strong class="text-lime-300">Break Duration</strong>. Experiment to find what rhythm best suits your heroic efforts and boosts your productivity. Default is 25 minutes of focus, 5 minutes of break.
</p>
<h4 class="ascension-sub-title">Sanctuary of Concentration</h4>
<p class="mb-2">
During a Focus Session, banish distractions. Silence notifications, close unnecessary tabs. This is your sacred time to delve deep into your quest. The timer itself is a reminder of your commitment to focused, productive work.
</p>
<h4 class="ascension-sub-title">The Power of Pause (and Reset)</h4>
<p>
Life happens. Use <strong class="text-yellow-300">"Pause"</strong> if an urgent matter arises, but strive to return swiftly. <strong class="text-yellow-300">"Reset"</strong> allows you to begin a new cycle, fresh and determined. Each completed Focus Session is a small win, recorded in your Archives and contributing to your legend of productivity.
</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
<h3 class="ascension-section-title">The Scrivener's Wisdom (Reports & Reflection)</h3>
<p class="mb-4">
Knowledge of past battles informs future victories and hones your planning skills. The <strong class="text-yellow-300">"Scrivener's Archives"</strong> (Reports) holds this wisdom.
</p>
<h4 class="ascension-sub-title">Analyze Your Campaigns</h4>
<p class="mb-2">
Review your <strong class="text-cyan-300">Task Completion Rate</strong>. Are you a swift conqueror of daily quests, or a strategist excelling in week-long campaigns? Use the filters to see trends. How many <strong class="text-lime-300">Focus Sessions</strong> did you complete? This data is not for judgment, but for insight into your productivity patterns.
</p>
<h4 class="ascension-sub-title">Celebrate Milestones & Iterate</h4>
<p>
Acknowledge your achievements! Every completed task, every focus session, every coin earned is a step forward. If you notice patterns (e.g., struggling with 'Hard' tasks on certain days), adjust your strategy and plans. Perhaps those quests need more breaking down, or a different time of day for tackling to maximize productivity.
</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
<h3 class="ascension-section-title">The Spoils of Victory (Gamification & Motivation)</h3>
<p class="mb-4">
Your journey towards enhanced productivity is rewarded. Streaks, Coins, XP, Levels, Titles, and Themes are not mere trinkets; they are symbols of your dedication.
</p>
<h4 class="ascension-sub-title">Fuel Your Ascent</h4>
<p class="mb-2">
Completing tasks and maintaining <strong class="text-orange-400">streaks</strong> earns you <strong class="text-yellow-400">Coins</strong> and Experience Points (XP). Coins unlock treasures in the <strong class="text-purple-300">Emporium</strong> – new visual themes to customize your realm, or proud Trophies and Titles for your <strong class="text-indigo-300">Trophy Room</strong>. XP fuels your <strong class="text-rose-300">Level</strong>, a testament to your growing mastery over your tasks and time.
</p>
<h4 class="ascension-sub-title">Personalize Your Legend</h4>
<p>
Make TaskMore truly yours. Equip a new <strong class="text-sky-300">Theme</strong> that inspires you. Display a <strong class="text-green-300">Title</strong> that reflects your current prowess. These elements make the journey more engaging and personal, boosting your motivation for productivity.
</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
<h3 class="ascension-section-title">The Path of Consistency</h3>
<p>
The true power of TaskMore is unlocked through consistent daily engagement and planning. Small, regular efforts compound into monumental achievements in productivity. Embrace the journey, trust the process, and watch as you ascend to new heights of focus and master your plans. Your legend awaits!
</p>
</div>
</div>
</div>
</main>
</div>
<div id="add-task-modal" class="fixed inset-0 bg-black/80 flex items-center justify-center z-50 p-4" hidden>
<div class="bg-gray-800 p-8 rounded-lg shadow-xl w-full max-w-md border border-gray-700">
<h2 class="text-2xl font-semibold text-purple-400 mb-6">Create New Quest</h2>
<form id="add-task-form">
<div class="mb-4">
<label for="new-task-text" class="block text-sm font-medium text-gray-400 mb-1">Quest Details</label>
<input type="text" id="new-task-text" placeholder="Enter task details..." class="w-full p-3 bg-gray-700 text-gray-200 border border-gray-600 rounded-md focus:ring-2 focus:ring-purple-500 outline-none" required autofocus />
</div>
<div class="mb-4">
<label for="new-task-difficulty" class="block text-sm font-medium text-gray-400 mb-1">Difficulty</label>
<select id="new-task-difficulty" class="w-full p-3 bg-gray-700 text-gray-200 border border-gray-600 rounded-md focus:ring-2 focus:ring-purple-500 outline-none">
<option value="easy">Easy</option>
<option value="medium" selected>Medium</option>
<option value="hard">Hard</option>
</select>
<p id="difficulty-suggestion" class="text-xs text-gray-500 mt-1"></p>
</div>
<div class="flex justify-end space-x-3">
<button type="button" id="cancel-add-task-btn" class="px-5 py-2.5 text-base bg-gray-600 hover:bg-gray-500 text-gray-300 font-semibold rounded-md shadow-sm">Cancel</button>
<button type="submit" class="px-5 py-2.5 text-base bg-purple-600 hover:bg-purple-700 text-white font-semibold rounded-md shadow-sm">Create Quest</button>
</div>
</form>
</div>
</div>
<div id="onboarding-modals-container">
</div>
<script type="module">
const LOCAL_STORAGE_KEY = 'taskmore_offline_companion_v1';
const ONBOARDING_COMPLETED_KEY = 'taskmore_onboarding_completed_v2';
const DEFAULT_POMODORO_FOCUS_MINUTES = 25;
const DEFAULT_POMODORO_BREAK_MINUTES = 5;
const COINS_PER_TASK_BASE = { easy: 5, medium: 10, hard: 20 };
let appState = {
profile: {
coins: 0,
streak: 0,
bestStreak: 0,
lastCompletedDate: null,
pomodoroSessions: 0,
inventory: [],
equippedTitle: null,
currentTheme: 'default-theme',
settings: {
pomodoroFocusDuration: DEFAULT_POMODORO_FOCUS_MINUTES,
pomodoroBreakDuration: DEFAULT_POMODORO_BREAK_MINUTES,
}
},
tasks: [],
shopItems: [
{ id: 'theme_default', name: 'Mystic Purple', type: 'theme', price: 0, description: 'The classic TaskMore look.', icon: '🎨', cssClass: 'default-theme' },
{ id: 'theme_forest', name: 'Forest Green', type: 'theme', price: 100, description: 'Productivity in the tranquility of nature.', icon: '🌲', cssClass: 'theme-forest-green' },
{ id: 'theme_ocean', name: 'Ocean Blue', type: 'theme', price: 100, description: 'Dive deep into your tasks.', icon: '🌊', cssClass: 'theme-ocean-blue' },
{ id: 'theme_minimalist', name: 'Minimalist Light', type: 'theme', price: 50, description: 'Clean lines for clear thoughts.', icon: '🧘', cssClass: 'theme-minimalist-light' },
{ id: 'theme_cosmic', name: 'Cosmic Void', type: 'theme', price: 500, description: 'Explore the universe of productivity.', icon: '🌌', cssClass: 'theme-cosmic-void' },
{ id: 'theme_sunset_glow', name: 'Sunset Glow', type: 'theme', price: 250, description: 'Bask in the warm hues of productivity.', icon: '🌅', cssClass: 'theme-sunset-glow' },
{ id: 'theme_shadow_stealth', name: 'Shadow Stealth', type: 'theme', price: 300, description: 'Embrace the darkness for ultimate focus.', icon: '🥷', cssClass: 'theme-shadow-stealth' },
{ id: 'theme_sakura_spring', name: 'Sakura Spring', type: 'theme', price: 200, description: 'A calming theme inspired by cherry blossoms.', icon: '🌸', cssClass: 'theme-sakura-spring' },
{ id: 'trophy_initiate', name: 'Initiate\'s Medallion', type: 'trophy', price: 0, description: 'Awarded for starting your journey.', icon: '🏅' },
{ id: 'trophy_focus_10', name: 'Focus Novice', type: 'trophy', price: 50, description: 'Complete 10 Focus Sessions.', icon: '🎯' },
{ id: 'trophy_task_slayer_10', name: 'Task Slayer (10)', type: 'trophy', price: 30, description: 'Vanquish 10 minor quests.', icon: '⚔️' },
{ id: 'trophy_prod_titan_100', name: 'Productivity Titan (100)', type: 'trophy', price: 1000, description: 'A true legend of task completion.', icon: '🏛️' },
{ id: 'trophy_streak_keeper_7', name: 'Streak Keeper (7 days)', type: 'trophy', price: 150, description: 'Maintained a 7-day task completion streak.', icon: '🔥' },
{ id: 'trophy_pomodoro_pro_50', name: 'Pomodoro Pro (50)', type: 'trophy', price: 250, description: 'For mastering 50 deep focus sessions.', icon: '🍅' },
{ id: 'trophy_collector_adept_5', name: 'Collector Adept (5)', type: 'trophy', price: 100, description: 'For acquiring 5 treasures from the Emporium.', icon: '💎' },
{ id: 'title_novice', name: 'Novice Tasker', type: 'title', price: 25, description: 'A promising start.', icon: '🏷️' },
{ id: 'title_focused_adept', name: 'Focused Adept', type: 'title', price: 75, description: 'Master of concentration.', icon: '🎯' },
{ id: 'title_grandmaster_time', name: 'Grandmaster of Time', type: 'title', price: 750, description: 'Time bends to your will.', icon: '⏳' },
{ id: 'title_task_virtuoso', name: 'Task Virtuoso', type: 'title', price: 350, description: 'Orchestrating tasks with finesse.', icon: '🎶' },
{ id: 'title_streak_champion', name: 'Streak Champion', type: 'title', price: 400, description: 'A testament to unwavering consistency.', icon: '🏆' },
{ id: 'title_zen_master', name: 'Zen Master', type: 'title', price: 600, description: 'Achieved profound peace in productivity.', icon: '🧘♂️' },
]
};
let pomodoroTimerInterval = null;
let pomodoroTimeLeft = appState.profile.settings.pomodoroFocusDuration * 60;
let pomodoroCurrentMode = 'focus';
let pomodoroStatus = 'Idle';
let pomodoroSynth = null;
let sortableInstances = {};
let productivityLineChart = null;
const appLoadingEl = document.getElementById('app-loading');
const appContentEl = document.getElementById('app-content');
const streakCounterEl = document.getElementById('streak-counter');
const coinCounterEl = document.getElementById('coin-counter');
const views = {
dashboard: document.getElementById('dashboard-view'),
board: document.getElementById('board-view'),
shop: document.getElementById('shop-view'),
inventory: document.getElementById('inventory-view'),
reports: document.getElementById('reports-view'),
ascension: document.getElementById('ascension-view')
};
const sidebarLinks = {
dashboard: document.getElementById('dashboard-link'),
board: document.getElementById('board-link'),
shop: document.getElementById('shop-link'),
inventory: document.getElementById('inventory-link'),
reports: document.getElementById('reports-link'),
ascension: document.getElementById('ascension-link')
};
const dashboardTaskListEl = document.getElementById('dashboard-task-list');
const boardColumns = {
incomplete: document.getElementById('backlog-column'),
progress: document.getElementById('inprogress-column'),
completed: document.getElementById('completed-column')
};
const addTaskModalEl = document.getElementById('add-task-modal');
const addTaskFormEl = document.getElementById('add-task-form');
const newTaskTextEl = document.getElementById('new-task-text');
const newTaskDifficultyEl = document.getElementById('new-task-difficulty');
const difficultySuggestionEl = document.getElementById('difficulty-suggestion');
const pomodoroTimeDisplayEl = document.getElementById('pomodoro-time-display');
const pomodoroStatusDisplayEl = document.getElementById('pomodoro-status-display');
const pomodoroSettingsToggleBtnEl = document.getElementById('pomodoro-settings-toggle-btn');
const pomodoroSettingsPanelEl = document.getElementById('pomodoro-settings-panel');
const pomodoroFocusDurationInputEl = document.getElementById('pomodoro-focus-duration');
const pomodoroBreakDurationInputEl = document.getElementById('pomodoro-break-duration');
const reportsActiveTasksEl = document.getElementById('reports-active-tasks-value');
const reportsCompletedTasksEl = document.getElementById('reports-completed-tasks-value');
const reportsPomodoroSessionsEl = document.getElementById('reports-pomodoro-sessions-value');
const reportsFilterContainerEl = document.getElementById('reports-filter-container');
const shopItemsContainerEl = document.getElementById('shop-items-container');
const inventoryItemsContainerEl = document.getElementById('inventory-items-container');
const onboardingModalsContainerEl = document.getElementById('onboarding-modals-container');
function loadDataFromLocalStorage() {
const data = localStorage.getItem(LOCAL_STORAGE_KEY);
if (data) {
try {
const savedState = JSON.parse(data);
appState.profile = { ...appState.profile, ...savedState.profile };
appState.profile.settings = { ...appState.profile.settings, ...(savedState.profile && savedState.profile.settings) };
appState.profile.inventory = Array.isArray(appState.profile.inventory) ? appState.profile.inventory : [];
appState.tasks = savedState.tasks || [];
appState.profile.settings.pomodoroFocusDuration = parseInt(appState.profile.settings.pomodoroFocusDuration, 10) || DEFAULT_POMODORO_FOCUS_MINUTES;
appState.profile.settings.pomodoroBreakDuration = parseInt(appState.profile.settings.pomodoroBreakDuration, 10) || DEFAULT_POMODORO_BREAK_MINUTES;
} catch (e) {
console.error("Error parsing data from localStorage:", e);
initializeDefaultData();
}
} else {
initializeDefaultData();
}
pomodoroTimeLeft = (pomodoroCurrentMode === 'focus' ? appState.profile.settings.pomodoroFocusDuration : appState.profile.settings.pomodoroBreakDuration) * 60;
}
function saveDataToLocalStorage() {
try {
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(appState));
} catch (e) {
console.error("Error saving data to localStorage:", e);
alert("Could not save data. Your browser's localStorage might be full or disabled.");
}
}
function initializeDefaultData() {
appState.profile.settings.pomodoroFocusDuration = DEFAULT_POMODORO_FOCUS_MINUTES;
appState.profile.settings.pomodoroBreakDuration = DEFAULT_POMODORO_BREAK_MINUTES;
appState.profile.inventory = Array.isArray(appState.profile.inventory) ? appState.profile.inventory : [];
saveDataToLocalStorage();
}
const getTodayDateString = () => new Date().toISOString().split('T')[0];
const getYesterdayDateString = () => {
const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
return yesterday.toISOString().split('T')[0];
};
const generateUniqueId = () => Date.now().toString(36) + Math.random().toString(36).substring(2, 9);
function initializePomodoroSynth() {
if (!pomodoroSynth && typeof Tone !== 'undefined') pomodoroSynth = new Tone.Synth().toDestination();
}
function formatPomodoroTime(seconds) {
const m = Math.floor(seconds / 60);
const s = seconds % 60;
return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`;
}
function updatePomodoroDisplay() {
pomodoroTimeDisplayEl.textContent = formatPomodoroTime(pomodoroTimeLeft);
pomodoroStatusDisplayEl.textContent = `${pomodoroCurrentMode.charAt(0).toUpperCase() + pomodoroCurrentMode.slice(1)} Session ${pomodoroStatus !== 'Idle' ? '('+pomodoroStatus+')' : ''}`;
}
function startPomodoro() {
if (pomodoroStatus === 'Running') return;
if (typeof Tone !== 'undefined' && Tone.start) {
Tone.start().then(initializePomodoroSynth).catch(err => console.warn("Tone.js context/synth init failed:", err));
} else {
initializePomodoroSynth();
}
pomodoroStatus = 'Running';
if (pomodoroTimeLeft <= 0) {
pomodoroTimeLeft = (pomodoroCurrentMode === 'focus' ? appState.profile.settings.pomodoroFocusDuration : appState.profile.settings.pomodoroBreakDuration) * 60;
}
clearInterval(pomodoroTimerInterval);
pomodoroTimerInterval = setInterval(() => {
pomodoroTimeLeft--;
updatePomodoroDisplay();
if (pomodoroTimeLeft <= 0) {
clearInterval(pomodoroTimerInterval);
pomodoroStatus = 'Idle';
if (pomodoroSynth && typeof Tone !== 'undefined' && Tone.now) {
try { pomodoroSynth.triggerAttackRelease("C5", "8n", Tone.now()); } catch (e) { console.warn("Synth error:", e); }
}
if (pomodoroCurrentMode === 'focus') {
appState.profile.pomodoroSessions = (appState.profile.pomodoroSessions || 0) + 1;
pomodoroCurrentMode = 'break';
pomodoroTimeLeft = appState.profile.settings.pomodoroBreakDuration * 60;
alert("Focus session complete! Time for a break.");
} else {
pomodoroCurrentMode = 'focus';
pomodoroTimeLeft = appState.profile.settings.pomodoroFocusDuration * 60;
alert("Break over! Time to focus.");
}
updatePomodoroDisplay();
saveDataToLocalStorage();
updateGlobalUI();
}
}, 1000);
updatePomodoroDisplay();
}
function pausePomodoro() {
if (pomodoroStatus !== 'Running') return;
pomodoroStatus = 'Paused';
clearInterval(pomodoroTimerInterval);
updatePomodoroDisplay();
}
function resetPomodoro() {
pomodoroStatus = 'Idle';
clearInterval(pomodoroTimerInterval);
pomodoroCurrentMode = 'focus';
pomodoroTimeLeft = appState.profile.settings.pomodoroFocusDuration * 60;
updatePomodoroDisplay();
}
function savePomodoroSettings() {
const focusDuration = parseInt(pomodoroFocusDurationInputEl.value, 10);
const breakDuration = parseInt(pomodoroBreakDurationInputEl.value, 10);
if (focusDuration > 0 && breakDuration > 0) {
appState.profile.settings.pomodoroFocusDuration = focusDuration;
appState.profile.settings.pomodoroBreakDuration = breakDuration;
saveDataToLocalStorage();
if (pomodoroStatus === 'Idle' || pomodoroStatus === 'Paused') {
resetPomodoro();
}
alert("Pomodoro settings saved!");
pomodoroSettingsPanelEl.setAttribute('hidden', 'true');
} else {
alert("Please enter valid durations (greater than 0).");
}
}
function showView(viewId) {
Object.values(views).forEach(view => view.setAttribute('hidden', 'true'));
Object.values(sidebarLinks).forEach(link => {
if (link) link.classList.remove('active-sidebar-link');
});
if (views[viewId]) views[viewId].removeAttribute('hidden');
if (sidebarLinks[viewId]) {
sidebarLinks[viewId].classList.add('active-sidebar-link');
}
if (viewId === 'reports') renderReportsView();
if (viewId === 'dashboard') renderDashboardView();
if (viewId === 'board') renderBoardView();
if (viewId === 'shop') renderShopView();
if (viewId === 'inventory') renderInventoryView();
}
function createTaskDashboardElement(task) {
const div = document.createElement('div');
div.className = `flex items-center p-4 mb-3 rounded-lg shadow-sm transition-all duration-150 border ${task.status === 'completed' ? 'bg-gray-700/50 border-gray-600 opacity-60' : 'bg-gray-700 border-gray-600 hover:shadow-md hover:border-gray-500'}`;
div.dataset.taskId = task.id;
const checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.checked = task.status === 'completed';
checkbox.className = "form-checkbox h-5 w-5 text-purple-500 bg-gray-600 border-gray-500 rounded mr-4 cursor-pointer focus:ring-purple-500 focus:ring-offset-gray-800";
if (task.status === 'completed') {
checkbox.disabled = true;
}
checkbox.onchange = () => {
if (!checkbox.disabled) {
updateTaskStatus(task.id, checkbox.checked ? 'completed' : 'incomplete');
}
};
const span = document.createElement('span');
span.className = `flex-grow ${task.status === 'completed' ? 'line-through text-gray-500' : 'text-gray-200'}`;
span.textContent = task.text;
const difficultyBadge = document.createElement('span');
difficultyBadge.className = `ml-2 text-xs font-semibold px-2 py-0.5 rounded-full ${
task.difficulty === 'easy' ? 'bg-green-700 text-green-200' :
task.difficulty === 'medium' ? 'bg-yellow-700 text-yellow-200' :
'bg-red-700 text-red-200'
}`;
difficultyBadge.textContent = task.difficulty.charAt(0).toUpperCase() + task.difficulty.slice(1);
div.append(checkbox, span, difficultyBadge);
return div;
}
function renderDashboardView() {
dashboardTaskListEl.innerHTML = '';
const displayTasks = appState.tasks.filter(task => task.status !== 'progress')
.sort((a,b) => {
if (a.status === 'completed' && b.status !== 'completed') return 1;
if (a.status !== 'completed' && b.status === 'completed') return -1;
return new Date(b.createdAt) - new Date(a.createdAt);
});
if (displayTasks.length === 0) {
dashboardTaskListEl.innerHTML = '<p class="text-gray-500 text-center py-4">No tasks here. Add some or check the Tasks board!</p>';
} else {
displayTasks.forEach(task => dashboardTaskListEl.appendChild(createTaskDashboardElement(task)));
}
}
function createTaskCardElement(task) {
const card = document.createElement('div');
card.className = 'task-card bg-gray-700 p-3 rounded-md shadow hover:shadow-lg text-sm text-gray-300 border border-gray-600 hover:border-gray-500';
card.dataset.taskId = task.id;
const textSpan = document.createElement('span');
textSpan.textContent = task.text;
const difficultyBadge = document.createElement('span');
difficultyBadge.className = `block text-xs mt-1 font-semibold px-1.5 py-0.5 rounded-full w-min ${
task.difficulty === 'easy' ? 'bg-green-600 text-green-100' :
task.difficulty === 'medium' ? 'bg-yellow-600 text-yellow-100' :
'bg-red-600 text-red-100'
}`;
difficultyBadge.textContent = task.difficulty.charAt(0).toUpperCase();
card.append(textSpan, difficultyBadge);
if (task.status === 'completed') card.classList.add('opacity-70', 'line-through', 'text-gray-500');
else if (task.status === 'progress') card.classList.add('border-l-4', 'border-yellow-400');
return card;
}
function renderBoardView() {
Object.values(boardColumns).forEach(col => col.innerHTML = '');
const sortedTasks = [...appState.tasks].sort((a,b) => new Date(a.createdAt) - new Date(b.createdAt));
sortedTasks.forEach(task => {
const card = createTaskCardElement(task);
if (task.status === 'incomplete' && boardColumns.incomplete) boardColumns.incomplete.appendChild(card);
else if (task.status === 'progress' && boardColumns.progress) boardColumns.progress.appendChild(card);
else if (task.status === 'completed' && boardColumns.completed) boardColumns.completed.appendChild(card);
else if (boardColumns.incomplete) boardColumns.incomplete.appendChild(card);
});
initializeSortable();
}