diff --git a/package.json b/package.json index 0eed31f1..ef876196 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "postcss": "^8.4.23", "prismjs": "^1.29.0", "tailwindcss": "^3.3.1", + "theme-change": "^2.5.0", "vite-plugin-vue-layouts": "^0.7.0", "vite-plugin-vuetify": "^1.0.2", "vue": "^3.2.45", diff --git a/src/App.vue b/src/App.vue index 2f4374dd..b7c44406 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,7 +2,8 @@ import { useTheme } from 'vuetify' import { useThemeConfig } from '@/plugins/vuetify/@core/composable/useThemeConfig' import { hexToRgb } from '@/plugins/vuetify/@layouts/utils' - +import { themeChange } from 'theme-change' +import { onMounted } from 'vue' const { syncInitialLoaderTheme, syncVuetifyThemeWithTheme: syncConfigThemeWithVuetifyTheme, isAppRtl } = useThemeConfig() const { global } = useTheme() @@ -10,6 +11,10 @@ const { global } = useTheme() // ℹ️ Sync current theme with initial loader theme syncInitialLoaderTheme() syncConfigThemeWithVuetifyTheme() + +onMounted(()=> { + themeChange(false) +})