From 824ead4bee8abb9747befc161c705d17915a657c Mon Sep 17 00:00:00 2001 From: CN-JS-HuiBai Date: Sat, 4 Apr 2026 19:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B8=B2=E6=9F=93=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 9 +++++++++ public/js/app.js | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/public/index.html b/public/index.html index 71a3834..2710de2 100644 --- a/public/index.html +++ b/public/index.html @@ -9,6 +9,15 @@ + diff --git a/public/js/app.js b/public/js/app.js index 3d5b17a..3da1588 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -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); }