-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
1675 lines (1530 loc) · 108 KB
/
index.html
File metadata and controls
1675 lines (1530 loc) · 108 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.0">
<title>Plebs - Decentralized Video Platform</title>
<meta name="description"
content="Plebs is a censorship-resistant, decentralized video platform powered by the Nostr social protocol">
<!-- Open Graph Meta Tags -->
<meta property="og:title" content="Watch Videos on Nostr with Plebs">
<meta property="og:description"
content="Plebs is a censorship-resistant, decentralized video platform powered by the Nostr social protocol">
<meta property="og:image" content="https://plebs.app/images/plebs-og.png">
<meta property="og:url" content="https://plebs.app">
<meta property="og:type" content="website">
<link rel="icon" href="./images/plebs-icon.png" type="image/png">
<link rel="canonical" href="https://plebs.app/">
<meta name="theme-color" content="#BF40BF">
<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="black-translucent">
<meta name="apple-mobile-web-app-title" content="Plebs">
<link rel="apple-touch-icon" href="./images/plebs-icon.png">
<!-- Plebs Styling -->
<link rel="stylesheet" href="styles.css">
<!-- Inline theme script to prevent flash of wrong theme -->
<script>
(function() {
const savedTheme = localStorage.getItem('theme');
if (savedTheme) {
document.documentElement.setAttribute('data-theme', savedTheme);
} else {
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
document.documentElement.setAttribute('data-theme', prefersDark ? 'dark' : 'light');
}
})();
</script>
</head>
<body>
<header role="banner">
<div class="header-content">
<button class="menu-toggle" onclick="toggleSidebar()" aria-label="Toggle menu" data-i18n-aria-label="aria.toggleMenu">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" />
</svg>
</button>
<a href="#/" class="logo">
<svg width="44" height="44" viewBox="0 0 24 24">
<path d="M4 7 Q4 4, 6 5.5 L11 10.5 Q14 12, 11 13.5 L6 18.5 Q4 20, 4 17 Z" fill="#1da1f2" opacity="0.4"/>
<path d="M10 7 Q10 4, 12 5.5 L17 10.5 Q20 12, 17 13.5 L12 18.5 Q10 20, 10 17 Z" fill="#1da1f2"/>
</svg>
Plebs
</a>
<div class="search-bar" role="search">
<input type="text" placeholder="Search videos..." id="searchInput" aria-label="Search videos" data-i18n-placeholder="header.search">
</div>
<div class="header-actions">
<button class="notification-toggle" onclick="loadNotifications()" title="Notifications"
id="notificationBtn" data-i18n-title="header.notifications">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9" />
<path d="M13.73 21a2 2 0 0 1-3.46 0" />
</svg>
<span class="notification-badge" id="notificationBadge" style="display: none;"></span>
</button>
<button class="notification-toggle" onclick="showSettingsModal()" title="Settings" data-i18n-title="header.settings">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path
d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z" />
</svg>
</button>
<button class="upload-btn create-btn" onclick="showCreateModal()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"
style="display: inline-block; vertical-align: middle;">
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z" />
</svg>
<span class="btn-text" data-i18n="header.create">Create</span>
</button>
<!-- User Menu -->
<div class="user-menu" id="userMenu">
<button class="user-btn" id="userBtn" onclick="toggleUserMenu()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" id="userIcon">
<path
d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
</svg>
<img id="userAvatar" src="" alt="User" style="display: none;">
</button>
<div class="user-dropdown" id="userDropdown">
<button id="adminMenuBtn" onclick="navigateTo('/admin')" style="display: none;">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/>
</svg>
<span data-i18n="header.admin">Admin</span>
</button>
<button onclick="viewOwnProfile()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
</svg>
<span data-i18n="header.viewProfile">View Profile</span>
</button>
<button onclick="handleLogout()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path
d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z" />
</svg>
<span data-i18n="header.logout">Logout</span>
</button>
</div>
</div>
</div>
</div>
</header>
<div class="sidebar-overlay" onclick="toggleSidebar()"></div>
<div class="container">
<aside class="sidebar" id="sidebar" role="navigation" aria-label="Main navigation" data-i18n-aria-label="aria.mainNavigation">
<div class="sidebar-header-expanded">
<button class="menu-toggle" onclick="toggleSidebar()" aria-label="Toggle menu" data-i18n-aria-label="aria.toggleMenu">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" />
</svg>
</button>
<a href="#/" class="logo" onclick="closeSidebarOnNavigate()">
<svg width="44" height="44" viewBox="0 0 24 24">
<path d="M4 7 Q4 4, 6 5.5 L11 10.5 Q14 12, 11 13.5 L6 18.5 Q4 20, 4 17 Z" fill="#1da1f2" opacity="0.4"/>
<path d="M10 7 Q10 4, 12 5.5 L17 10.5 Q20 12, 17 13.5 L12 18.5 Q10 20, 10 17 Z" fill="#1da1f2"/>
</svg>
Plebs
</a>
</div>
<a href="#/" class="sidebar-item active" title="Home" data-i18n-title="nav.home">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
</svg>
<span class="sidebar-label" data-i18n="nav.home">Home</span>
</a>
<a href="#/following" class="sidebar-item" title="Following" data-i18n-title="nav.following">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path
d="M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z" />
</svg>
<span class="sidebar-label" data-i18n="nav.following">Following</span>
</a>
<a href="#/my-videos" class="sidebar-item" title="My Videos" data-i18n-title="nav.myVideos">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path
d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1H6v-1z" />
</svg>
<span class="sidebar-label" data-i18n="nav.myVideos">My Videos</span>
</a>
<a href="#/liked" class="sidebar-item" title="Liked" data-i18n-title="nav.liked">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path
d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z" />
</svg>
<span class="sidebar-label" data-i18n="nav.liked">Liked</span>
</a>
<a href="#/history" class="sidebar-item" title="History" data-i18n-title="nav.history">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path
d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z" />
</svg>
<span class="sidebar-label" data-i18n="nav.history">History</span>
</a>
<hr class="sidebar-divider">
<div class="sidebar-section-title">
<span class="sidebar-label" data-i18n="nav.topics">TOPICS</span>
</div>
<a href="#/live" class="sidebar-item" title="Live Streams" data-i18n-title="nav.liveStreams">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<circle cx="12" cy="12" r="4" fill="#f44336"/>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" fill="currentColor"/>
</svg>
<span class="sidebar-label" data-i18n="nav.live">Live</span>
</a>
<a href="#/tag/bitcoin" class="sidebar-item" id="sidebar-bitcoin-link" title="Bitcoin" data-i18n-title="nav.bitcoin">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path
d="M17.06 11.57c.59-.69.94-1.59.94-2.57 0-1.86-1.27-3.43-3-3.87V3h-2v2h-2V3H9v2H6v2h1c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H6v2h3v2h2v-2h2v2h2v-2.13c2.39-.54 4-2.65 4-5.07 0-1.37-.53-2.62-1.4-3.55M10 7h4c1.1 0 2 .9 2 2s-.9 2-2 2h-4V7zm5 10h-5v-4h5c1.1 0 2 .9 2 2s-.9 2-2 2z" />
</svg>
<span class="sidebar-label" data-i18n="nav.bitcoin">Bitcoin</span>
</a>
<a href="#/tag/nostr" class="sidebar-item" title="Nostr" data-i18n-title="nav.nostr">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path d="M7 2v11h3v9l7-12h-4l4-8z" />
</svg>
<span class="sidebar-label" data-i18n="nav.nostr">Nostr</span>
</a>
<a href="#/tag/tech" class="sidebar-item" title="Technology" data-i18n-title="nav.technology">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path
d="M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z" />
</svg>
<span class="sidebar-label" data-i18n="nav.technology">Technology</span>
</a>
<a href="#/tag/gaming" class="sidebar-item" title="Gaming" data-i18n-title="nav.gaming">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path
d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z" />
</svg>
<span class="sidebar-label" data-i18n="nav.gaming">Gaming</span>
</a>
<a href="#/tag/tutorial" class="sidebar-item" title="Tutorials" data-i18n-title="nav.tutorials">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path
d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" />
</svg>
<span class="sidebar-label" data-i18n="nav.tutorials">Tutorials</span>
</a>
<a href="#/tag/podcast" class="sidebar-item" title="Podcasts" data-i18n-title="nav.podcasts">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path
d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z" />
</svg>
<span class="sidebar-label" data-i18n="nav.podcasts">Podcasts</span>
</a>
<a href="#/tag/music" class="sidebar-item" title="Music" data-i18n-title="nav.music">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z" />
</svg>
<span class="sidebar-label" data-i18n="nav.music">Music</span>
</a>
<a href="#/tag/nsfw" class="sidebar-item" id="sidebar-nsfw-link" title="NSFW" data-i18n-title="nav.nsfw">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="sidebar-icon">
<path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/>
</svg>
<span class="sidebar-label" data-i18n="nav.nsfw">NSFW</span>
</a>
<div class="sidebar-footer">
<div class="sidebar-footer-links">
<a href="#/about" class="sidebar-footer-link" data-i18n="nav.about">About</a>
<a href="#/faq" class="sidebar-footer-link" data-i18n="nav.faq">FAQ</a>
<a href="#/contact" class="sidebar-footer-link" data-i18n="nav.contact">Contact</a>
</div>
<div class="sidebar-footer-links">
<a href="#/terms" class="sidebar-footer-link" data-i18n="nav.terms">Terms</a>
<a href="#/privacy" class="sidebar-footer-link" data-i18n="nav.privacy">Privacy</a>
<a href="#/dmca" class="sidebar-footer-link" data-i18n="nav.dmca">DMCA</a>
</div>
<div class="sidebar-footer-credits">
<a class="github-button" href="https://github.com/Spl0itable/plebs-app"
data-color-scheme="no-preference: light; light: light; dark: dark;" data-size="large"
aria-label="Follow @Spl0itable on GitHub" data-i18n="nav.github">GitHub</a><br />
<a href="https://nostrservices.com" target="_blank" style="color: var(--accent); text-decoration: none;">21 Million LLC</a>
</div>
</div>
</aside>
<main class="main-content" id="mainContent" role="main" aria-label="Video content" data-i18n-aria-label="aria.videoContent">
<div class="spinner" role="status" aria-label="Loading content" data-i18n-aria-label="aria.loadingContent"></div>
</main>
</div>
<!-- Login Modal -->
<div class="modal" id="loginModal">
<div class="modal-content login-modal">
<div class="modal-header">
<h2 data-i18n="login.title">Login with Nostr</h2>
<button class="close-modal" onclick="hideLoginModal()" aria-label="Close" data-i18n-aria-label="common.close">×</button>
</div>
<div class="login-options">
<button class="login-option" onclick="loginWithExtension()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<path
d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" />
</svg>
<span data-i18n="login.extension">Login with Extension</span>
<p data-i18n="login.extensionDesc">Use Alby, nos2x, or other Nostr browser extensions</p>
</button>
<button class="login-option" onclick="showConnectModal()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" />
</svg>
<span data-i18n="login.connect">Nostr Connect</span>
<p data-i18n="login.connectDesc">Connect with remote signers like Amber, nsec.app</p>
</button>
<button class="login-option" onclick="showPrivateKeyModal()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<path
d="M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z" />
</svg>
<span data-i18n="login.privateKey">Private Key</span>
<p data-i18n="login.privateKeyDesc">Enter your nsec or hex private key (local only)</p>
</button>
<div class="login-divider">
<span data-i18n="login.newToNostr">New to Nostr?</span>
</div>
<button class="login-option signup" onclick="showSignupModal()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<path
d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
</svg>
<span data-i18n="login.createAccount">Create Account</span>
<p data-i18n="login.createAccountDesc">Get started with a new Nostr identity to use on Plebs</p>
</button>
</div>
</div>
</div>
<!-- Connect Modal -->
<div class="modal" id="connectModal">
<div class="modal-content">
<div class="modal-header">
<h2 data-i18n="connect.title">Connect with Nostr</h2>
<button class="close-modal" onclick="hideConnectModal()" aria-label="Close" data-i18n-aria-label="common.close">×</button>
</div>
<div class="connect-steps">
<div class="connect-step">
<h3 data-i18n="connect.option1">Option 1: Use this connection string</h3>
<p style="margin-bottom: 0.5rem; color: var(--text-secondary);" data-i18n="connect.option1Desc">
Copy and paste this into any NIP-46 compatible app (nsec.app, Amber, etc.)
</p>
<textarea id="nostrConnectURI" readonly style="width: 100%; padding: 0.75rem; margin: 0.5rem 0; font-size: 0.875rem;
height: 100px; resize: none; background: var(--bg-primary);
color: var(--text-primary); border: 1px solid var(--border);
border-radius: 8px; word-break: break-all;"></textarea>
<div style="display: flex; gap: 0.5rem; margin-bottom: 1rem;">
<button class="copy-btn" onclick="copyNostrConnectURI()" data-i18n="connect.copyString">Copy Connection String</button>
<button class="copy-btn" onclick="toggleQRDisplay()" style="background: var(--bg-secondary);" data-i18n="connect.showQR">
Show QR Code
</button>
</div>
<!-- Connection status for connection string -->
<div id="connectStringStatus" style="display: none; padding: 0.75rem;
background: var(--bg-primary);
border: 1px solid var(--accent);
border-radius: 8px; margin: 1rem 0;
color: var(--accent); text-align: center;">
<div class="spinner"></div>
<span data-i18n="connect.listening">Listening for connection...</span>
</div>
<div id="qrCodeSection" style="display: none; margin: 1rem 0;">
<div id="nostrConnectQR" style="background: white; padding: 1rem;
border-radius: 8px; display: inline-block;"></div>
<!-- Connection status for QR code -->
<div id="qrConnectionStatus" style="display: none; padding: 0.75rem;
background: var(--bg-primary);
border: 1px solid var(--accent);
border-radius: 8px; margin-top: 1rem;
color: var(--accent); text-align: center;">
<div class="spinner"></div>
<span data-i18n="connect.listening">Listening for connection...</span>
</div>
</div>
</div>
<div class="divider">
<span data-i18n="connect.or">OR</span>
</div>
<div class="connect-step">
<h3 data-i18n="connect.option2">Option 2: Paste a bunker URL</h3>
<p style="margin-bottom: 0.5rem; color: var(--text-secondary);" data-i18n="connect.option2Desc">
If you already have a bunker:// URL from a remote signer
</p>
<input type="text" id="bunkerUrl" placeholder="bunker://..." data-i18n-placeholder="connect.bunkerPlaceholder" class="form-control">
<button class="upload-btn" onclick="connectWithBunker()" style="margin-top: 1rem;" data-i18n="connect.withBunker">
Connect with Bunker
</button>
</div>
<div class="connect-step" style="background: var(--bg-primary); padding: 1rem;
border-radius: 8px; margin-top: 1rem;">
<p style="font-size: 0.875rem; color: var(--text-secondary); margin: 0;">
<strong data-i18n="connect.popularSigners">Popular NIP-46 signers:</strong><br>
• <a href="https://nsec.app" target="_blank" style="color: var(--accent);">nsec.app</a> -
<span data-i18n="connect.webSigner">Web-based signer</span><br>
• <a href="https://github.com/greenart7c3/Amber" target="_blank"
style="color: var(--accent);">Amber</a> - <span data-i18n="connect.androidApp">Android app</span><br>
• <a href="https://highlighter.com/settings/keys/device" target="_blank"
style="color: var(--accent);">Highlighter</a> - <span data-i18n="connect.builtInSigner">Built-in signer</span>
</p>
</div>
</div>
</div>
</div>
<!-- Private Key Modal -->
<div class="modal" id="privateKeyModal">
<div class="modal-content">
<div class="modal-header">
<h2 data-i18n="privateKey.title">Login with Private Key</h2>
<button class="close-modal" onclick="hidePrivateKeyModal()" aria-label="Close" data-i18n-aria-label="common.close">×</button>
</div>
<div class="key-warning">
<h3>⚠️ <span data-i18n="privateKey.warning">Security Warning</span></h3>
<p data-i18n="privateKey.warningText">Your private key will be stored locally in your browser. For better security, consider using a
browser extension or Nostr Connect instead.</p>
</div>
<div class="form-group">
<label data-i18n="privateKey.label">Private Key (nsec or hex)</label>
<input type="password" id="privateKeyInput" placeholder="nsec1..." data-i18n-placeholder="privateKey.placeholder" class="form-control">
<div class="key-toggle">
<input type="checkbox" id="showKey" onchange="toggleKeyVisibility()">
<label for="showKey" data-i18n="privateKey.showKey">Show key</label>
</div>
</div>
<button class="upload-btn" onclick="loginWithPrivateKey()" style="margin-top: 1rem;" data-i18n="privateKey.login">
Login
</button>
</div>
</div>
<!-- Signup Modal -->
<div class="modal" id="signupModal">
<div class="modal-content signup-modal-content">
<div class="modal-header">
<h2 data-i18n="signup.title">Create Nostr Account</h2>
<button class="close-modal" onclick="hideSignupModal()" aria-label="Close" data-i18n-aria-label="common.close">×</button>
</div>
<!-- Nostr Explanation Section -->
<div class="nostr-explainer" id="nostrExplainer">
<div class="explainer-section">
<h3 data-i18n="signup.whatIsNostr">What is Nostr?</h3>
<p data-i18n="signup.nostrExplanation">Nostr is a decentralized social protocol that gives you ownership of your identity and content. Unlike traditional platforms, no company can ban you, censor your content, or shut down your account.</p>
</div>
<div class="explainer-section">
<h3 data-i18n="signup.whyPlebs">Why does Plebs use Nostr?</h3>
<p data-i18n="signup.plebsExplanation">Plebs is built on Nostr to provide censorship-resistant video sharing. Your videos, comments, and interactions are stored across a network of relays, not on our servers. Your Nostr identity works across hundreds of other apps too!</p>
</div>
<div class="explainer-section">
<h3 data-i18n="signup.howItWorks">How it works</h3>
<ul>
<li><strong data-i18n="signup.keysIdentity">Your keys = Your identity.</strong> <span data-i18n="signup.keysIdentityDesc">You'll get a private key (nsec) that proves you own your account.</span></li>
<li><strong data-i18n="signup.keepSecret">Keep your private key secret!</strong> <span data-i18n="signup.keepSecretDesc">It's like a password that can never be reset.</span></li>
<li><strong data-i18n="signup.oneIdentity">One identity, many apps.</strong> <span data-i18n="signup.oneIdentityDesc">Use the same account on Damus, Primal, Amethyst, and more.</span></li>
</ul>
</div>
<button class="upload-btn" onclick="showSignupForm()" style="margin-top: 1rem; width: 100%;" data-i18n="signup.gotIt">
Got it, let's create my account
</button>
</div>
<!-- Signup Form Section -->
<div class="signup-form-section" id="signupFormSection" style="display: none;">
<div class="form-group">
<label><span data-i18n="signup.username">Username</span> <span class="required-indicator">*</span></label>
<input type="text" id="signupUsername" class="form-control" data-i18n-placeholder="signup.usernamePlaceholder" placeholder="Choose a display name">
</div>
<div class="form-group">
<label data-i18n="signup.about">About (optional)</label>
<textarea id="signupAbout" class="form-control" rows="2" data-i18n-placeholder="signup.aboutPlaceholder" placeholder="Tell others about yourself"></textarea>
</div>
<div class="form-group">
<label data-i18n="signup.profilePicture">Profile Picture (optional)</label>
<div class="avatar-upload-section">
<div class="avatar-preview-container" id="signupAvatarPreview">
<div class="avatar-placeholder" id="avatarPlaceholder">
<span id="avatarInitial">?</span>
</div>
<img id="avatarPreviewImage" src="" alt="Avatar preview" style="display: none;">
</div>
<div class="avatar-upload-actions">
<input type="file" id="avatarFileInput" accept="image/*" style="display: none;" onchange="handleAvatarSelect(event)">
<button type="button" class="avatar-upload-btn" onclick="document.getElementById('avatarFileInput').click()">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"/>
</svg>
<span data-i18n="signup.uploadPhoto">Upload Photo</span>
</button>
<button type="button" class="avatar-remove-btn" id="avatarRemoveBtn" onclick="removeAvatarUpload()" style="display: none;" data-i18n="signup.remove">
Remove
</button>
</div>
<p class="avatar-hint" data-i18n="signup.avatarHint">Square images work best. Max 5MB.</p>
</div>
<div class="avatar-upload-progress" id="avatarUploadProgress" style="display: none;">
<div class="progress-bar">
<div class="progress-fill" id="avatarProgressFill" style="width: 0%"></div>
</div>
<span id="avatarUploadStatus" data-i18n="signup.uploading">Uploading...</span>
</div>
</div>
<div class="form-group">
<label><span data-i18n="signup.nostrAddress">Nostr Address</span> <span class="required-indicator">*</span></label>
<div class="nostr-address-input-group">
<input type="text" id="signupNostrAddress" class="form-control nostr-address-input" data-i18n-placeholder="signup.nostrAddressPlaceholder" placeholder="username" oninput="this.value = this.value.toLowerCase().replace(/[^a-z0-9_-]/g, ''); handleNostrAddressInput(event)">
<span class="nostr-address-domain">@nostrcheck.me</span>
</div>
<p class="form-hint" data-i18n="signup.nostrAddressHint">Your Nostr address makes your profile easier to find. Lowercase letters, numbers, _ and - only.</p>
<div class="nostr-address-status" id="nostrAddressStatus" style="display: none;">
<span class="status-icon"></span>
<span class="status-text"></span>
</div>
</div>
<div class="form-group">
<label data-i18n="signup.lightningAddress">Lightning Address (optional)</label>
<input type="text" id="signupLightningAddress" class="form-control" data-i18n-placeholder="signup.lightningPlaceholder" placeholder="you@walletofsatoshi.com">
<p class="form-hint" data-i18n="signup.lightningHint">Add a Lightning address to receive zaps (Bitcoin tips) on your videos and profile.</p>
</div>
<div class="profile-preview">
<div class="profile-preview-avatar" id="previewAvatar">
<span id="previewAvatarInitial">?</span>
<img id="previewAvatarImage" src="" alt="Preview" style="display: none;">
</div>
<div class="profile-preview-info">
<h3 id="previewName" data-i18n="signup.yourUsername">Your Username</h3>
<p id="previewAbout" data-i18n="signup.yourBio">Your bio will appear here</p>
</div>
</div>
<button class="upload-btn" onclick="createAccount()" id="createAccountBtn" style="margin-top: 1rem; width: 100%;" data-i18n="signup.createAccountBtn">
Create Account
</button>
<p style="font-size: 0.75rem; color: var(--text-secondary); text-align: center; margin-top: 1rem;">
<span data-i18n="signup.termsAgree">By creating an account, you agree to our</span> <a href="#/terms" style="color: var(--accent);" data-i18n="nav.terms">Terms of Service</a> <span data-i18n="signup.and">and</span> <a href="#/privacy" style="color: var(--accent);" data-i18n="nav.privacy">Privacy Policy</a>
</p>
</div>
<!-- Success Section -->
<div class="signup-success-section" style="display: none;" id="signupSuccess">
<div class="success-header">
<svg width="48" height="48" viewBox="0 0 24 24" fill="var(--success-color)">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
</svg>
<h3 data-i18n="signup.success">Account Created Successfully!</h3>
</div>
<div class="key-section">
<h4 data-i18n="signup.yourPrivateKey">Your Private Key (nsec)</h4>
<p class="key-warning-text" data-i18n="signup.keyWarning">This is the ONLY way to access your account. Save it somewhere safe!</p>
<div class="nsec-display">
<code id="generatedNsec"></code>
</div>
<button class="copy-btn" onclick="copyGeneratedKey()" id="copyNsecBtn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/>
</svg>
<span data-i18n="signup.copyPrivateKey">Copy Private Key</span>
</button>
</div>
<div class="key-instructions" id="keyInstructions" style="display: none;">
<h4 data-i18n="signup.howToUseKey">How to use your private key</h4>
<div class="instruction-list">
<div class="instruction-item">
<span class="instruction-number">1</span>
<p><strong data-i18n="signup.step1">Save it securely:</strong> <span data-i18n="signup.step1Desc">Store your nsec in a password manager, write it down, or keep it in an encrypted file. Never share it publicly!</span></p>
</div>
<div class="instruction-item">
<span class="instruction-number">2</span>
<p><strong data-i18n="signup.step2">To login again:</strong> <span data-i18n="signup.step2Desc">Click "Private Key" on the login screen and paste your nsec. It works like a password.</span></p>
</div>
<div class="instruction-item">
<span class="instruction-number">3</span>
<p><strong data-i18n="signup.step3">Use on other apps:</strong> <span data-i18n="signup.step3Desc">Your nsec works on all Nostr apps - Damus, Primal, Amethyst, and hundreds more!</span></p>
</div>
<div class="instruction-item">
<span class="instruction-number">4</span>
<p><strong data-i18n="signup.step4">Consider a signer app:</strong> <span data-i18n="signup.step4Desc">For better security, use apps like Amber (Android) or a browser extension like Alby to manage your keys.</span></p>
</div>
</div>
<button class="upload-btn" onclick="finishAccountCreation()" style="margin-top: 1rem; width: 100%;" data-i18n="signup.continueToPlebs">
Continue to Plebs
</button>
</div>
</div>
</div>
</div>
<!-- Notifications Modal -->
<div class="notifications-modal" id="notificationsModal">
<div class="notifications-modal-content">
<div class="modal-header">
<h2 id="notificationsModalTitle" data-i18n="notifications.title">Notifications</h2>
<div class="modal-header-actions">
<button class="notification-settings-btn" onclick="toggleNotificationSettings()" title="Notification Settings" data-i18n-title="notifications.settingsTitle">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/>
</svg>
</button>
<button class="close-modal" onclick="hideNotificationsModal()" aria-label="Close" data-i18n-aria-label="common.close">×</button>
</div>
</div>
<div class="notifications-list" id="notificationsList">
<div class="spinner"></div>
</div>
<div class="notification-settings-panel" id="notificationSettingsPanel" style="display: none;">
<div class="notification-settings-list">
<div class="notification-setting-item">
<label for="notifReactions">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
<path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z"/>
</svg>
<span data-i18n="notifications.reactions">Reactions (likes/dislikes)</span>
</label>
<input type="checkbox" id="notifReactions" checked onchange="updateNotificationSetting('reactions', this.checked)">
</div>
<div class="notification-setting-item">
<label for="notifReplies">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
<path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM18 14H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/>
</svg>
<span data-i18n="notifications.replies">Comments & Replies</span>
</label>
<input type="checkbox" id="notifReplies" checked onchange="updateNotificationSetting('replies', this.checked)">
</div>
<div class="notification-setting-item">
<label for="notifZaps">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
<path d="M7 2v11h3v9l7-12h-4l4-8z"/>
</svg>
<span data-i18n="notifications.zaps">Zaps</span>
</label>
<input type="checkbox" id="notifZaps" checked onchange="updateNotificationSetting('zaps', this.checked)">
</div>
<div class="notification-setting-item">
<label for="notifChatMentions">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/>
</svg>
<span data-i18n="notifications.chatMentions">Live Chat Mentions</span>
</label>
<input type="checkbox" id="notifChatMentions" checked onchange="updateNotificationSetting('chatMentions', this.checked)">
</div>
<div class="notification-setting-item">
<label for="notifNewFollowers">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
<path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
</svg>
<span data-i18n="notifications.newFollowers">New Followers</span>
</label>
<input type="checkbox" id="notifNewFollowers" checked onchange="updateNotificationSetting('newFollowers', this.checked)">
</div>
</div>
<p class="notification-settings-note" data-i18n="notifications.syncNote">Settings are synced across devices via Nostr</p>
</div>
</div>
</div>
<!-- Settings Modal -->
<div class="modal" id="settingsModal">
<div class="modal-content">
<div class="modal-header">
<h2 data-i18n="settings.title">Settings</h2>
<button class="close-modal" onclick="hideSettingsModal()" aria-label="Close" data-i18n-aria-label="common.close">×</button>
</div>
<form class="upload-form" id="settingsForm">
<div class="form-group">
<div class="checkbox-group">
<input type="checkbox" id="saveToNostr" checked>
<label for="saveToNostr" data-i18n="settings.saveToNostr">Save to Nostr</label>
</div>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.saveToNostrDesc">
Sync settings across all Plebs instances
</p>
</div>
<div class="form-group">
<label data-i18n="settings.language">Language</label>
<select id="languageSelect" class="form-control" onchange="changeLanguage(this.value)" style="margin-top: 0.5rem;">
<option value="en">English</option>
<option value="es">Español</option>
<option value="fr">Français</option>
<option value="de">Deutsch</option>
<option value="pt">Português</option>
<option value="ru">Русский</option>
<option value="zh">中文</option>
<option value="ja">日本語</option>
<option value="ko">한국어</option>
<option value="ar">العربية</option>
<option value="hi">हिन्दी</option>
<option value="it">Italiano</option>
</select>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.languageDesc">
Choose your preferred language
</p>
</div>
<div class="form-group">
<div class="checkbox-group">
<input type="checkbox" id="darkModeToggle" onchange="handleDarkModeToggle()">
<label for="darkModeToggle" data-i18n="settings.darkMode">Dark Mode</label>
</div>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.darkModeDesc">
Switch between light and dark theme
</p>
</div>
<div class="form-group">
<label data-i18n="settings.contentWarning">Content Warning Preferences</label>
<div class="checkbox-group">
<input type="checkbox" id="showNSFWWarnings" checked>
<label for="showNSFWWarnings" data-i18n="settings.showNsfwWarnings">Show NSFW warnings</label>
</div>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.showNsfwWarningsDesc">
Display age verification for NSFW content
</p>
<div class="checkbox-group" style="margin-top: 0.5rem;">
<input type="checkbox" id="showCommunityWarnings" checked>
<label for="showCommunityWarnings" data-i18n="settings.showCommunityWarnings">Show community warnings</label>
</div>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.showCommunityWarningsDesc">
Display warnings for flagged or heavily downvoted content
</p>
<div class="checkbox-group" style="margin-top: 0.5rem;">
<input type="checkbox" id="showFollowsReportWarnings" checked>
<label for="showFollowsReportWarnings" data-i18n="settings.showFollowsReportWarnings">Show warnings from followed reports</label>
</div>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.showFollowsReportWarningsDesc">
Display warnings when 5+ people you follow have reported content
</p>
</div>
<div class="form-group filter-packs-section">
<label data-i18n="settings.filterPacks">Content Filter Packs</label>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.filterPacksDesc">
Enable filter packs to automatically hide content matching specific keywords.
</p>
<div id="filterPacksList" class="filter-packs-list">
<!-- Filter packs will be populated by JavaScript -->
</div>
</div>
<div class="form-group">
<label data-i18n="settings.customKeywordFilter">Custom Keyword Filter</label>
<textarea id="customKeywordFilter"
placeholder="Enter keywords or phrases separated by commas Example: spam, unwanted content, specific phrase"
data-i18n-placeholder="settings.customKeywordFilterPlaceholder"
rows="3"></textarea>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.customKeywordFilterDesc">
Add your own keywords to filter out (comma-separated)
</p>
</div>
<div class="form-group muted-users-section">
<label data-i18n="settings.mutedUsers">Muted Users</label>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.mutedUsersDesc">
Users you've muted won't appear in your feed or comments.
</p>
<div id="settingsMutedUsersList" class="muted-users-list">
<div class="spinner" style="margin: 1rem auto;"></div>
</div>
</div>
<div class="form-group">
<label data-i18n="settings.blossomServer">Blossom Server Settings</label>
<div class="checkbox-group">
<input type="checkbox" id="usePremiumBlossom" onchange="togglePremiumBlossom()">
<label for="usePremiumBlossom" data-i18n="settings.premiumBlossom">Premium Blossom Server (NostrMedia.com)</label>
</div>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.premiumBlossomDesc">
Use NostrMedia.com if you are a subscribed user
</p>
</div>
<div class="form-group">
<label data-i18n="settings.customBlossomServers">Custom Blossom Servers</label>
<textarea id="customBlossomServers"
placeholder="Enter server URLs separated by commas Example: https://blossom.example.com, https://another.example.com"
data-i18n-placeholder="settings.customBlossomServersPlaceholder"
rows="3"></textarea>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.customBlossomServersDesc">
Add your own Blossom servers (comma-separated)
</p>
</div>
<div class="form-group">
<label data-i18n="settings.relaySettings">Relay Settings</label>
<div class="checkbox-group">
<input type="checkbox" id="useWotRelays" onchange="toggleWotRelays()">
<label for="useWotRelays" data-i18n="settings.useWotRelays">Use Web of Trust Relays</label>
</div>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="settings.useWotRelaysDesc">
Connect to Web of Trust relays for better spam filtering
</p>
</div>
<div style="display: flex; gap: 1rem; margin-top: 1.5rem;">
<button type="button" class="upload-btn" style="flex: 1;" onclick="saveSettings()" data-i18n="settings.saveSettings">
Save Settings
</button>
<button type="button" class="upload-btn"
style="background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border);"
onclick="resetSettings()" data-i18n="settings.resetDefaults">
Reset to Defaults
</button>
</div>
</form>
</div>
</div>
<!-- Upload Modal -->
<div class="modal" id="uploadModal">
<div class="modal-content">
<div class="modal-header">
<button class="modal-back-btn" onclick="backToCreateModal()" title="Back to Create" data-i18n-title="upload.backToCreate">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/>
</svg>
</button>
<h2 id="uploadModalTitle" data-i18n="upload.title">Upload Video</h2>
<button class="close-modal" onclick="hideUploadModal()" aria-label="Close" data-i18n-aria-label="common.close">×</button>
</div>
<form class="upload-form" id="uploadForm">
<!-- Video Upload Section -->
<div class="form-group">
<label id="videoFileLabel"><span data-i18n="upload.videoFile">Video File</span> <span class="required-indicator">*</span></label>
<!-- Recording option (shown only for shorts) -->
<div class="record-option" id="recordOption" style="display: none;">
<button type="button" class="record-video-btn" id="recordVideoBtn" onclick="toggleRecording()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<circle cx="12" cy="12" r="8"/>
</svg>
<span id="recordBtnText" data-i18n="upload.recordFromCamera">Record from Camera</span>
</button>
<div class="record-preview-container" id="recordPreviewContainer" style="display: none;">
<video id="recordPreview" autoplay muted playsinline></video>
<div class="record-controls" id="recordControls">
<button type="button" class="camera-switch-btn" id="cameraSwitchBtn" onclick="switchCamera()" title="Switch Camera" style="display: none;">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M9 12c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3zm13-2V7c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-3l-2-2zm-4 2c0 2.76-2.24 5-5 5s-5-2.24-5-5 2.24-5 5-5 5 2.24 5 5z"/>
<path d="M7 5l-3 3 3 3V8h4V6H7V5zm10 14l3-3-3-3v3h-4v2h4v1z"/>
</svg>
</button>
<span class="record-timer" id="recordTimer">0:00</span>
<button type="button" class="record-stop-btn" id="recordStopBtn" onclick="stopRecording()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<rect x="6" y="6" width="12" height="12"/>
</svg>
<span data-i18n="upload.stop">Stop</span>
</button>
</div>
</div>
<p class="record-hint" data-i18n="upload.recordHint">Record a vertical video (up to 60 seconds)</p>
<div class="upload-divider">
<span data-i18n="upload.or">or</span>
</div>
</div>
<div class="file-upload" id="fileUpload" onclick="document.getElementById('videoFile').click()">
<svg width="48" height="48" viewBox="0 0 24 24" fill="currentColor" style="opacity: 0.5;">
<path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z" />
</svg>
<p data-i18n="upload.clickToSelect">Click to select video or drag and drop</p>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.5rem;" id="uploadHint" data-i18n="upload.fileHint">
MP4, AVI, MOV, etc (max 2GB input, will compress to <100MB)</p>
</div>
<input type="file" id="videoFile" accept="video/*" style="display: none;">
<input type="hidden" id="uploadType" value="video">
<!-- Video Upload Progress (shown after selection) -->
<div class="upload-item-progress" id="videoUploadProgress" style="display: none;">
<div class="upload-item-header">
<span class="upload-item-name" id="videoFileName">video.mp4</span>
<span class="upload-item-status" id="videoUploadStatus" data-i18n="upload.preparing">Preparing...</span>
</div>
<div class="progress-bar">
<div class="progress-fill" id="videoProgressFill" style="width: 0%"></div>
</div>
<div class="upload-item-details" id="videoUploadDetails"></div>
<div class="server-status" id="videoServerStatus"></div>
<!-- Video Preview (shown after upload complete) -->
<div class="upload-preview" id="videoPreview" style="display: none;">
<video id="videoPreviewPlayer" controls playsinline></video>
<button type="button" class="preview-delete-btn" onclick="deleteVideoUpload()" title="Remove and upload different video" data-i18n-title="upload.removeVideo">
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/>
</svg>
<span data-i18n="upload.remove">Remove</span>
</button>
</div>
</div>
</div>
<!-- Thumbnail Upload Section (Optional) -->
<div class="form-group">
<label><span data-i18n="upload.thumbnail">Thumbnail</span> <span style="font-weight: normal; color: var(--text-secondary);" data-i18n="upload.optional">(optional)</span></label>
<div class="file-upload thumbnail-upload" id="thumbnailUpload" onclick="document.getElementById('thumbnailFile').click()">
<svg width="32" height="32" viewBox="0 0 24 24" fill="currentColor" style="opacity: 0.5;">
<path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/>
</svg>
<p data-i18n="upload.thumbnailHint">Click to select or auto-generate from video</p>
</div>
<input type="file" id="thumbnailFile" accept="image/*" style="display: none;">
<!-- Thumbnail Upload Progress -->
<div class="upload-item-progress" id="thumbnailUploadProgress" style="display: none;">
<div class="upload-item-header">
<span class="upload-item-name" id="thumbnailFileName">thumbnail.jpg</span>
<span class="upload-item-status" id="thumbnailUploadStatus" data-i18n="common.uploading">Uploading...</span>
</div>
<div class="progress-bar">
<div class="progress-fill" id="thumbnailProgressFill" style="width: 0%"></div>
</div>
<div class="server-status" id="thumbnailServerStatus"></div>
<!-- Thumbnail Preview (shown after upload complete) -->
<div class="upload-preview" id="thumbnailPreview" style="display: none;">
<img id="thumbnailPreviewImage" alt="Thumbnail preview">
<button type="button" class="preview-delete-btn" onclick="deleteThumbnailUpload()" title="Remove and upload different thumbnail" data-i18n-title="upload.removeThumbnail">
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/>
</svg>
<span data-i18n="upload.remove">Remove</span>
</button>
</div>
</div>
</div>
<div class="form-group">
<label><span data-i18n="upload.titleLabel">Title</span> <span class="required-indicator">*</span></label>
<input type="text" id="videoTitle" placeholder="Enter video title" data-i18n-placeholder="upload.titlePlaceholder" required>
</div>
<div class="form-group">
<label><span data-i18n="upload.description">Description</span> <span style="font-weight: normal; color: var(--text-secondary);" data-i18n="upload.optional">(optional)</span></label>
<textarea id="videoDescription" placeholder="Tell viewers about your video" data-i18n-placeholder="upload.descriptionPlaceholder"></textarea>
</div>
<div class="form-group">
<label><span data-i18n="upload.tags">Tags (comma separated)</span> <span class="required-indicator">*</span></label>
<input type="text" id="videoTags" placeholder="bitcoin, nostr, tutorial" data-i18n-placeholder="upload.tagsPlaceholder" required>
</div>
<div class="form-group">
<div class="checkbox-group">
<input type="checkbox" id="nsfwCheckbox">
<label for="nsfwCheckbox" data-i18n="upload.markNsfw">Mark as NSFW (18+)</label>
</div>
<p style="font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem;" data-i18n="upload.nsfwDesc">
Content containing adult material should be marked as NSFW
</p>
</div>
<!-- Hidden legacy elements for compatibility -->
<div id="uploadProgress" style="display: none;">
<p id="uploadStatus"></p>
<div class="progress-bar"><div class="progress-fill" id="progressFill"></div></div>
<div id="compressionProgress" style="display: none;">
<p id="compressionStatus"></p>
<div id="compressionStats"></div>
</div>
<div id="serverStatus"></div>
</div>
<div id="compressionOptions" style="display: none;">
<input type="checkbox" id="enableCompression" checked>
<select id="compressionQualitySelect"><option value="high" selected data-i18n="upload.qualityHigh">High</option></select>
<div id="compressionInfo"></div>
<div id="compressionWarning"></div>
</div>
<div class="upload-actions" style="display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem;">
<div style="display: flex; gap: 1rem;">
<button type="button" class="btn-secondary" id="saveDraftButton" onclick="saveCurrentAsDraft()" style="flex: 1;" data-i18n="upload.saveDraft">
Save as Draft
</button>
<button type="submit" class="upload-btn" id="publishButton" disabled style="flex: 2;">
<span id="publishButtonText" data-i18n="upload.selectVideo">Select a video to upload</span>
</button>
</div>
</div>
<p style="font-size: 0.75rem; color: var(--text-secondary); text-align: center; margin-top: 1rem;" data-i18n-html="upload.termsNotice">
By uploading, you accept our <a href="#/terms" style="color: var(--accent);">Terms of Service</a> and <a href="#/privacy" style="color: var(--accent);">Privacy Policy</a>
</p>
</form>