aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShpuld Shpuldson <shpuld@gmail.com>2017-06-19 16:35:35 +0300
committerShpuld Shpuldson <shpuld@gmail.com>2017-06-19 16:35:35 +0300
commitbfbc94d697df9e80e0454fbae776b6dec85dfc9b (patch)
tree177ce10e498b574a1c74e4c5b48d2885f05a57c5 /src
parent95605c32f1a8d08d72eb60d34abead6067b79841 (diff)
Move customizable terms-of-service into its separate .html file.
Diffstat (limited to 'src')
-rw-r--r--src/components/registration/registration.js3
-rw-r--r--src/components/registration/registration.vue4
-rw-r--r--src/main.js8
3 files changed, 11 insertions, 4 deletions
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js
index 93be9baa..9e99197c 100644
--- a/src/components/registration/registration.js
+++ b/src/components/registration/registration.js
@@ -4,6 +4,9 @@ const registration = {
error: false,
registering: false
}),
+ computed: {
+ termsofservice () { return this.$store.state.config.tos }
+ },
methods: {
submit () {
this.registering = true
diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
index f010d8ab..bb3e5e04 100644
--- a/src/components/registration/registration.vue
+++ b/src/components/registration/registration.vue
@@ -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'>
diff --git a/src/main.js b/src/main.js
index dd59dea7..52b820c2 100644
--- a/src/main.js
+++ b/src/main.js
@@ -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 })
+ })