aboutsummaryrefslogtreecommitdiff
path: root/src/main.js
diff options
context:
space:
mode:
authorHakaba Hitoyo <example@example.com>2018-02-10 10:17:58 +0900
committerHakaba Hitoyo <example@example.com>2018-02-10 10:17:58 +0900
commitebd8300e36be1af75a093264e77a9ba317a605cd (patch)
tree670c8eb61d36459eb6573f64091178d5c0a737ba /src/main.js
parentf23940a153b501f5edaecd292ebf2c7b9345d33f (diff)
parentb0f248c48384c888faef8fcf76ee8b3f8abfde8e (diff)
slove conflict
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 9ee089d7..ca968539 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, showInstanceSpecificPanel} = 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 })
store.dispatch('setOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel })
if (data['chatDisabled']) {
store.dispatch('disableChat')