Skip to content
Snippets Groups Projects
Commit e2248bcf authored by dtluna's avatar dtluna
Browse files

Use `name` and `closed` from the backend

parent 082a119f
No related branches found
No related tags found
No related merge requests found
......@@ -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')
}
......
{
"name": "Pleroma FE",
"theme": "pleroma-dark",
"background": "/static/bg.jpg",
"logo": "/static/logo.png",
"registrationOpen": false,
"defaultPath": "/main/all",
"chatDisabled": false
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment