Add files via upload

This commit is contained in:
公明
2026-06-09 20:44:41 +08:00
committed by GitHub
parent 6bacac2e6a
commit 9e0525abc1
6 changed files with 322 additions and 109 deletions
+9 -5
View File
@@ -61,21 +61,25 @@ window.syncC2NavOnceFromServer = async function syncC2NavOnceFromServer() {
}
};
// 根据 C2 是否启用显示主导航 C2 入口与仪表盘 C2 块(与 /api/config 的 c2.enabled 一致)
// 根据 C2 是否启用显示主导航 C2 入口与仪表盘接入概览中的 C2 块(与 /api/config 的 c2.enabled 一致)
function syncC2NavFromConfig(cfg) {
const on = cfg && cfg.c2 && cfg.c2.enabled !== false;
const nav = document.getElementById('nav-c2');
if (nav) {
nav.style.display = on ? '' : 'none';
}
const dash = document.getElementById('dashboard-section-c2');
if (dash) {
const c2Tab = document.getElementById('dashboard-access-tab-c2');
if (c2Tab) {
if (!on) {
dash.hidden = true;
c2Tab.hidden = true;
} else {
dash.removeAttribute('hidden');
c2Tab.removeAttribute('hidden');
}
}
window.__c2Enabled = on;
if (typeof syncDashboardAccessTabs === 'function') {
syncDashboardAccessTabs();
}
}
// 切换设置分类