aboutsummaryrefslogtreecommitdiff
path: root/src/boot/after_store.js
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-03-13 13:29:34 +0100
committerlain <lain@soykaf.club>2019-03-13 13:29:34 +0100
commit5318227c378a9cd44baa4cc12dbb1935826c843b (patch)
tree63b471d34fddd4da41afabfaf76ff2cbcb3e3273 /src/boot/after_store.js
parent48ac96cfc7c9c3328d7a18707f00a2fe1bc743a1 (diff)
afterStoreSetup: Move log in and theme load to afterStoreSetup.
Diffstat (limited to 'src/boot/after_store.js')
-rw-r--r--src/boot/after_store.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index a51f895e..3d400ffa 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -212,6 +212,16 @@ const getNodeInfo = async ({ store }) => {
}
const afterStoreSetup = async ({ store, i18n }) => {
+ if (store.state.config.customTheme) {
+ // This is a hack to deal with async loading of config.json and themes
+ // See: style_setter.js, setPreset()
+ window.themeLoaded = true
+ store.dispatch('setOption', {
+ name: 'customTheme',
+ value: store.state.config.customTheme
+ })
+ }
+
const apiConfig = await getStatusnetConfig({ store })
const staticConfig = await getStaticConfig()
await setSettings({ store, apiConfig, staticConfig })