mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Refactor DM UI: Move privacy settings, unify Zaps interface, and adjust layout
This commit is contained in:
1 parent
f4cff7313a
commit
07abc8516f
6 files changed
+266
-212
No files matched your search
@@ -4421,6 +4421,8 @@ export class ProfileModalController {
|
||||
container.innerHTML = "";
|
||||
|
||||
try {
|
||||
const dmPrivacySettings = this.getDmPrivacySettingsSnapshot();
|
||||
|
||||
this.dmAppShell = new AppShell({
|
||||
document,
|
||||
conversations,
|
||||
@@ -4429,8 +4431,12 @@ export class ProfileModalController {
|
||||
messages: timeline,
|
||||
threadState,
|
||||
privacyMode,
|
||||
dmPrivacySettings,
|
||||
composerState: this.dmComposerState || "idle",
|
||||
notifications: [],
|
||||
zapConfig: {
|
||||
signer: this.services.nostrClient,
|
||||
},
|
||||
onSelectConversation: (conversation) => {
|
||||
void this.handleDmConversationSelect(conversation);
|
||||
},
|
||||
@@ -4443,6 +4449,12 @@ export class ProfileModalController {
|
||||
onMarkAllRead: () => {
|
||||
void this.handleDmMarkAllConversationsRead();
|
||||
},
|
||||
onToggleReadReceipts: (enabled) => {
|
||||
this.handleReadReceiptsToggle(enabled);
|
||||
},
|
||||
onToggleTypingIndicators: (enabled) => {
|
||||
this.handleTypingIndicatorsToggle(enabled);
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
this.dmAppShell = null;
|
||||
@@ -5160,23 +5172,7 @@ export class ProfileModalController {
|
||||
});
|
||||
}
|
||||
|
||||
if (this.profileMessagesReadReceiptsToggle instanceof HTMLElement) {
|
||||
this.profileMessagesReadReceiptsToggle.addEventListener("change", (event) => {
|
||||
const toggle = event.currentTarget;
|
||||
if (toggle instanceof HTMLInputElement) {
|
||||
this.handleReadReceiptsToggle(toggle.checked);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (this.profileMessagesTypingToggle instanceof HTMLElement) {
|
||||
this.profileMessagesTypingToggle.addEventListener("change", (event) => {
|
||||
const toggle = event.currentTarget;
|
||||
if (toggle instanceof HTMLInputElement) {
|
||||
this.handleTypingIndicatorsToggle(toggle.checked);
|
||||
}
|
||||
});
|
||||
}
|
||||
// Legacy toggles removed - handled by DMPrivacySettings in AppShell
|
||||
|
||||
if (this.profileLinkPreviewAutoToggle instanceof HTMLElement) {
|
||||
this.profileLinkPreviewAutoToggle.addEventListener("change", (event) => {
|
||||
|
||||
Reference in new issue
Block a user