From 0224c40d4996e56f5e0809d7b5a1a1a8239b2078 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Mon, 16 Nov 2020 10:33:16 -0500 Subject: [PATCH] simplify setup for open source launchers --- src/_pages/Layout.vue | 16 +++++++++------- src/_pages/auth/Register.vue | 19 ++++++++++--------- src/_pages/auth/VerifyEmail.vue | 2 +- src/_store/account.module.js | 10 ++++++++-- src/_store/system.module.js | 1 + 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/_pages/Layout.vue b/src/_pages/Layout.vue index e9ba6ff..4da1c19 100644 --- a/src/_pages/Layout.vue +++ b/src/_pages/Layout.vue @@ -139,7 +139,7 @@ export default { this.verifiedContacts = this.hasVerifiedContact(p); const currentUser = util.currentUser(); if (!currentUser) return; - if (!this.verifiedContacts && !currentUser.admin) { + if (!this.verifiedContacts && !currentUser.admin && !this.configs.localNetwork) { this.navigateToVerifyEmail(); if (this.verifiedContactRefresher === null) { const vue = this; @@ -153,12 +153,14 @@ export default { }, 5000); } } else { - const currentUser = util.currentUser(); - this.getAllAccountPaymentMethods({ - userId: currentUser.uuid, - messages: this.messages, - errors: this.errors, - }); + if (this.configs.paymentsEnabled && !this.configs.localNetwork) { + const currentUser = util.currentUser(); + this.getAllAccountPaymentMethods({ + userId: currentUser.uuid, + messages: this.messages, + errors: this.errors, + }); + } if (this.verifiedContactRefresher !== null) { window.clearInterval(this.verifiedContactRefresher); this.verifiedContactRefresher = null; diff --git a/src/_pages/auth/Register.vue b/src/_pages/auth/Register.vue index cd45bf5..b7dd273 100644 --- a/src/_pages/auth/Register.vue +++ b/src/_pages/auth/Register.vue @@ -68,7 +68,7 @@ {{ confirmPasswordErrors.join(', ') }} -
+
- + {{ messages.message_request_promoCode }} @@ -132,15 +132,15 @@
-
+
-
+
-
+
{ commit('registerSuccess', user); - router.push('/verifyEmail'); + if (!local) { + router.push('/verifyEmail'); + } else if (payment) { + router.push('/payment'); + } else { + router.push('/'); + } setTimeout(() => { // display success message after route change completes dispatch('alert/success', messages.alert_registration_success, { diff --git a/src/_store/system.module.js b/src/_store/system.module.js index 4a5b2cf..fe5e360 100644 --- a/src/_store/system.module.js +++ b/src/_store/system.module.js @@ -16,6 +16,7 @@ const state = { networkUuid: null, allowRegistration: false, paymentsEnabled: false, + localNetwork: false, sageLauncher: false, bubbleNode: null, entityClasses: [],