aboutsummaryrefslogtreecommitdiff
path: root/src/boot/after_store.js
diff options
context:
space:
mode:
authorlambda <lain@soykaf.club>2019-03-15 13:03:19 +0000
committerlambda <lain@soykaf.club>2019-03-15 13:03:19 +0000
commitc626f84336b08caefe72c9b74957a6c9e146d1f4 (patch)
tree581099450960b2fc80e39263e4a12b445da66e55 /src/boot/after_store.js
parentebc6a75d30bd96134c06f2ba5789ba86f03797c5 (diff)
parent5318227c378a9cd44baa4cc12dbb1935826c843b (diff)
Merge branch 'afterstore-refactor' into 'develop'
afterStoreSetup: Move log in and theme load to afterStoreSetup. See merge request pleroma/pleroma-fe!680
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 })