first commit
This commit is contained in:
13
resources/js/@core/utils/vuetify.js
Normal file
13
resources/js/@core/utils/vuetify.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { cookieRef } from '@layouts/stores/config'
|
||||
import { themeConfig } from '@themeConfig'
|
||||
|
||||
export const resolveVuetifyTheme = () => {
|
||||
const cookieColorScheme = cookieRef('color-scheme', usePreferredDark().value ? 'dark' : 'light')
|
||||
const storedTheme = cookieRef('theme', themeConfig.app.theme).value
|
||||
|
||||
return storedTheme === 'system'
|
||||
? cookieColorScheme.value === 'dark'
|
||||
? 'dark'
|
||||
: 'light'
|
||||
: storedTheme
|
||||
}
|
Reference in New Issue
Block a user