diff --git a/frontend/.env.dist b/frontend/.env.dist index 7815be556..ffe4869fa 100644 --- a/frontend/.env.dist +++ b/frontend/.env.dist @@ -1,2 +1,3 @@ LOGIN_API_URL=http://localhost/login_api/ -COMMUNITY_API_URL=http://localhost/api/ \ No newline at end of file +COMMUNITY_API_URL=http://localhost/api/ +ALLOW_REGISTER=true \ No newline at end of file diff --git a/frontend/src/config/index.js b/frontend/src/config/index.js index 7d950b87d..fa4bf388b 100644 --- a/frontend/src/config/index.js +++ b/frontend/src/config/index.js @@ -2,11 +2,11 @@ // Load Package Details for some default values // const pkg = require('../../package') - const environment = { NODE_ENV: process.env.NODE_ENV, DEBUG: process.env.NODE_ENV !== 'production' || false, PRODUCTION: process.env.NODE_ENV === 'production' || false, + ALLOW_REGISTER: process.env.ALLOW_REGISTER !== 'false', } const server = { diff --git a/frontend/src/routes/router.js b/frontend/src/routes/router.js index 6d2963db5..189516242 100644 --- a/frontend/src/routes/router.js +++ b/frontend/src/routes/router.js @@ -1,6 +1,7 @@ import Vue from 'vue' import VueRouter from 'vue-router' import routes from './routes' +import CONFIG from '../config' Vue.use(VueRouter) @@ -21,4 +22,11 @@ const router = new VueRouter({ }, }) +if (CONFIG.ALLOW_REGISTER) { + router.addRoute({ + path: '/register', + component: () => import('../views/Pages/Register.vue'), + }) +} + export default router diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index bfaff9de6..ed5394d11 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -50,10 +50,6 @@ const routes = [ path: '/thx', component: () => import('../views/Pages/thx.vue'), }, - { - path: '/register', - component: () => import('../views/Pages/Register.vue'), - }, { path: '/password', component: () => import('../views/Pages/ForgotPassword.vue'), diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index 8504915c0..4e715875d 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -82,7 +82,7 @@ {{ $t('site.login.forgot_pwd') }} - + {{ $t('site.login.new_wallet') }} @@ -95,6 +95,7 @@