mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-04 20:02:26 +00:00
Add DM privacy indicators and relay hint publishing
This commit is contained in:
1 parent
e1d58a2530
commit
924ed9b482
9 files changed
+597
-8
No files matched your search
@@ -1055,6 +1055,7 @@
|
||||
<label
|
||||
for="profileMessagesPrivacyToggle"
|
||||
class="inline-flex items-center gap-2 text-xs font-medium text-muted-strong"
|
||||
title="NIP-17 gift-wraps your DM so relays only see the wrapper and relay hints, not the plaintext. It requires the recipient to publish kind 10050 relay hints."
|
||||
>
|
||||
<input
|
||||
id="profileMessagesPrivacyToggle"
|
||||
@@ -1065,6 +1066,59 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card space-y-4 p-4">
|
||||
<div class="flex flex-wrap items-start justify-between gap-3">
|
||||
<div class="space-y-1">
|
||||
<h3 class="text-sm font-semibold text-text">Your DM relay hints</h3>
|
||||
<p class="text-xs text-muted">
|
||||
Publish kind 10050 so contacts can deliver NIP-17 gift-wrapped DMs to you.
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
id="profileMessagesRelayPublish"
|
||||
type="button"
|
||||
class="btn focus-ring inline-flex items-center gap-2"
|
||||
data-size="sm"
|
||||
title="Publishing kind 10050 makes your DM relay list public so others can deliver NIP-17 messages."
|
||||
>
|
||||
Publish relays
|
||||
</button>
|
||||
</div>
|
||||
<label class="flex-1 text-sm text-muted-strong" for="profileMessagesRelayInput">
|
||||
<span class="mb-2 block font-medium">Add a DM relay</span>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<input
|
||||
id="profileMessagesRelayInput"
|
||||
type="url"
|
||||
inputmode="url"
|
||||
autocomplete="off"
|
||||
class="input flex-1"
|
||||
placeholder="wss://relay.example.com"
|
||||
/>
|
||||
<button
|
||||
id="profileMessagesRelayAdd"
|
||||
type="button"
|
||||
class="btn-ghost focus-ring inline-flex items-center gap-2"
|
||||
data-size="sm"
|
||||
>
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
</label>
|
||||
<ul
|
||||
id="profileMessagesRelayList"
|
||||
class="grid-stack"
|
||||
data-orientation="vertical"
|
||||
aria-live="polite"
|
||||
aria-label="Your DM relay hints"
|
||||
></ul>
|
||||
<p
|
||||
id="profileMessagesRelayStatus"
|
||||
class="text-xs text-muted"
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
></p>
|
||||
</div>
|
||||
<div
|
||||
id="profileMessagesStatus"
|
||||
class="sr-only"
|
||||
@@ -1137,6 +1191,13 @@
|
||||
>
|
||||
Sign in to send messages.
|
||||
</p>
|
||||
<p
|
||||
id="profileMessagesPrivacyMode"
|
||||
class="text-xs text-muted"
|
||||
title="NIP-04 sends a direct encrypted DM; NIP-17 gift-wraps messages to reduce metadata exposure but relies on relay hints."
|
||||
>
|
||||
Privacy: NIP-04
|
||||
</p>
|
||||
<button
|
||||
id="profileMessageSendBtn"
|
||||
type="button"
|
||||
|
||||
Reference in new issue
Block a user