mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-07 05:13:01 +00:00
Merge pull request #1421 from PR0M3TH3AN/dm-ui-refactor-privacy-zaps-2998709173100552567
Refactor DM UI: Move privacy settings, unify Zaps interface, and adjust layout
This commit is contained in:
6 files changed
+266
-212
No files matched your search
@@ -4425,6 +4425,8 @@ export class ProfileModalController {
|
||||
container.innerHTML = "";
|
||||
|
||||
try {
|
||||
const dmPrivacySettings = this.getDmPrivacySettingsSnapshot();
|
||||
|
||||
this.dmAppShell = new AppShell({
|
||||
document,
|
||||
conversations,
|
||||
@@ -4433,8 +4435,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);
|
||||
},
|
||||
@@ -4447,6 +4453,12 @@ export class ProfileModalController {
|
||||
onMarkAllRead: () => {
|
||||
void this.handleDmMarkAllConversationsRead();
|
||||
},
|
||||
onToggleReadReceipts: (enabled) => {
|
||||
this.handleReadReceiptsToggle(enabled);
|
||||
},
|
||||
onToggleTypingIndicators: (enabled) => {
|
||||
this.handleTypingIndicatorsToggle(enabled);
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
this.dmAppShell = null;
|
||||
@@ -5164,23 +5176,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