Move customizable terms-of-service into its separate .html file.

This commit is contained in:
Shpuld Shpuldson 2017-06-19 16:35:35 +03:00
parent 95605c32f1
commit bfbc94d697
4 changed files with 18 additions and 4 deletions

View file

@ -86,9 +86,15 @@ new Vue({
window.fetch('/static/config.json')
.then((res) => res.json())
.then(({name, theme, background, logo}) => {
.then(({name, theme, background, logo, tos}) => {
store.dispatch('setOption', { name: 'name', value: name })
store.dispatch('setOption', { name: 'theme', value: theme })
store.dispatch('setOption', { name: 'background', value: background })
store.dispatch('setOption', { name: 'logo', value: logo })
})
window.fetch('/static/terms-of-service.html')
.then((res) => res.text())
.then((html) => {
store.dispatch('setOption', { name: 'tos', value: html })
})