Update app.js
This commit is contained in:
1 parent
706286eb1c
commit
6f58aa4fdc
1 file changed
+13
-13
@@ -806,6 +806,19 @@ async function renderSettingsPage(tab = 'profile') {
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 设置页面侧边栏切换
|
||||
// ============================================================
|
||||
|
||||
document.querySelector('.settings-nav')?.addEventListener('click', function(e) {
|
||||
const tabLink = e.target.closest('.settings-nav-item');
|
||||
if (!tabLink) return;
|
||||
e.preventDefault();
|
||||
const tab = tabLink.dataset.settingsTab;
|
||||
if (!tab) return;
|
||||
renderSettingsPage(tab);
|
||||
});
|
||||
|
||||
// ============================================================
|
||||
// ✏️ 编辑帖子模态框
|
||||
// ============================================================
|
||||
@@ -971,19 +984,6 @@ function openImageViewer(imageUrl) {
|
||||
document.head.appendChild(style);
|
||||
})();
|
||||
|
||||
// ============================================================
|
||||
// 设置页面侧边栏切换
|
||||
// ============================================================
|
||||
|
||||
document.querySelector('.settings-nav')?.addEventListener('click', function(e) {
|
||||
const tabLink = e.target.closest('.settings-nav-item');
|
||||
if (!tabLink) return;
|
||||
e.preventDefault();
|
||||
const tab = tabLink.dataset.settingsTab;
|
||||
if (!tab) return;
|
||||
renderSettingsPage(tab);
|
||||
});
|
||||
|
||||
// ============================================================
|
||||
// 🚀 初始化
|
||||
// ============================================================
|
||||
|
||||
Reference in new issue
Block a user