2023-03-22 15:39:02 +01:00
|
|
|
const minifyTheme = require('minify-css-string').default
|
2024-10-27 22:02:45 +01:00
|
|
|
import { be, ca, cs, de, en, es, eu, fr, gl, it, nb, nl, pl, pt, tr, sk, sv, ro, ru, zhHans } from 'vuetify/es5/locale'
|
2023-03-22 15:39:02 +01:00
|
|
|
|
|
|
|
export default ({ res, nuxtState }) => {
|
|
|
|
|
2023-09-25 22:45:34 +02:00
|
|
|
const settings = process.server ? (res.locals.settings || {}) : nuxtState.state.settings || {}
|
2024-01-19 00:36:35 +01:00
|
|
|
const is_dark = nuxtState?.state?.localSettings['theme.is_dark'] ?? settings['theme.is_dark']
|
2024-01-17 19:16:14 +01:00
|
|
|
|
2023-03-22 15:39:02 +01:00
|
|
|
return {
|
2024-10-27 22:02:45 +01:00
|
|
|
lang: { locales: { be, ca, cs, de, en, es, eu, fr, gl, it, nb, nl, pl, pt, sk, sv, tr, ro, ru, zhHans } },
|
2023-03-22 15:39:02 +01:00
|
|
|
theme: {
|
|
|
|
options: {
|
|
|
|
customProperties: false,
|
|
|
|
variations: false,
|
|
|
|
minifyTheme,
|
|
|
|
},
|
2024-01-17 19:16:14 +01:00
|
|
|
dark: is_dark,
|
2023-03-22 15:39:02 +01:00
|
|
|
themes: {
|
2023-03-24 16:03:08 +01:00
|
|
|
dark: settings.dark_colors,
|
|
|
|
light: settings.light_colors
|
2023-03-22 15:39:02 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|