slove conflict

This commit is contained in:
Hakaba Hitoyo 2018-02-10 10:17:58 +09:00
commit ebd8300e36
8 changed files with 108 additions and 37 deletions

View file

@ -75,15 +75,23 @@ const i18n = new VueI18n({
messages
})
window.fetch('/api/statusnet/config.json')
.then((res) => res.json())
.then((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 {name, theme, background, logo, registrationOpen, showInstanceSpecificPanel} = data
store.dispatch('setOption', { name: 'name', value: name })
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')