diff --git a/webapp/components/PageFooter/PageFooter.vue b/webapp/components/PageFooter/PageFooter.vue index 9b56e29ee..90d74b137 100644 --- a/webapp/components/PageFooter/PageFooter.vue +++ b/webapp/components/PageFooter/PageFooter.vue @@ -31,7 +31,7 @@ import links from '~/constants/links.js' export default { data() { - return { links, version: `v${process.env.release}` } + return { links, version: `v${this.$env.RELEASE}` } }, } diff --git a/webapp/config/index.js b/webapp/config/index.js index 651bab568..827943ef8 100644 --- a/webapp/config/index.js +++ b/webapp/config/index.js @@ -12,7 +12,6 @@ const environment = { PRODUCTION: process.env.NODE_ENV === 'production' || false, NUXT_BUILD: process.env.NUXT_BUILD || '.nuxt', STYLEGUIDE_DEV: process.env.STYLEGUIDE_DEV || false, - RELEASE: process.env.release, } const server = { @@ -29,8 +28,8 @@ const sentry = { const options = { VERSION: process.env.VERSION || pkg.version, DESCRIPTION: process.env.DESCRIPTION || pkg.description, - PUBLIC_REGISTRATION: process.env.PUBLIC_REGISTRATION, - INVITE_REGISTRATION: process.env.INVITE_REGISTRATION, + PUBLIC_REGISTRATION: process.env.PUBLIC_REGISTRATION === 'true' || false, + INVITE_REGISTRATION: process.env.INVITE_REGISTRATION !== 'false', //default = true // Cookies COOKIE_EXPIRE_TIME: process.env.COOKIE_EXPIRE_TIME || 730, // Two years by default COOKIE_HTTPS_ONLY: process.env.COOKIE_HTTPS_ONLY || process.env.NODE_ENV === 'production', // ensure true in production if not set explicitly diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index db84c1feb..6ee489367 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -108,7 +108,7 @@ export default { return { mobileSearchVisible: false, toggleMobileMenu: false, - inviteRegistration: this.$env.inviteRegistration, + inviteRegistration: this.$env.INVITE_REGISTRATION, } }, computed: { diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js index 9ca85431d..6d5247df0 100644 --- a/webapp/nuxt.config.js +++ b/webapp/nuxt.config.js @@ -27,9 +27,9 @@ export default { }, env: { - release: CONFIG.VERSION, - publicRegistration: String(CONFIG.PUBLIC_REGISTRATION) === 'true', - inviteRegistration: String(CONFIG.INVITE_REGISTRATION) === 'true', + RELEASE: CONFIG.VERSION, + PUBLIC_REGISTRATION: CONFIG.PUBLIC_REGISTRATION, + INVITE_REGISTRATION: CONFIG.INVITE_REGISTRATION, // pages which do NOT require a login publicPages: [ 'login', diff --git a/webapp/pages/registration/signup.vue b/webapp/pages/registration/signup.vue index 1265cc013..18f9c9a70 100644 --- a/webapp/pages/registration/signup.vue +++ b/webapp/pages/registration/signup.vue @@ -22,7 +22,7 @@ export default { }, asyncData({ app }) { return { - publicRegistration: app.$env.PUBLIC_REGISTRATION === 'true', + publicRegistration: app.$env.PUBLIC_REGISTRATION, } }, methods: {