Reload active tab content on language switch for wiki and users

This commit is contained in:
Kato
2026-09-03 21:34:10 +00:00
parent 3485034152
commit 77e6d921d6
+7
View File
@@ -54,6 +54,13 @@ document.querySelectorAll('.lang-btn').forEach(btn => {
document.body.dataset.lang = lang;
document.querySelectorAll('.lang-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
// Reload active tab content with new language
const activeTab = document.querySelector('.notebook .tab.active');
if (activeTab) {
const tabName = activeTab.dataset.tab;
if (tabName === 'users') loadUsers();
if (tabName === 'wiki') loadWiki();
}
});
});