aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordtluna <dtluna@openmailbox.org>2018-02-09 16:02:26 +0300
committerdtluna <dtluna@openmailbox.org>2018-02-09 16:02:26 +0300
commite2248bcf4fc57b7dbac9585a41b0578201394d88 (patch)
tree2d41353f544b5e7786666f91219a68d15d1f0a8a
parent082a119fd7c4182247ffb77063c9642cbb00af49 (diff)
Use `name` and `closed` from the backend
-rw-r--r--src/main.js13
-rw-r--r--static/config.json2
2 files changed, 10 insertions, 5 deletions
diff --git a/src/main.js b/src/main.js
index a14ca7c8..8d598d78 100644
--- a/src/main.js
+++ b/src/main.js
@@ -75,15 +75,22 @@ const i18n = new VueI18n({
messages
})
-window.fetch('/static/config.json')
+window.fetch('/api/statusnet/config.json')
.then((res) => res.json())
.then((data) => {
- const {name, theme, background, logo, registrationOpen} = data
+ const {name, closed: registrationClosed, textlimit} = data
store.dispatch('setOption', { name: 'name', value: name })
+ store.dispatch('setOption', { name: 'registrationOpen', value: !registrationClosed })
+ store.dispatch('setOption', { name: 'textlimit', value: parseInt(textlimit) })
+ })
+
+window.fetch('/static/config.json')
+ .then((res) => res.json())
+ .then((data) => {
+ const {theme, background, logo} = data
store.dispatch('setOption', { name: 'theme', value: theme })
store.dispatch('setOption', { name: 'background', value: background })
store.dispatch('setOption', { name: 'logo', value: logo })
- store.dispatch('setOption', { name: 'registrationOpen', value: registrationOpen })
if (data['chatDisabled']) {
store.dispatch('disableChat')
}
diff --git a/static/config.json b/static/config.json
index 880efca8..8e4b21ca 100644
--- a/static/config.json
+++ b/static/config.json
@@ -1,9 +1,7 @@
{
- "name": "Pleroma FE",
"theme": "pleroma-dark",
"background": "/static/bg.jpg",
"logo": "/static/logo.png",
- "registrationOpen": false,
"defaultPath": "/main/all",
"chatDisabled": false
}