aboutsummaryrefslogtreecommitdiff
path: root/src/boot/after_store.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/after_store.js')
-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 })