优化渲染逻辑

This commit is contained in:
CN-JS-HuiBai
2026-04-04 19:22:48 +08:00
parent f73f9fa0c4
commit 824ead4bee
2 changed files with 14 additions and 0 deletions

View File

@@ -129,6 +129,11 @@
fetchMetrics();
fetchNetworkHistory();
loadSiteSettings();
// Initial icon check based on early head script
const currentTheme = document.documentElement.classList.contains('light-theme') ? 'light' : 'dark';
updateThemeIcons(currentTheme);
setInterval(fetchMetrics, REFRESH_INTERVAL);
setInterval(fetchNetworkHistory, NETWORK_HISTORY_INTERVAL);
}