From 9336140486f50159b935001b7ebadf3d9bda89ec Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 22 Jan 2020 00:37:19 +0200 Subject: massively improved initial theme loading code, added checks and warnings when loading theme files (import/localStorage/defaults) --- src/modules/config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/modules/config.js') diff --git a/src/modules/config.js b/src/modules/config.js index 74025db1..ee474b16 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -5,6 +5,9 @@ const browserLocale = (window.navigator.language || 'en').split('-')[0] export const defaultState = { colors: {}, + theme: undefined, + customTheme: undefined, + customThemeSource: undefined, hideISP: false, // bad name: actually hides posts of muted USERS hideMutedPosts: undefined, // instance default @@ -93,10 +96,10 @@ const config = { commit('setOption', { name, value }) switch (name) { case 'theme': - setPreset(value, commit) + setPreset(value) break case 'customTheme': - applyTheme(value, commit) + applyTheme(value) } } } -- cgit v1.2.3-70-g09d2