diff options
| author | lambda <pleromagit@rogerbraun.net> | 2018-02-09 16:13:16 +0000 |
|---|---|---|
| committer | lambda <pleromagit@rogerbraun.net> | 2018-02-09 16:13:16 +0000 |
| commit | b0f248c48384c888faef8fcf76ee8b3f8abfde8e (patch) | |
| tree | f23ef8177554facf735bfd57adf41bdf2637497f /src/main.js | |
| parent | 25edb8675dc5def9b2619fa7f958e67d7a90e0eb (diff) | |
| parent | dcbbd7c53e921eddf542b082a06d8eb4999550c7 (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.js | 14 |
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') } |
