turn registration on and off

This commit is contained in:
ogerly 2021-04-29 11:46:46 +02:00
parent edd8172a53
commit 7c3b5c72c6
5 changed files with 14 additions and 6 deletions

View File

@ -16,6 +16,8 @@ ENV BUILD_COMMIT="0000000"
ENV NODE_ENV="production"
## App relevant Envs
ENV PORT="3000"
## Register in App true || false
ENV VUE_APP_ALLOW_REGISTER="true"
# Labels
LABEL org.label-schema.build-date="${BUILD_DATE}"

View File

@ -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,
VUE_APP_ALLOW_REGISTER: process.env.VUE_APP_ALLOW_REGISTER === 'true',
}
const server = {

View File

@ -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.VUE_APP_ALLOW_REGISTER) {
router.addRoute({
path: '/register',
component: () => import('../views/Pages/Register.vue'),
})
}
export default router

View File

@ -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'),

View File

@ -82,7 +82,7 @@
{{ $t('site.login.forgot_pwd') }}
</router-link>
</b-col>
<b-col cols="6" class="text-right">
<b-col cols="6" class="text-right" v-show="allowRegister">
<router-link to="/register">
{{ $t('site.login.new_wallet') }}
</router-link>
@ -95,6 +95,7 @@
</template>
<script>
import loginAPI from '../../apis/loginAPI'
import CONFIG from '../../config'
export default {
name: 'login',
@ -106,6 +107,7 @@ export default {
// rememberMe: false
},
loginfail: false,
allowRegister: CONFIG.VUE_APP_ALLOW_REGISTER,
}
},
methods: {