From c70e17b9d0f998480480a8a1b613771d20da8bb1 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 18 Jan 2026 23:44:54 -0500 Subject: [PATCH] Add DM controls to profile modal --- components/profile-modal.html | 53 ++++++++++++++++++++++++++++++ js/ui/profileModalController.js | 57 +++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/components/profile-modal.html b/components/profile-modal.html index 997ef0c6..5b19d656 100644 --- a/components/profile-modal.html +++ b/components/profile-modal.html @@ -1012,6 +1012,59 @@

View encrypted conversations sent with NIP-04 or NIP-44. bitvid keeps message data on this device only.

+
+
+
+

Direct message actions

+

+ Start a new DM or jump to relay preferences before you send. +

+
+ +
+
+
+

Preferred DM relay

+

+ Select a relay to prioritize encrypted message delivery. +

+
+ +
+
+
+

Privacy mode (coming soon)

+

+ Pause inbound DM sync and clear cached previews on this device. +

+
+ +
+
{ + this.handleSendDmRequest(); + }); + } + + if (this.profileMessagesOpenRelaysButton instanceof HTMLElement) { + this.profileMessagesOpenRelaysButton.addEventListener("click", () => { + this.handleOpenDmRelaysRequest(); + }); + } + + if (this.profileMessagesPrivacyToggle instanceof HTMLElement) { + this.profileMessagesPrivacyToggle.addEventListener("change", (event) => { + const toggle = event.currentTarget; + if (toggle instanceof HTMLInputElement) { + this.handlePrivacyToggle(toggle.checked); + } + }); + } + if (this.profileMessageSendButton instanceof HTMLElement) { this.profileMessageSendButton.addEventListener("click", () => { void this.handleSendProfileMessage();