mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix: ui color theme wrong selection #332
This commit is contained in:
parent
80ffb5932b
commit
841e2b69c0
1 changed files with 5 additions and 2 deletions
|
@ -4,6 +4,9 @@ import { ca, cs, de, en, es, eu, fr, gl, it, nb, nl, pl, pt, tr, sk, ro, ru, zhH
|
|||
export default ({ res, nuxtState }) => {
|
||||
|
||||
const settings = process.server ? (res.locals.settings || {}) : nuxtState.state.settings || {}
|
||||
const is_dark = process.client
|
||||
? (typeof nuxtState.state.localSettings['theme.is_dark'] !== 'undefined' ? nuxtState.state.localSettings['theme.is_dark'] : settings['theme.is_dark'])
|
||||
: settings['theme.is_dark']
|
||||
|
||||
return {
|
||||
lang: { locales: { ca, cs, de, en, es, eu, fr, gl, it, nb, nl, pl, pt, sk, tr, ro, ru, zhHans } },
|
||||
|
@ -14,7 +17,7 @@ export default ({ res, nuxtState }) => {
|
|||
variations: false,
|
||||
minifyTheme,
|
||||
},
|
||||
dark: settings['theme.is_dark'],
|
||||
dark: is_dark,
|
||||
themes: {
|
||||
dark: settings.dark_colors,
|
||||
light: settings.light_colors
|
||||
|
|
Loading…
Reference in a new issue