aboutsummaryrefslogtreecommitdiff
path: root/src/main.js
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2018-02-09 16:13:16 +0000
committerlambda <pleromagit@rogerbraun.net>2018-02-09 16:13:16 +0000
commitb0f248c48384c888faef8fcf76ee8b3f8abfde8e (patch)
treef23ef8177554facf735bfd57adf41bdf2637497f /src/main.js
parent25edb8675dc5def9b2619fa7f958e67d7a90e0eb (diff)
parentdcbbd7c53e921eddf542b082a06d8eb4999550c7 (diff)
Merge branch 'feature/post-length-indicator' into 'develop'
Add an indicator for characters left before hitting the limit See merge request pleroma/pleroma-fe!205
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main.js b/src/main.js
index a14ca7c8..7fb9a047 100644
--- a/src/main.js
+++ b/src/main.js
@@ -75,15 +75,23 @@ 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.site
+
store.dispatch('setOption', { name: 'name', value: name })
+ store.dispatch('setOption', { name: 'registrationOpen', value: (registrationClosed === '0') })
+ 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')
}