From f1d1fd64d3b560e138b502e38b7d697a8ad99b41 Mon Sep 17 00:00:00 2001 From: raeno Date: Wed, 5 Dec 2018 20:19:39 +0400 Subject: [PATCH] Clean up the code --- src/components/registration/registration.js | 6 +----- src/components/registration/registration.vue | 18 ++++-------------- src/mutation_types.js | 2 ++ 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index 8559633b..27b94d69 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -31,10 +31,6 @@ const registration = { if ((!this.registrationOpen && !this.token) || this.signedIn) { this.$router.push('/main/all') } - // // Seems like this doesn't work at first page open for some reason - // if (this.$store.state.instance.registrationOpen && this.token) { - // this.$router.push('/registration') - // } }, computed: { token () { return this.$route.params.token }, @@ -43,7 +39,7 @@ const registration = { signedIn: (state) => !!state.users.currentUser, isPending: (state) => state.users[SIGN_UP.isPending], serverValidationErrors: (state) => state.users[SIGN_UP.errors], - termsofservice: (state) => state.instance.tos + termsOfService: (state) => state.instance.tos }) }, methods: { diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue index fcc41d32..9c40e050 100644 --- a/src/components/registration/registration.vue +++ b/src/components/registration/registration.vue @@ -74,13 +74,7 @@ - +
@@ -89,12 +83,10 @@
-
+ +
-
- Form is invalid -
{{error}} @@ -165,7 +157,7 @@ } .form-group--error .form--label { - color: #f04124; + color: var(--cRed, #f04124); } .form-error { @@ -198,8 +190,6 @@ } .btn { - //align-self: flex-start; - //width: 10em; margin-top: 0.6em; height: 28px; } diff --git a/src/mutation_types.js b/src/mutation_types.js index 026c5540..f25ae174 100644 --- a/src/mutation_types.js +++ b/src/mutation_types.js @@ -1,7 +1,9 @@ export const SIGN_UP = { + // mutations SUCCESS: 'SIGN_UP_SUCCESS', FAILURE: 'SIGN_UP_FAILURE', PENDING: 'SIGN_UP_PENDING', + // state isPending: 'sign_up_pending', errors: 'sign_up_errors' }