From bfbc94d697df9e80e0454fbae776b6dec85dfc9b Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 19 Jun 2017 16:35:35 +0300 Subject: [PATCH] Move customizable terms-of-service into its separate .html file. --- src/components/registration/registration.js | 3 +++ src/components/registration/registration.vue | 4 +--- src/main.js | 8 +++++++- static/terms-of-service.html | 7 +++++++ 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 static/terms-of-service.html 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 @@ -
-

Terms of Service

-

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.

+
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 }) + }) diff --git a/static/terms-of-service.html b/static/terms-of-service.html new file mode 100644 index 00000000..c02cb719 --- /dev/null +++ b/static/terms-of-service.html @@ -0,0 +1,7 @@ +

Terms of Service

+ +

This is a placeholder ToS.

+ +

Edit "/static/terms-of-service.html" to make it fit the needs of your instance.

+
+