From 2a96afa4ab8df90415578a9248a3e28e31b2d6eb Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Tue, 3 Feb 2026 13:35:27 +0800 Subject: [PATCH] fix bug --- public/index.html | 6 +++--- src/app.js | 8 ++++---- src/i18n.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/index.html b/public/index.html index f86eeb1..ad6e9be 100644 --- a/public/index.html +++ b/public/index.html @@ -1,5 +1,5 @@ - + @@ -143,7 +143,7 @@ - GitHub + GitHub @@ -260,7 +260,7 @@
Terms - GitHub + GitHub
diff --git a/src/app.js b/src/app.js index 0680169..4e65b6c 100644 --- a/src/app.js +++ b/src/app.js @@ -90,10 +90,10 @@ function setupThemeToggle() { // Load from storage const savedTheme = localStorage.getItem('theme'); - if (savedTheme === 'light') { - html.classList.remove('dark'); - html.classList.add('light'); - iconPath.setAttribute('d', moonPath); + if (savedTheme === 'dark') { + html.classList.remove('light'); + html.classList.add('dark'); + iconPath.setAttribute('d', sunPath); } } diff --git a/src/i18n.js b/src/i18n.js index 4667abb..365e825 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -1,5 +1,5 @@ const i18n = { - locale: localStorage.getItem('locale') || (navigator.language.startsWith('zh') ? 'zh-CN' : 'en-US'), + locale: localStorage.getItem('locale') || 'zh-CN', translations: {}, async init() {