mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix env 'PUBLIC_REGISTRATION' and invent env 'INVITE_REGISTRATION' in backend and frontend
This commit is contained in:
parent
8a2f80e619
commit
db9ef6a832
@ -17,6 +17,7 @@ PRIVATE_KEY_PASSPHRASE="a7dsf78sadg87ad87sfagsadg78"
|
||||
SENTRY_DSN_BACKEND=
|
||||
COMMIT=
|
||||
PUBLIC_REGISTRATION=false
|
||||
INVITE_REGISTRATION=true
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
|
||||
@ -83,6 +83,7 @@ const options = {
|
||||
APPLICATION_NAME: metadata.APPLICATION_NAME,
|
||||
ORGANIZATION_URL: links.ORGANIZATION,
|
||||
PUBLIC_REGISTRATION: env.PUBLIC_REGISTRATION === 'true',
|
||||
INVITE_REGISTRATION: env.INVITE_REGISTRATION === 'true',
|
||||
}
|
||||
|
||||
// Check if all required configs are present
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<slot :name="sliderData.sliders[sliderIndex].name" />
|
||||
|
||||
<ds-flex>
|
||||
<ds-flex-item v-if="sliderData.sliders.length > 1" :centered="true">
|
||||
<ds-flex-item v-if="multipleSliders" :centered="true">
|
||||
<div
|
||||
v-for="(slider, index) in sliderData.sliders"
|
||||
:key="slider.name"
|
||||
@ -30,7 +30,7 @@
|
||||
</ds-flex-item>
|
||||
<ds-flex-item>
|
||||
<base-button
|
||||
style="float: right"
|
||||
:style="multipleSliders && 'float: right'"
|
||||
:icon="sliderData.sliders[sliderIndex].button.icon"
|
||||
type="submit"
|
||||
filled
|
||||
@ -57,6 +57,9 @@ export default {
|
||||
sliderIndex() {
|
||||
return this.sliderData.sliderIndex // to have a shorter notation
|
||||
},
|
||||
multipleSliders() {
|
||||
return this.sliderData.sliders.length > 1
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async onNextClick() {
|
||||
|
||||
@ -29,6 +29,8 @@ const sentry = {
|
||||
const options = {
|
||||
VERSION: process.env.VERSION || pkg.version,
|
||||
DESCRIPTION: process.env.DESCRIPTION || pkg.description,
|
||||
PUBLIC_REGISTRATION: process.env.PUBLIC_REGISTRATION === 'true',
|
||||
INVITE_REGISTRATION: process.env.INVITE_REGISTRATION === '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
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
<template>
|
||||
<section class="registration-form">
|
||||
<base-card>
|
||||
<registration-slider
|
||||
<!-- <section class="registration-form">
|
||||
<base-card> -->
|
||||
<!-- <registration-slider
|
||||
v-if="registrationType"
|
||||
:registrationType="registrationType"
|
||||
:overwriteSliderData="overwriteSliderData"
|
||||
/>
|
||||
<ds-space v-else centered>
|
||||
/> -->
|
||||
<registration-slider
|
||||
:registrationType="registrationType"
|
||||
:overwriteSliderData="overwriteSliderData"
|
||||
/>
|
||||
<!-- <ds-space v-else centered>
|
||||
<hc-empty icon="events" :message="$t('components.registration.signup.unavailable')" />
|
||||
<nuxt-link to="/login">{{ $t('site.back-to-login') }}</nuxt-link>
|
||||
</ds-space>
|
||||
@ -14,19 +18,19 @@
|
||||
<locale-switch offset="5" />
|
||||
</template>
|
||||
</base-card>
|
||||
</section>
|
||||
</section> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HcEmpty from '~/components/Empty/Empty'
|
||||
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
||||
// import HcEmpty from '~/components/Empty/Empty'
|
||||
// import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
||||
import RegistrationSlider from '~/components/Registration/RegistrationSlider'
|
||||
|
||||
export default {
|
||||
name: 'Registration',
|
||||
components: {
|
||||
HcEmpty,
|
||||
LocaleSwitch,
|
||||
// HcEmpty,
|
||||
// LocaleSwitch,
|
||||
RegistrationSlider,
|
||||
},
|
||||
data() {
|
||||
@ -48,8 +52,8 @@ export default {
|
||||
redirect('/')
|
||||
}
|
||||
return {
|
||||
publicRegistration: app.$env.PUBLIC_REGISTRATION === 'true',
|
||||
inviteRegistration: app.$env.INVITE_REGISTRATION === 'true',
|
||||
publicRegistration: app.$env.PUBLIC_REGISTRATION,
|
||||
inviteRegistration: app.$env.INVITE_REGISTRATION,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -22,7 +22,7 @@ export default {
|
||||
},
|
||||
asyncData({ app }) {
|
||||
return {
|
||||
publicRegistration: app.$env.PUBLIC_REGISTRATION === 'true',
|
||||
publicRegistration: app.$env.PUBLIC_REGISTRATION,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user