mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-02 19:02:28 +00:00
feat: move moderation and link preview settings to new Safety tab in Profile modal
- Added 'Safety' tab to `components/profile-modal.html`, positioned before 'Blocked' - Moved `profileModerationSettings` and `profileLinkPreviewSettings` panels to the new tab - Updated `ProfileModalController.js` to manage the new tab and initialize settings when selected - Renamed 'Safety & Moderation' panel header to 'Safety'
This commit is contained in:
1 parent
32ae80019a
commit
383a77d6da
2 files changed
+199
-176
No files matched your search
@@ -1225,6 +1225,7 @@ export class ProfileModalController {
|
||||
messages: null,
|
||||
history: null,
|
||||
admin: null,
|
||||
safety: null,
|
||||
};
|
||||
this.panes = {
|
||||
account: null,
|
||||
@@ -1238,6 +1239,7 @@ export class ProfileModalController {
|
||||
messages: null,
|
||||
history: null,
|
||||
admin: null,
|
||||
safety: null,
|
||||
};
|
||||
this.relayList = null;
|
||||
this.relayInput = null;
|
||||
@@ -1512,6 +1514,7 @@ export class ProfileModalController {
|
||||
this.navButtons.history =
|
||||
document.getElementById("profileNavHistory") || null;
|
||||
this.navButtons.admin = document.getElementById("profileNavAdmin") || null;
|
||||
this.navButtons.safety = document.getElementById("profileNavSafety") || null;
|
||||
|
||||
this.profileEditBtn = document.getElementById("profileEditBtn") || null;
|
||||
this.profileEditBackBtn = document.getElementById("profileEditBackBtn") || null;
|
||||
@@ -1529,6 +1532,7 @@ export class ProfileModalController {
|
||||
this.panes.messages = document.getElementById("profilePaneMessages") || null;
|
||||
this.panes.history = document.getElementById("profilePaneHistory") || null;
|
||||
this.panes.admin = document.getElementById("profilePaneAdmin") || null;
|
||||
this.panes.safety = document.getElementById("profilePaneSafety") || null;
|
||||
|
||||
this.relayList = document.getElementById("relayList") || null;
|
||||
this.relayInput = document.getElementById("relayInput") || null;
|
||||
@@ -6745,6 +6749,9 @@ export class ProfileModalController {
|
||||
void this.populateSubscriptionsList();
|
||||
} else if (target === "blocked") {
|
||||
this.populateBlockedList();
|
||||
} else if (target === "safety") {
|
||||
this.refreshModerationSettingsUi();
|
||||
this.syncLinkPreviewSettingsUi();
|
||||
}
|
||||
|
||||
this.callbacks.onSelectPane(target, { controller: this });
|
||||
|
||||
Reference in new issue
Block a user