mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix: simplify local dark theme selection and fix #332
This commit is contained in:
parent
67d2ee31a2
commit
223437f9c1
1 changed files with 1 additions and 3 deletions
|
@ -4,9 +4,7 @@ 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']
|
||||
const is_dark = nuxtState?.state?.localSettings['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 } },
|
||||
|
|
Loading…
Reference in a new issue