diff --git a/main_dc/yalarba/easySite/easySite/app/composables/useTheme.ts b/main_dc/yalarba/easySite/easySite/app/composables/useTheme.ts index 9ca8a1c..d8cc3da 100644 --- a/main_dc/yalarba/easySite/easySite/app/composables/useTheme.ts +++ b/main_dc/yalarba/easySite/easySite/app/composables/useTheme.ts @@ -5,7 +5,7 @@ export const useTheme = () => { const setTheme = (newTheme: 'light' | 'dark') => { theme.value = newTheme - if (process.client) { + if (import.meta.client) { document.documentElement.setAttribute('data-theme', newTheme) localStorage.setItem('theme', newTheme) } @@ -18,7 +18,7 @@ export const useTheme = () => { const setFontSet = (newFontSet: 'modern' | 'elegant') => { fontSet.value = newFontSet - if (process.client) { + if (import.meta.client) { document.documentElement.setAttribute('data-font-set', newFontSet) localStorage.setItem('font-set', newFontSet) } @@ -31,7 +31,7 @@ export const useTheme = () => { // Инициализация при загрузке onMounted(() => { - if (process.client) { + if (import.meta.client) { const savedTheme = localStorage.getItem('theme') as 'light' | 'dark' const savedFontSet = localStorage.getItem('font-set') as 'modern' | 'elegant' const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches diff --git a/main_dc/yalarba/easySite/easySite/app/pages/index.vue b/main_dc/yalarba/easySite/easySite/app/pages/index.vue index 5a618ad..af5912c 100644 --- a/main_dc/yalarba/easySite/easySite/app/pages/index.vue +++ b/main_dc/yalarba/easySite/easySite/app/pages/index.vue @@ -8,9 +8,18 @@
легко и доступно