Skip to content
Snippets Groups Projects
Commit bfbc94d6 authored by Shpuld Shpuldson's avatar Shpuld Shpuldson
Browse files

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

parent 95605c32
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,9 @@ const registration = {
error: false,
registering: false
}),
computed: {
termsofservice () { return this.$store.state.config.tos }
},
methods: {
submit () {
this.registering = true
......
......@@ -42,9 +42,7 @@
<button :disabled="registering" type='submit' class='btn btn-default base05 base01-background'>Submit</button>
</div>
</div>
<div class='terms-of-service'>
<h4>Terms of Service</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<div class='terms-of-service' v-html="termsofservice">
</div>
</div>
<div v-if="error" class='form-group'>
......
......@@ -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 })
})
<h4>Terms of Service</h4>
<p>This is a placeholder ToS.</p>
<p>Edit <code>"/static/terms-of-service.html"</code> to make it fit the needs of your instance.</p>
<br>
<img src="/static/logo.png"/ style="display: block; margin: auto;">
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