45 lines
1.0 KiB
TypeScript
Executable File
45 lines
1.0 KiB
TypeScript
Executable File
import { deepMerge } from '@antfu/utils'
|
|
import type { App } from 'vue'
|
|
import { createVuetify } from 'vuetify'
|
|
import { VBtn } from 'vuetify/components/VBtn'
|
|
import defaults from './defaults'
|
|
import { icons } from './icons'
|
|
import { staticPrimaryColor, themes } from './theme'
|
|
|
|
// Styles
|
|
import { cookieRef } from '@/@layouts/stores/config'
|
|
import '@core/scss/template/libs/vuetify/index.scss'
|
|
import 'vuetify/styles'
|
|
|
|
export default function (app: App) {
|
|
const cookieThemeValues = {
|
|
defaultTheme: resolveVuetifyTheme(),
|
|
themes: {
|
|
light: {
|
|
colors: {
|
|
primary: cookieRef('lightThemePrimaryColor', staticPrimaryColor).value,
|
|
},
|
|
},
|
|
dark: {
|
|
colors: {
|
|
primary: cookieRef('darkThemePrimaryColor', staticPrimaryColor).value,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
const optionTheme = deepMerge({ themes }, cookieThemeValues)
|
|
|
|
const vuetify = createVuetify({
|
|
aliases: {
|
|
IconBtn: VBtn,
|
|
},
|
|
defaults,
|
|
icons,
|
|
theme: optionTheme,
|
|
|
|
})
|
|
|
|
app.use(vuetify)
|
|
}
|