Update app.js

This commit is contained in:
Furrium Network authored and GitHub committed 2026-08-10 23:01:19 +08:00
1 parent 706286eb1c
commit 6f58aa4fdc
1 file changed
+13 -13
+13 -13
View File
@@ -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.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);
});
// ============================================================ // ============================================================
// 🚀 初始化 // 🚀 初始化
// ============================================================ // ============================================================