-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
1341 lines (1241 loc) · 76.2 KB
/
index.html
File metadata and controls
1341 lines (1241 loc) · 76.2 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, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>Nymchat</title>
<meta name="description" content="Ephemeral anonymous chat messaging. Bridged with Bitchat geohash channels.">
<link rel="manifest"
href="data:application/json;base64,eyJuYW1lIjoiTnltY2hhdCIsInNob3J0X25hbWUiOiJOeW1jaGF0Iiwic3RhcnRfdXJsIjoiaHR0cHM6Ly93ZWIubnltY2hhdC5hcHAiLCJkaXNwbGF5Ijoic3RhbmRhbG9uZSIsInRoZW1lX2NvbG9yIjoiIzAwMDAwMCIsImJhY2tncm91bmRfY29sb3IiOiIjMDAwMDAwIiwiaWNvbnMiOlt7InNyYyI6Imh0dHBzOi8vbnltY2hhdC5hcHAvaW1hZ2VzL05ZTS1pY29uLnBuZyIsInNpemVzIjoiMTkyeDE5MiIsInR5cGUiOiJpbWFnZS9wbmcifSx7InNyYyI6Imh0dHBzOi8vbnltY2hhdC5hcHAvaW1hZ2VzL05ZTS1pY29uLnBuZyIsInNpemVzIjoiNTEyeDUxMiIsInR5cGUiOiJpbWFnZS9wbmcifV19">
<link rel="icon" type="image/x-icon" href="https://nymchat.app/images/favicon.ico">
<link rel="icon" type="image/png" sizes="192x192" href="https://nymchat.app/images/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512" href="https://nymchat.app/images/android-chrome-512x512.png">
<link rel="apple-touch-icon" sizes="192x192" href="https://nymchat.app/images/android-chrome-192x192.png">
<!-- Open Graph Meta Tags -->
<meta property="og:title" content="Anonymously Chat with Nymchat">
<meta property="og:description"
content="Ephemeral anonymous chat messaging over Nostr. Bridged with Bitchat geohash channels.">
<meta property="og:image" content="https://nymchat.app/images/NYM-favicon.png">
<meta property="og:url" content="https://app.nymchat.app">
<meta property="og:type" content="website">
<link rel="icon" href="https://nymchat.app/images/NYM-favicon.png" type="image/png">
<link rel="canonical" href="https://app.nymchat.app/">
<meta name="theme-color" content="#000000">
<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="Nymchat">
<link rel="apple-touch-icon" href="https://nymchat.app/images/NYM-favicon.png">
<!-- Preload critical assets for faster paint -->
<link rel="preload" href="css/styles.css" as="style">
<link rel="preload" href="js/nostr-tools.js" as="script">
<link rel="preload" href="js/app.js" as="script">
<!-- Stylesheet -->
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<script>
// Apply color mode immediately to prevent flash of wrong theme
(function () {
var mode = localStorage.getItem('nym_color_mode') || 'auto';
var isLight = mode === 'light' || (mode === 'auto' && window.matchMedia('(prefers-color-scheme: light)').matches);
if (isLight) document.body.classList.add('light-mode');
})();
</script>
<div id="wallpaperLayer"></div>
<div class="mobile-overlay" id="mobileOverlay" onclick="nym.closeSidebar()"></div>
<button class="mobile-menu-toggle" onclick="toggleSidebar()">☰</button>
<!-- Context Menu -->
<div class="context-menu" id="contextMenu">
<img id="ctxBannerImg" class="context-menu-banner" src="" alt="" style="display: none;"
onclick="event.stopPropagation(); nym.expandImage(this.src); document.getElementById('contextMenu').classList.remove('active');">
<div class="context-menu-avatar-header" id="ctxAvatarHeader">
<img id="ctxAvatarImg" class="avatar-context" src="" alt="Avatar" style="cursor: pointer;"
onclick="event.stopPropagation(); nym.expandImage(this.src); document.getElementById('contextMenu').classList.remove('active');">
<div class="context-menu-avatar-nym" id="ctxAvatarNym"></div>
<div class="context-menu-copy-pubkey" id="ctxCopyPubkey">
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"
style="vertical-align: middle; margin-right: 4px;">
<rect x="5" y="5" width="8" height="9" rx="1" />
<path d="M 3 10 L 3 4 C 3 3.45 3.45 3 4 3 L 9 3" stroke-linecap="round" />
</svg>
Copy Pubkey
</div>
</div>
<div class="context-menu-item" id="ctxReact">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"
style="vertical-align: middle; margin-right: 8px;">
<circle cx="8" cy="8" r="6" />
<circle cx="6" cy="7" r="0.5" fill="currentColor" />
<circle cx="10" cy="7" r="0.5" fill="currentColor" />
<path d="M 5.5 9.5 Q 8 11.5 10.5 9.5" stroke-linecap="round" />
</svg>
React
</div>
<div class="context-menu-item" id="ctxMention">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" stroke="none"
style="vertical-align: middle; margin-right: 8px;">
<text x="8" y="12.5" font-size="14" font-family="Arial, sans-serif" text-anchor="middle"
font-weight="600">@</text>
</svg>
Mention
</div>
<div class="context-menu-item" id="ctxPM">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"
style="vertical-align: middle; margin-right: 8px;">
<rect x="2" y="4" width="12" height="9" rx="1" />
<path d="M 2 5 L 8 9 L 14 5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
Private Message
</div>
<div class="context-menu-item lightning" id="ctxZap" style="display: none;">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"
style="vertical-align: middle; margin-right: 8px;">
<path d="M 9 2 L 4 9 H 7 L 7 14 L 12 7 H 9 Z" />
</svg>
Zap Bitcoin
</div>
<div class="context-menu-item" id="ctxQuote">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"
style="vertical-align: middle; margin-right: 8px;">
<path d="M 3 6 C 3 4.5 4 3 6 3 C 6 4.5 5 5 4 5.5 C 3.5 5.8 3 6.3 3 7 L 3 9 L 6 9 L 6 6 Z" />
<path d="M 9 6 C 9 4.5 10 3 12 3 C 12 4.5 11 5 10 5.5 C 9.5 5.8 9 6.3 9 7 L 9 9 L 12 9 L 12 6 Z" />
</svg>
Quote Message
</div>
<div class="context-menu-item" id="ctxCopyMessage">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"
style="vertical-align: middle; margin-right: 8px;">
<rect x="5" y="5" width="8" height="9" rx="1" />
<path d="M 3 10 L 3 4 C 3 3.45 3.45 3 4 3 L 9 3" stroke-linecap="round" />
</svg>
Copy Message
</div>
<div class="context-menu-item report" id="ctxReport">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"
style="vertical-align: middle; margin-right: 8px;">
<circle cx="8" cy="8" r="6" />
<path d="M 8 5 L 8 8.5" stroke-linecap="round" stroke-width="2" />
<circle cx="8" cy="10.5" r="0.8" fill="currentColor" stroke="none" />
</svg>
Report
</div>
<div class="context-menu-item danger" id="ctxDeleteMessage">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"
style="vertical-align: middle; margin-right: 8px;">
<path d="M 3 5 L 13 5" stroke-linecap="round" />
<path d="M 5 5 L 5 13 C 5 13.55 5.45 14 6 14 L 10 14 C 10.55 14 11 13.55 11 13 L 11 5"
stroke-linejoin="round" />
<path d="M 6.5 2 L 9.5 2" stroke-linecap="round" />
<path d="M 7 7 L 7 11.5" stroke-linecap="round" />
<path d="M 9 7 L 9 11.5" stroke-linecap="round" />
</svg>
Delete Message
</div>
<div class="context-menu-item danger" id="ctxKickMember" style="display: none;">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"
style="vertical-align: middle; margin-right: 8px;">
<path d="M 6 8 L 2 8" stroke-linecap="round" />
<path d="M 4 6 L 2 8 L 4 10" stroke-linecap="round" stroke-linejoin="round" />
<circle cx="10" cy="5.5" r="2.5" />
<path d="M 5.5 14 C 5.5 11.5 7.5 10 10 10 C 12.5 10 14.5 11.5 14.5 14" stroke-linecap="round" />
</svg>
Remove from Group
</div>
<div class="context-menu-item danger" id="ctxBlock">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"
style="vertical-align: middle; margin-right: 8px;">
<circle cx="8" cy="8" r="6" />
<line x1="3.75" y1="3.75" x2="12.25" y2="12.25" stroke-width="1.5" stroke-linecap="round" />
</svg>
Block User
</div>
</div>
<!-- PM / Group Modal -->
<div class="modal" id="newPMModal">
<div class="modal-content" style="max-width: 440px;">
<button class="modal-close" onclick="closeModal('newPMModal')">✕</button>
<div class="modal-header">New Message</div>
<div class="modal-body">
<div class="form-group">
<label class="form-label">To</label>
<div class="pm-recipient-box" id="pmRecipientBox" onclick="document.getElementById('pmRecipientInput').focus()">
<div class="pm-recipient-chips" id="pmRecipientChips"></div>
<input type="text" class="pm-recipient-input" id="pmRecipientInput"
placeholder="Search nym or paste pubkey..."
oninput="nym.onNewPMRecipientInput(this.value)"
onkeydown="nym.onNewPMRecipientKeydown(event)"
autocomplete="off">
</div>
<div class="pm-suggestions" id="pmSuggestions"></div>
</div>
<div class="form-group" id="pmGroupNameGroup" style="display:none;">
<label class="form-label">Group Name <span style="font-weight:400;text-transform:none;letter-spacing:0;">(optional)</span></label>
<input type="text" class="form-input" id="pmGroupNameInput" placeholder="Enter a group name...">
</div>
<div class="form-group" style="margin-bottom:0;">
<label class="form-label">Message <span style="font-weight:400;text-transform:none;letter-spacing:0;">(optional)</span></label>
<textarea class="form-textarea" id="pmInitialMessage" placeholder="Start the conversation..." style="min-height:80px;resize:none;"></textarea>
</div>
</div>
<div class="modal-actions">
<button class="icon-btn" onclick="closeModal('newPMModal')">Cancel</button>
<button class="send-btn" id="pmStartBtn" onclick="nym.startNewPMFromModal()" disabled>Start</button>
</div>
</div>
</div>
<!-- Report Modal -->
<div class="modal" id="reportModal" style="display: none;">
<div class="modal-content" style="max-width: 500px;">
<button class="modal-close" onclick="nym.closeReportModal()">✕</button>
<div class="modal-header">
<h2>Report User/Content</h2>
</div>
<div class="modal-body">
<p style="margin-bottom: 15px; color: var(--text-dim);">
Reporting: <span id="reportTargetNym" style="color: var(--primary);"></span>
</p>
<div style="margin-bottom: 20px;">
<label style="display: block; margin-bottom: 10px; color: var(--text-dim);">Report Type:</label>
<select id="reportType"
style="width: 100%; padding: 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border, var(--border)); color: #ffffff; border-radius: 12px; font-family: var(--font-sans, sans-serif);">
<option value="nudity">Nudity - depictions of nudity, porn, etc.</option>
<option value="malware">Malware - virus, trojan, spyware, etc.</option>
<option value="profanity">Profanity - hateful speech, etc.</option>
<option value="illegal">Illegal - content that may be illegal</option>
<option value="spam">Spam</option>
<option value="impersonation">Impersonation - pretending to be someone else</option>
<option value="other">Other</option>
</select>
</div>
<div style="margin-bottom: 20px;">
<label style="display: block; margin-bottom: 10px; color: var(--text-dim);">Additional Details
(optional):</label>
<textarea id="reportDetails" rows="4"
style="width: 100%; padding: 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border, var(--border)); color: #ffffff; border-radius: 12px; resize: vertical; font-family: var(--font-sans, sans-serif);"
placeholder="Provide any additional context for this report..."></textarea>
</div>
<div style="margin-bottom: 15px;">
<label style="display: flex; align-items: center; color: var(--text-dim); cursor: pointer;">
<input type="checkbox" id="reportMessage" style="margin-right: 8px;">
Report specific message (if unchecked, reports the user profile)
</label>
</div>
<div class="modal-actions">
<button class="icon-btn" onclick="nym.closeReportModal()">Cancel</button>
<button class="send-btn" onclick="nym.submitReport()">Submit Report</button>
</div>
</div>
</div>
</div>
<div class="container">
<aside class="sidebar" id="sidebar">
<div class="sidebar-header">
<pre class="logo-ascii" onclick="openNostrLogin()" title="Login with Nostr" style="cursor: pointer;">
##\ ##\
## | ## |
#######\ ##\ ##\ ######\####\ #######\ #######\ ######\ ######\
## __##\ ## | ## |## _## _##\ ## _____|## __##\ \____##\\_## _|
## | ## |## | ## |## / ## / ## |## / ## | ## | ####### | ## |
## | ## |## | ## |## | ## | ## |## | ## | ## |## __## | ## |##\
## | ## |\####### |## | ## | ## |\#######\ ## | ## |\####### | \#### |
\__| \__| \____## |\__| \__| \__| \_______|\__| \__| \_______| \____/
##\ ## |
\###### |
\______/
</pre>
<div class="nym-display" onclick="editNick()">
<div class="nym-label">Your Nym (click to edit)</div>
<div class="nym-identity">
<img id="sidebarAvatar" class="avatar"
src="https://robohash.org/default.png?set=set1&size=80x80" alt=""
style="width: 32px; height: 32px;">
<div class="nym-value" id="currentNym">anonymous</div>
</div>
</div>
<div class="status-indicator" onclick="openRelayStats()" style="cursor: pointer;" title="View network stats">
<span class="status-dot" id="statusDot"></span>
<span id="connectionStatus">Disconnected</span>
</div>
</div>
<div class="sidebar-actions">
<button class="icon-btn" onclick="nym.openShop(); nym.closeSidebar();">Flair</button>
<button class="icon-btn" onclick="showSettings(); nym.closeSidebar();">Settings</button>
<button class="icon-btn" onclick="showAbout(); nym.closeSidebar();">About</button>
<button class="icon-btn" onclick="signOut(); nym.closeSidebar();" title="Logout">Logout</button>
</div>
<div class="nav-section">
<div class="nav-title">
<span class="nav-title-text">Channels</span>
<span class="discover-icon" style="padding-right:30px;" onclick="nym.showGeohashExplorer()"
title="Explore geohash channels globally">
<svg viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" fill="none" stroke-width="2" />
<path
d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"
fill="none" stroke-width="2" />
</svg>
</span>
<span class="search-icon" onclick="toggleSearch('channelSearch')">
<svg viewBox="0 0 24 24">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35"></path>
</svg>
</span>
</div>
<div class="search-input-wrapper" id="channelSearchWrapper">
<input type="text" class="search-input" id="channelSearch" placeholder="Search channels..."
oninput="this.value = this.value.toLowerCase(); nym.handleChannelSearch(this.value)"
onkeyup="nym.handleChannelSearch(this.value)">
<span class="search-clear" onclick="clearSearch('channelSearch')">✕</span>
</div>
<div id="channelSearchResults"></div>
<div class="channel-list" id="channelList">
<div class="channel-item active" data-channel="nym" data-geohash="nym">
<span class="channel-name">#nym</span>
<div class="channel-badges">
<span class="unread-badge" style="display:none">0</span>
</div>
</div>
</div>
</div>
<div class="nav-section">
<div class="nav-title">
<span class="nav-title-text">Private Messages</span>
<span class="search-icon new-pm-btn" onclick="nym.openNewPMModal()" title="New message">
<svg viewBox="0 0 24 24">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</span>
<span class="search-icon" onclick="toggleSearch('pmSearch')" title="Search PMs">
<svg viewBox="0 0 24 24">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35"></path>
</svg>
</span>
</div>
<div class="search-input-wrapper" id="pmSearchWrapper">
<input type="text" class="search-input" id="pmSearch" placeholder="Search PMs..."
onkeyup="nym.filterPMs(this.value)">
<span class="search-clear" onclick="clearSearch('pmSearch')">✕</span>
</div>
<div class="pm-list" id="pmList"></div>
</div>
<div class="user-list" id="userList">
<div class="nav-title">
<span class="nav-title-text">Active Nyms</span>
<span class="search-icon" onclick="toggleSearch('userSearch')">
<svg viewBox="0 0 24 24">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35"></path>
</svg>
</span>
</div>
<div class="search-input-wrapper" id="userSearchWrapper">
<input type="text" class="search-input" id="userSearch" placeholder="Search users..."
onkeyup="nym.filterUsers(this.value)">
<span class="search-clear" onclick="clearSearch('userSearch')">✕</span>
</div>
<div id="userListContent"></div>
</div>
</aside>
<main class="main-content">
<header class="chat-header">
<div class="channel-info">
<div style="display: flex; align-items: center; gap: 10px;">
<div>
<div class="channel-title" id="currentChannel">#nym</div>
<div class="channel-meta" id="channelMeta">0 nyms in channel</div>
</div>
<button class="share-channel-btn" id="shareChannelBtn" onclick="nym.shareChannel()"
title="Share channel URL">
<svg viewBox="0 0 24 24" width="20" height="20">
<path
d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z" />
</svg>
</button>
</div>
</div>
<div class="header-actions">
<button class="icon-btn" onclick="nym.openShop()">Flair</button>
<button class="icon-btn" onclick="showSettings()">Settings</button>
<button class="icon-btn" onclick="showAbout()">About</button>
<button class="icon-btn" onclick="signOut()" title="Logout">Logout</button>
</div>
</header>
<div class="messages-container" id="messagesContainer"></div>
<button class="scroll-to-bottom-btn" id="scrollToBottomBtn" onclick="scrollToBottom()"
title="Scroll to bottom">
<svg viewBox="0 0 24 24" width="20" height="20">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<div class="input-container">
<div class="input-wrapper">
<div class="autocomplete-dropdown" id="autocompleteDropdown"></div>
<div class="emoji-autocomplete" id="emojiAutocomplete"></div>
<div class="command-palette" id="commandPalette"></div>
<div class="upload-progress" id="uploadProgress">
<div id="uploadProgressLabel">Uploading...</div>
<div class="progress-bar">
<div class="progress-fill" id="progressFill"></div>
</div>
</div>
<div class="quote-preview" id="quotePreview" style="display: none;">
<div class="quote-preview-bar"></div>
<div class="quote-preview-content">
<span class="quote-preview-author" id="quotePreviewAuthor"></span>
<span class="quote-preview-text" id="quotePreviewText"></span>
</div>
<button class="quote-preview-close" id="quotePreviewClose" title="Cancel reply">
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<textarea class="message-input" id="messageInput" placeholder="Type a message or / for commands..."
rows="1" disabled></textarea>
</div>
<div class="input-buttons">
<input type="file" class="file-input" id="fileInput" accept="image/*,video/mp4,video/webm,video/ogg,video/quicktime">
<button class="icon-btn input-btn" onclick="selectImage()" title="Upload Image/Video">
<svg viewBox="0 0 24 24">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
<circle cx="8.5" cy="8.5" r="1.5"></circle>
<polyline points="21 15 16 10 5 21"></polyline>
</svg>
</button>
<input type="file" class="file-input" id="p2pFileInput">
<button class="icon-btn input-btn" onclick="selectP2PFile()" title="Share File (P2P)">
<svg viewBox="0 0 24 24">
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path>
<polyline points="13 2 13 9 20 9"></polyline>
<line x1="12" y1="18" x2="12" y2="12"></line>
<polyline points="9 15 12 12 15 15"></polyline>
</svg>
</button>
<button class="icon-btn input-btn" onclick="nym.toggleEmojiPicker()" title="Emoji">
<svg viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<circle cx="9" cy="9" r="1"></circle>
<circle cx="15" cy="9" r="1"></circle>
</svg>
</button>
<button class="icon-btn input-btn" onclick="nym.toggleGifPicker()" title="GIF">
<svg viewBox="0 0 24 24">
<text x="12" y="16" text-anchor="middle" font-size="12" fill="currentColor">GIF</text>
</svg>
</button>
<button class="send-btn" id="sendBtn" disabled>SEND</button>
</div>
<div class="emoji-picker" id="emojiPicker"></div>
<div class="gif-picker" id="gifPicker"></div>
</div>
</main>
</div>
<!-- Shop Modal -->
<div class="shop-modal" id="shopModal">
<div class="shop-content">
<button class="shop-close" onclick="nym.closeShop()">✕</button>
<div class="shop-header">
<div class="shop-title">
<span>FLAIR<br />
<span style="font-size:12px;">Get addon packs to change the styling of your messages and
nickname that others will see across all channels (only in the Nymchat app).</span></span>
</div>
<div class="shop-recovery">
<input type="text" id="recoveryCodeInput" placeholder="Recovery code">
<button
onclick="nym.restorePurchases(document.getElementById('recoveryCodeInput').value)">Restore</button>
</div>
</div>
<div class="shop-tabs">
<button class="shop-tab active" onclick="nym.switchShopTab('styles', event)">Message Styles</button>
<button class="shop-tab" onclick="nym.switchShopTab('flair', event)">Nickname Flair</button>
<button class="shop-tab" onclick="nym.switchShopTab('special', event)">Special Items</button>
<button class="shop-tab" onclick="nym.switchShopTab('inventory', event)">My Items</button>
</div>
<div class="shop-body" id="shopBody">
<!-- Content will be dynamically generated -->
</div>
</div>
</div>
<!-- Image/Video Modal -->
<div class="image-modal" id="imageModal" onclick="closeImageModal()">
<span class="image-modal-close" onclick="closeImageModal()">×</span>
<img id="modalImage" src="" alt="Expanded image">
<video id="modalVideo" controls playsinline webkit-playsinline style="display:none; max-width:90%; max-height:90%; border:1px solid var(--glass-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);"></video>
</div>
<!-- Poll Modal -->
<div class="modal" id="pollModal">
<div class="modal-content" style="max-width: 480px;">
<button class="modal-close" onclick="closeModal('pollModal')">✕</button>
<div class="modal-header">Create Poll</div>
<div class="modal-body">
<div class="form-group">
<label class="form-label">Question</label>
<input type="text" class="form-input" id="pollQuestion" placeholder="Ask a question..." maxlength="280">
</div>
<div id="pollOptionsContainer">
<label class="form-label">Options</label>
<div class="poll-option-input-row">
<input type="text" class="form-input" placeholder="Option 1" maxlength="100" data-poll-option>
</div>
<div class="poll-option-input-row">
<input type="text" class="form-input" placeholder="Option 2" maxlength="100" data-poll-option>
</div>
</div>
<button class="poll-add-option-btn" id="pollAddOptionBtn" onclick="addPollOption()">+ Add option</button>
</div>
<div class="modal-actions">
<button class="icon-btn" onclick="closeModal('pollModal')">Cancel</button>
<button class="send-btn" onclick="submitPoll()">Create Poll</button>
</div>
</div>
</div>
<!-- P2P File Transfers Modal -->
<div class="modal" id="p2pTransfersModal">
<div class="modal-content p2p-modal-content">
<button class="modal-close" onclick="closeModal('p2pTransfersModal')">✕</button>
<div class="modal-header">P2P File Transfers</div>
<div class="modal-body">
<div class="p2p-transfers-list" id="p2pTransfersList">
<div class="p2p-empty-state">No active transfers</div>
</div>
</div>
<div class="modal-actions">
<button class="icon-btn" onclick="closeModal('p2pTransfersModal')">Close</button>
</div>
</div>
</div>
<!-- Developer Nsec Verification Modal -->
<div class="modal" id="devNsecModal">
<div class="modal-content">
<button class="modal-close" onclick="cancelDevNsec()">✕</button>
<div class="modal-header">Reserved Nickname</div>
<div class="modal-body">
<div class="form-group">
<label class="form-label">"Luxas" is reserved for the Nymchat developer.</label>
<div class="form-hint" style="margin-bottom: 10px;">Paste your nsec to verify your identity:</div>
<input type="password" class="form-input" id="devNsecInput" placeholder="nsec1..."
autocomplete="off">
<div id="devNsecError"
style="color: var(--danger); font-size: 12px; margin-top: 5px; display: none;">Invalid nsec -
does not match the developer pubkey.</div>
</div>
</div>
<div class="modal-actions">
<button class="icon-btn" onclick="cancelDevNsec()">Cancel</button>
<button class="send-btn" onclick="verifyDevNsec()">Verify</button>
</div>
</div>
</div>
<!-- Nostr Login Modal (easter egg via ASCII art click) -->
<div class="modal" id="nostrLoginModal">
<div class="modal-content" style="max-width: 440px;">
<button class="modal-close" onclick="closeModal('nostrLoginModal')">✕</button>
<div class="modal-header">Login with Nostr</div>
<div class="modal-body">
<div style="color: var(--text-dim); font-size: 13px; margin-bottom: 18px;">
Login with your Nostr identity to sync settings across devices.
</div>
<!-- Browser Extension Option (hidden for NymchatApp shell) -->
<div id="nostrLoginExtensionOption" style="margin-bottom: 14px;">
<button class="send-btn" id="nostrLoginExtensionBtn" onclick="nostrLoginWithExtension()" style="width: 100%; padding: 12px;">
Login with Browser Extension (NIP-07)
</button>
<div class="form-hint" style="margin-top: 6px;">Use Alby, nos2x, or another NIP-07 extension</div>
</div>
<div id="nostrLoginDivider" style="text-align: center; margin: 16px 0; color: var(--text-dim); font-size: 12px;">
or
</div>
<!-- Paste nsec Option -->
<div class="form-group" style="margin-bottom: 0;">
<label class="form-label">Paste your nsec</label>
<input type="password" class="form-input" id="nostrLoginNsecInput" placeholder="nsec1..." autocomplete="off">
<div id="nostrLoginError" style="color: var(--danger); font-size: 12px; margin-top: 5px; display: none;"></div>
<div class="form-hint">Your private key stays local and is never sent to any server</div>
</div>
</div>
<div class="modal-actions">
<button class="icon-btn" onclick="closeModal('nostrLoginModal')">Cancel</button>
<button class="send-btn" id="nostrLoginSubmitBtn" onclick="nostrLoginWithNsec()">Login</button>
</div>
</div>
</div>
<!-- Relay Stats Modal -->
<div class="modal" id="relayStatsModal">
<div class="modal-content relay-stats-content">
<button class="modal-close" onclick="closeModal('relayStatsModal')">✕</button>
<div class="modal-header">Network Stats</div>
<div class="modal-body" style="padding: 0;">
<!-- Summary Cards -->
<div class="relay-stats-cards">
<div class="relay-stat-card">
<div class="relay-stat-value" id="rsConnected">0</div>
<div class="relay-stat-label">Connected</div>
</div>
<div class="relay-stat-card">
<div class="relay-stat-value" id="rsLatency">--</div>
<div class="relay-stat-label">Avg Latency</div>
</div>
<div class="relay-stat-card">
<div class="relay-stat-value" id="rsEventsTotal">0</div>
<div class="relay-stat-label">Events</div>
</div>
<div class="relay-stat-card">
<div class="relay-stat-value" id="rsDataTransfer">0 B</div>
<div class="relay-stat-label">Data In</div>
</div>
</div>
<!-- Throughput Graph -->
<div class="relay-stats-section">
<div class="relay-stats-section-title">Throughput (events/sec)</div>
<div class="relay-stats-graph-wrap">
<canvas id="rsThroughputCanvas" width="440" height="100"></canvas>
</div>
</div>
<!-- Relay List -->
<div class="relay-stats-section">
<div class="relay-stats-section-title">Relays</div>
<div class="relay-stats-relay-list" id="rsRelayList"></div>
</div>
</div>
</div>
</div>
<!-- Nick Edit Modal -->
<div class="modal nick-edit-modal" id="nickEditModal">
<div class="modal-content">
<button class="modal-close" onclick="closeModal('nickEditModal')">✕</button>
<div class="modal-header">Change Nym's Details</div>
<div class="modal-body">
<div class="form-group">
<label class="form-label">Nickname</label>
<div style="display: flex; align-items: center; gap: 0;">
<input type="text" class="form-input" id="newNickInput" placeholder="Enter new nym"
maxlength="20" style="flex: 1; border-radius: 12px 0 0 12px;">
<span id="nickSuffixDisplay" class="nym-suffix nym-suffix-clickable"
style="padding: 8px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border, var(--border-color)); border-left: none; border-radius: 0 12px 12px 0; font-size: 14px; white-space: nowrap; cursor: pointer; position: relative;"
title="Click to view full pubkey"></span>
</div>
<div class="form-hint">Your ephemeral pseudonym nickname for this session</div>
<div class="pubkey-slideout" id="pubkeySlideout">
<div class="pubkey-slideout-label">Full Hex Pubkey</div>
<div class="pubkey-slideout-value" id="pubkeySlideoutValue"></div>
<button type="button" class="pubkey-slideout-copy" id="pubkeySlideoutCopy">Copy</button>
</div>
</div>
<div class="form-group">
<label class="form-label">Avatar</label>
<div class="avatar-upload-section">
<div class="avatar-preview-wrap">
<img id="nickEditAvatarPreview" class="avatar-preview"
src="https://robohash.org/default.png?set=set1&size=80x80" alt="Avatar">
<div class="avatar-upload-spinner" id="nickEditAvatarSpinner"></div>
</div>
<div class="avatar-upload-controls">
<input type="file" id="nickEditAvatarInput" accept="image/*" style="display: none"
onchange="handleNickEditAvatarSelect(event)">
<div style="display: flex; gap: 6px; flex-wrap: wrap;">
<button type="button" class="avatar-upload-btn" id="nickEditAvatarUploadBtn"
onclick="triggerNickEditAvatarUpload()">Change photo</button>
<button type="button" class="avatar-remove-btn" id="nickEditAvatarRemoveBtn"
style="display: none;" onclick="removeNickEditAvatar()">Remove</button>
</div>
<div class="avatar-upload-status" id="nickEditAvatarStatus"></div>
</div>
</div>
</div>
<div class="form-group">
<label class="form-label">Banner</label>
<div class="banner-upload-section">
<div class="banner-preview-wrap" id="nickEditBannerPreviewWrap">
<img id="nickEditBannerPreview" class="banner-preview" src="" alt="Banner"
style="display: none;">
<div class="banner-placeholder" id="nickEditBannerPlaceholder">No banner set</div>
<div class="avatar-upload-spinner" id="nickEditBannerSpinner"></div>
</div>
<div class="avatar-upload-controls">
<input type="file" id="nickEditBannerInput" accept="image/*" style="display: none"
onchange="handleNickEditBannerSelect(event)">
<div style="display: flex; gap: 6px; flex-wrap: wrap;">
<button type="button" class="avatar-upload-btn" id="nickEditBannerUploadBtn"
onclick="document.getElementById('nickEditBannerInput').click()">Choose banner</button>
<button type="button" class="avatar-remove-btn" id="nickEditBannerRemoveBtn"
style="display: none;" onclick="removeNickEditBanner()">Remove</button>
</div>
<div class="avatar-upload-status" id="nickEditBannerStatus"></div>
</div>
</div>
</div>
</div>
<div class="modal-actions">
<button class="icon-btn" onclick="randomizeNick()">Randomize</button>
<button class="icon-btn" onclick="closeModal('nickEditModal')">Cancel</button>
<button class="send-btn" onclick="changeNick()">Change</button>
</div>
</div>
</div>
<!-- Initial Setup Modal -->
<div class="modal active" id="setupModal">
<div class="modal-content setup-modal-content">
<div class="modal-header setup-modal-header">
<pre class="logo-ascii setup-logo" onclick="openNostrLogin()" title="Login with Nostr" style="cursor: pointer;">
##\ ##\
## | ## |
#######\ ##\ ##\ ######\####\ #######\ #######\ ######\ ######\
## __##\ ## | ## |## _## _##\ ## _____|## __##\ \____##\\_## _|
## | ## |## | ## |## / ## / ## |## / ## | ## | ####### | ## |
## | ## |## | ## |## | ## | ## |## | ## | ## |## __## | ## |##\
## | ## |\####### |## | ## | ## |\#######\ ## | ## |\####### | \#### |
\__| \__| \____## |\__| \__| \__| \_______|\__| \__| \_______| \____/
##\ ## |
\###### |
\______/
</pre>
</div>
<div class="modal-body">
<div class="form-group" id="nymGroup">
<label class="form-label">Choose Your Nickname (optional)</label>
<input type="text" class="form-input" id="nymInput" placeholder="Leave empty for random nick"
maxlength="20">
<div class="form-hint" id="nymHint">Your ephemeral pseudonym nickname for this session</div>
<label class="form-label" style="margin-top: 15px;">Choose Your Avatar (optional)</label>
<div class="avatar-upload-section">
<div class="avatar-preview-wrap">
<img id="setupAvatarPreview" class="avatar-preview"
src="https://robohash.org/default.png?set=set1&size=80x80" alt="Avatar">
<div class="avatar-upload-spinner" id="setupAvatarSpinner"></div>
</div>
<div class="avatar-upload-controls">
<input type="file" id="setupAvatarInput" accept="image/*" style="display: none"
onchange="handleSetupAvatarSelect(event)">
<div style="display: flex; gap: 6px; flex-wrap: wrap;">
<button type="button" class="avatar-upload-btn" id="setupAvatarUploadBtn"
onclick="triggerSetupAvatarUpload()">Choose photo</button>
<button type="button" class="avatar-remove-btn" id="setupAvatarRemoveBtn"
style="display: none;" onclick="removeSetupAvatar()">Remove</button>
</div>
<div class="avatar-upload-status" id="setupAvatarStatus"></div>
</div>
</div>
<div id="autoEphemeralGroup" style="margin-top: 15px;">
<label style="display: flex; align-items: center; cursor: pointer; font-size: 14px;">
<input type="checkbox" id="autoEphemeralCheckbox" checked
style="margin-right: 10px; width: auto; cursor: pointer;">
<span style="color: var(--text-dim);">Automatically assign new ephemeral nym on each session
restart to skip the welcome screen</span>
</label>
</div>
</div>
<div
style="color: var(--warning); font-size: 12px; margin-top: 15px; padding: 12px 14px; border: 1px solid rgba(255, 255, 0, 0.2); border-radius: 12px; background: rgba(255, 255, 0, 0.04);">
NOTE: Channels are bridged with Bitchat geohash. Messages are
public and temporary; sent across the Nostr network. Your nym exists
only for this session and will be burned.
</div>
</div>
<div class="modal-actions" style="margin-bottom:20px;">
<button class="send-btn" id="enterNymBtn" onclick="initializeNym()">Enter</button>
</div>
<span style="color: var(--text-dim);">By entering, you agree to our <a href="static/tos.html"
target="_blank" rel="noopener" style="color: var(--secondary)">Terms of Service</a> and <a
href="static/pp.html" target="_blank" rel="noopener" style="color: var(--secondary)">Privacy
Policy</a>.</span>
</div>
</div>
<!-- Settings Modal -->
<div class="modal" id="settingsModal">
<div class="modal-content">
<button class="modal-close" onclick="closeModal('settingsModal')">✕</button>
<div class="modal-header">Settings</div>
<div class="modal-body">
<div class="form-group">
<label class="form-label">Appearance</label>
<div class="color-mode-group" id="colorModeGroup">
<button type="button" class="color-mode-btn" data-mode="light">Light</button>
<button type="button" class="color-mode-btn active" data-mode="auto">Auto</button>
<button type="button" class="color-mode-btn" data-mode="dark">Dark</button>
</div>
<div class="form-hint">Auto matches your system preference</div>
</div>
<div class="form-group">
<label class="form-label">Theme</label>
<select class="form-select" id="themeSelect">
<option value="bitchat">Bitchat (Multicolor)</option>
<option value="matrix">Matrix Green</option>
<option value="amber">Amber Terminal</option>
<option value="cyber">Cyberpunk</option>
<option value="hacker">Hacker Blue</option>
<option value="ghost">Ghost (B&W)</option>
</select>
</div>
<div class="form-group">
<label class="form-label">Chat Wallpaper</label>
<div class="wallpaper-grid" id="wallpaperGrid">
<div class="wallpaper-option selected" data-wallpaper="none" onclick="selectWallpaper('none')">
<div class="wallpaper-preview wallpaper-none">
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor"
stroke-width="2">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</div>
<span class="wallpaper-label">None</span>
</div>
<div class="wallpaper-option" data-wallpaper="geometric" onclick="selectWallpaper('geometric')">
<div class="wallpaper-preview wallpaper-geometric"></div>
<span class="wallpaper-label">Geometric</span>
</div>
<div class="wallpaper-option" data-wallpaper="circuit" onclick="selectWallpaper('circuit')">
<div class="wallpaper-preview wallpaper-circuit"></div>
<span class="wallpaper-label">Circuit</span>
</div>
<div class="wallpaper-option" data-wallpaper="dots" onclick="selectWallpaper('dots')">
<div class="wallpaper-preview wallpaper-dots"></div>
<span class="wallpaper-label">Dots</span>
</div>
<div class="wallpaper-option" data-wallpaper="waves" onclick="selectWallpaper('waves')">
<div class="wallpaper-preview wallpaper-waves"></div>
<span class="wallpaper-label">Waves</span>
</div>
<div class="wallpaper-option" data-wallpaper="topography"
onclick="selectWallpaper('topography')">
<div class="wallpaper-preview wallpaper-topography"></div>
<span class="wallpaper-label">Topography</span>
</div>
<div class="wallpaper-option" data-wallpaper="hexagons" onclick="selectWallpaper('hexagons')">
<div class="wallpaper-preview wallpaper-hexagons"></div>
<span class="wallpaper-label">Hexagons</span>
</div>
<div class="wallpaper-option" data-wallpaper="diamonds" onclick="selectWallpaper('diamonds')">
<div class="wallpaper-preview wallpaper-diamonds"></div>
<span class="wallpaper-label">Diamonds</span>
</div>
<div class="wallpaper-option" data-wallpaper="custom" onclick="triggerWallpaperUpload()"
id="customWallpaperOption">
<div class="wallpaper-preview wallpaper-custom" id="customWallpaperPreview">
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor"
stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="17 8 12 3 7 8"></polyline>
<line x1="12" y1="3" x2="12" y2="15"></line>
</svg>
</div>
<span class="wallpaper-label">Upload</span>
</div>
</div>
<input type="file" id="wallpaperFileInput" accept="image/*" style="display: none"
onchange="handleWallpaperUpload(event)">
<div class="form-hint">Choose a background pattern or upload your own image (min 1920x1080)</div>
</div>
<div class="form-group">
<label class="form-label">Message Layout</label>
<div class="layout-grid" id="layoutGrid">
<div class="layout-option selected" data-layout="irc" onclick="selectMessageLayout('irc')">
<div class="layout-preview layout-preview-irc">
<div class="layout-line"><span class="lp-time">12:01</span> <span class="lp-nick"><alice></span> <span class="lp-msg">hey there!</span></div>
<div class="layout-line"><span class="lp-time">12:02</span> <span class="lp-nick lp-self"><you></span> <span class="lp-msg">hello!</span></div>
<div class="layout-line"><span class="lp-time">12:03</span> <span class="lp-nick"><bob></span> <span class="lp-msg">what's up?</span></div>
</div>
<span class="layout-label">IRC (Default)</span>
</div>
<div class="layout-option" data-layout="bubbles" onclick="selectMessageLayout('bubbles')">
<div class="layout-preview layout-preview-bubbles">
<div class="lp-bubble lp-bubble-other"><span class="lp-bubble-nick">alice</span><span class="lp-bubble-text">hey there!</span></div>
<div class="lp-bubble lp-bubble-self"><span class="lp-bubble-text">hello!</span></div>
<div class="lp-bubble lp-bubble-other"><span class="lp-bubble-nick">bob</span><span class="lp-bubble-text">what's up?</span></div>
</div>
<span class="layout-label">Bubbles</span>
</div>
</div>
<div class="form-hint">Choose between classic IRC-style or modern chat bubbles</div>
</div>
<div class="form-group">
<label class="form-label">Text Size</label>
<div style="display: flex; align-items: center; gap: 12px;">
<span style="font-size: 11px; color: var(--text-dim);">A</span>
<input type="range" class="form-range" id="textSizeSlider" min="12" max="28" value="15" step="1"
style="flex: 1; accent-color: var(--primary);"
oninput="previewTextSize(this.value)">
<span style="font-size: 22px; color: var(--text-dim);">A</span>
<span id="textSizeValue" style="font-size: 12px; color: var(--text-dim); min-width: 32px; text-align: center;">15px</span>
<button class="btn-small" onclick="resetTextSize()" style="font-size: 11px; padding: 4px 10px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05); color: var(--text-dim); border-radius: var(--radius-xs); cursor: pointer;">Reset</button>
</div>
<div class="form-hint">Adjust the size of all text across the app</div>
</div>
<div class="form-group">
<label class="form-label">Sort Geohash Channels by Proximity</label>
<select class="form-select" id="proximitySelect">
<option value="false">Disabled</option>
<option value="true">Enabled (requires location access)</option>
</select>
<div class="form-hint">Sort geohash channels by distance from your location</div>
</div>
<div class="form-group">
<label class="form-label">⚡ Bitcoin Lightning Address</label>
<input type="text" class="form-input" id="lightningAddressInput"
placeholder="your@lightning-address.com">
<div class="form-hint">Your Bitcoin Lightning address for receiving zaps</div>
</div>
<div class="form-group">
<label class="form-label">Proof of Work Difficulty:</label>
<select class="form-select" id="powDifficultySelect">
<option value="0" selected>Disabled</option>
<option value="8">Very Low (8 bits)</option>
<option value="12">Low (12 bits)</option>
<option value="16">Medium (16 bits)</option>
<option value="20">High (20 bits)</option>
<option value="24">Very High (24 bits)</option>
</select>
<div class="form-hint">Enable for anti-spam to require messages have a minimum PoW</div>
</div>
<div class="form-group">
<label class="form-label">Disappearing PM (forward secrecy)</label>
<select class="form-select" id="dmForwardSecrecySelect">
<option value="false">Disabled</option>
<option value="true">Enabled</option>
</select>
<div class="form-hint">
When enabled, your private messages include an "expiration" tag (NIP‑40) so relays/clients can
delete them after the period chosen when enabled.
</div>
</div>
<div class="form-group" id="dmTTLGroup">
<label class="form-label">Disappear After</label>
<select class="form-select" id="dmTTLSelect">
<option value="3600">1 hour</option>
<option value="21600">6 hours</option>
<option value="86400" selected>1 day</option>
<option value="259200">3 days</option>
<option value="604800">7 days</option>
</select>
<div class="form-hint">This sets the "expiration" timestamp on each outgoing gift‑wrapped PM.</div>
</div>
<div class="form-group">
<label class="form-label">Read Receipts</label>
<select class="form-select" id="readReceiptsSelect">
<option value="true">Enabled</option>
<option value="false">Disabled</option>
</select>
<div class="form-hint">When enabled, senders will see when you've read their private messages (✓✓).
</div>
</div>
<div class="form-group">
<label class="form-label">Notification Sound</label>
<select class="form-select" id="soundSelect">
<option value="beep">Classic Beep</option>
<option value="icq">ICQ Uh-Oh</option>
<option value="msn">MSN Alert</option>
<option value="none">Silent</option>
</select>
</div>