From d954dd2abce95fb93c7b0bdda05c8e12488bbcee Mon Sep 17 00:00:00 2001 From: shinya Date: Tue, 29 Jul 2025 18:35:50 +0800 Subject: [PATCH] feat: set pwa color --- VERSION.txt | 2 +- src/components/ThemeToggle.tsx | 5 +++++ src/lib/version.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index a951fd0..dadaf84 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20250729163024 \ No newline at end of file +20250729183551 \ No newline at end of file diff --git a/src/components/ThemeToggle.tsx b/src/components/ThemeToggle.tsx index 6525407..faff82d 100644 --- a/src/components/ThemeToggle.tsx +++ b/src/components/ThemeToggle.tsx @@ -20,6 +20,11 @@ export function ThemeToggle() { } else { meta.setAttribute('content', theme === 'dark' ? '#0c111c' : '#f9fbfe'); } + + document.documentElement.style.backgroundColor = + theme === 'dark' ? '#0c111c' : '#f9fbfe'; + document.body.style.backgroundColor = + theme === 'dark' ? '#0c111c' : '#f9fbfe'; }; useEffect(() => { diff --git a/src/lib/version.ts b/src/lib/version.ts index d96495d..578feab 100644 --- a/src/lib/version.ts +++ b/src/lib/version.ts @@ -2,7 +2,7 @@ 'use client'; -const CURRENT_VERSION = '20250729163024'; +const CURRENT_VERSION = '20250729183551'; // 版本检查结果枚举 export enum UpdateStatus {