mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Fix annoying DM relay warning and clarify settings UI
- Throttle the "Privacy warning: direct messages are using your default relays..." message so it only appears once per session/identity change. - Rename "DM Relay Hints" to "NIP-17 Relay List" in the DM Settings modal to match the warning message and reduce user confusion. - Add regression test for the warning throttling logic. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
45d4de73b6
commit
d45b115f07
3 files changed
+35
-5
No files matched your search
@@ -62,16 +62,16 @@
|
||||
<!-- Relay Hints -->
|
||||
<section class="space-y-4">
|
||||
<div class="space-y-1">
|
||||
<h3 class="text-base font-semibold text-text">DM Relay Hints</h3>
|
||||
<h3 class="text-base font-semibold text-text">NIP-17 Relay List</h3>
|
||||
<p class="text-sm text-muted">
|
||||
Publish relay hints for direct messages as <span class="font-medium">kind:10050</span> events. Use WSS-only relay URLs so encrypted DM delivery stays secure.
|
||||
Publish your NIP-17 relay list for direct messages as <span class="font-medium">kind:10050</span> events. Use WSS-only relay URLs so encrypted DM delivery stays secure.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="card p-5 space-y-5">
|
||||
<div class="flex flex-col gap-3 sm:flex-row sm:items-end">
|
||||
<label class="flex-1 text-sm text-muted-strong" for="dmSettingsRelayInput">
|
||||
<span class="mb-2 block font-medium">Add a DM relay</span>
|
||||
<span class="mb-2 block font-medium">Add a NIP-17 relay</span>
|
||||
<input
|
||||
id="dmSettingsRelayInput"
|
||||
type="text"
|
||||
@@ -91,13 +91,13 @@
|
||||
<span class="text-xs font-medium text-muted-strong uppercase tracking-wider">Your list</span>
|
||||
</div>
|
||||
<ul id="dmSettingsRelayList" class="grid-stack space-y-2" data-orientation="vertical"></ul>
|
||||
<p id="dmSettingsRelayEmpty" class="text-sm text-muted italic hidden">No DM relay hints configured.</p>
|
||||
<p id="dmSettingsRelayEmpty" class="text-sm text-muted italic hidden">No NIP-17 relays configured.</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap items-center justify-between gap-3 pt-2 border-t border-border/40">
|
||||
<span id="dmSettingsRelayStatus" class="text-xs text-muted" role="status" aria-live="polite"></span>
|
||||
<button id="dmSettingsRelayPublishBtn" type="button" class="btn-ghost focus-ring text-xs">
|
||||
Publish relay hints
|
||||
Publish relay list
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user