From 2b4e351c08d6dcffa8e59114286d5a715ff818dc Mon Sep 17 00:00:00 2001 From: sendevia Date: Wed, 10 Dec 2025 15:43:46 +0800 Subject: [PATCH] refactor: replace window checks with centralized env utility --- .vitepress/theme/components/Header.vue | 3 +- .vitepress/theme/components/PageIndicator.vue | 3 +- .../theme/composables/useGlobalScroll.ts | 3 +- .vitepress/theme/layouts/Article.vue | 3 +- .vitepress/theme/layouts/Default.vue | 5 +-- .vitepress/theme/stores/screenWidth.ts | 8 +---- .vitepress/theme/utils/env.ts | 31 +++++++++++++++++++ 7 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 .vitepress/theme/utils/env.ts diff --git a/.vitepress/theme/components/Header.vue b/.vitepress/theme/components/Header.vue index b17c3b5..bfc7a84 100644 --- a/.vitepress/theme/components/Header.vue +++ b/.vitepress/theme/components/Header.vue @@ -1,12 +1,13 @@