aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authordave <starpumadev@gmail.com>2019-03-15 11:28:33 -0400
committerdave <starpumadev@gmail.com>2019-03-15 11:28:33 -0400
commite5786f32a70190df04e871d44c48fa43c18cfa11 (patch)
tree382ebc7142573fd58a3d92cf27f7f9c7f2395077 /src/boot
parent8ade93bb4db60e04e5e63d533401ee79de403e19 (diff)
parent9364964b017154f61072ffa70b08f2ed0c7dcaeb (diff)
#436: merge develop
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/after_store.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index a51f895e..0a4ec857 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -198,6 +198,7 @@ const getNodeInfo = async ({ store }) => {
store.dispatch('setInstanceOption', { name: 'gopherAvailable', value: features.includes('gopher') })
store.dispatch('setInstanceOption', { name: 'restrictedNicknames', value: metadata.restrictedNicknames })
+ store.dispatch('setInstanceOption', { name: 'postFormats', value: metadata.postFormats })
const suggestions = metadata.suggestions
store.dispatch('setInstanceOption', { name: 'suggestionsEnabled', value: suggestions.enabled })
@@ -212,6 +213,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 })