Commit ee45007d authored by LianaHus's avatar LianaHus

checking query them for being from our theme list

parent 8068af68
...@@ -34,10 +34,12 @@ export class ThemeModule extends Plugin { ...@@ -34,10 +34,12 @@ export class ThemeModule extends Plugin {
config: registry.get('config').api config: registry.get('config').api
} }
this.themes = themes.reduce((acc, theme) => ({ ...acc, [theme.name]: theme }), {}) this.themes = themes.reduce((acc, theme) => ({ ...acc, [theme.name]: theme }), {})
const theme = (new QueryParams()).get().theme const queryTheme = (new QueryParams()).get().theme
const currentTheme = this.themes[this._deps.config.get('settings/theme')] ? this._deps.config.get('settings/theme') : null queryTheme = this.themes[queryTheme] ? queryTheme : null
this.active = theme || currentTheme || 'Dark' const currentTheme = this._deps.config.get('settings/theme')
this.forced = theme !== undefined currentTheme = this.themes[currentTheme] ? currentTheme : null
this.active = queryTheme || currentTheme || 'Dark'
this.forced = queryTheme !== undefined
} }
/** Return the active theme */ /** Return the active theme */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment