From 979d4d645f81bd6871b41a2169513a1cccd28033 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Wed, 21 Feb 2024 03:52:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(theme):=20=E6=96=B0=E5=A2=9E=20`force-dark?= =?UTF-8?q?`=20=E5=A4=96=E8=A7=82=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theme/src/client/components/Nav/NavBar.vue | 1 + .../components/Nav/NavBarAppearance.vue | 5 ++++- .../src/client/components/Nav/NavBarExtra.vue | 2 +- .../components/Nav/NavScreenAppearance.vue | 5 ++++- theme/src/node/theme.ts | 22 +++++++++++++++++++ theme/src/shared/options/locale.ts | 2 +- theme/templates/build.html | 11 ---------- 7 files changed, 33 insertions(+), 15 deletions(-) diff --git a/theme/src/client/components/Nav/NavBar.vue b/theme/src/client/components/Nav/NavBar.vue index 8296a251e..b5c44f684 100644 --- a/theme/src/client/components/Nav/NavBar.vue +++ b/theme/src/client/components/Nav/NavBar.vue @@ -189,6 +189,7 @@ watchPostEffect(() => { .menu + .appearance::before, .menu + .social-links::before, .translations + .appearance::before, +.translations + .social-links::before, .appearance + .social-links::before { width: 1px; height: 24px; diff --git a/theme/src/client/components/Nav/NavBarAppearance.vue b/theme/src/client/components/Nav/NavBarAppearance.vue index b04ed1fdd..3c830cca4 100644 --- a/theme/src/client/components/Nav/NavBarAppearance.vue +++ b/theme/src/client/components/Nav/NavBarAppearance.vue @@ -6,7 +6,10 @@ const theme = useThemeLocaleData() diff --git a/theme/src/client/components/Nav/NavBarExtra.vue b/theme/src/client/components/Nav/NavBarExtra.vue index bd2860be4..5a49bca9d 100644 --- a/theme/src/client/components/Nav/NavBarExtra.vue +++ b/theme/src/client/components/Nav/NavBarExtra.vue @@ -30,7 +30,7 @@ const hasExtraContent = computed( -
+

{{ theme.appearanceText || 'Appearance' }} diff --git a/theme/src/client/components/Nav/NavScreenAppearance.vue b/theme/src/client/components/Nav/NavScreenAppearance.vue index c1b8ddbbf..cc4acced8 100644 --- a/theme/src/client/components/Nav/NavScreenAppearance.vue +++ b/theme/src/client/components/Nav/NavScreenAppearance.vue @@ -6,7 +6,10 @@ const theme = useThemeLocaleData()