mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Implement registration with slider, first step
This commit is contained in:
parent
76d3788cf1
commit
eebacab7ea
@ -1,5 +1,6 @@
|
|||||||
SENTRY_DSN_WEBAPP=
|
SENTRY_DSN_WEBAPP=
|
||||||
COMMIT=
|
COMMIT=
|
||||||
PUBLIC_REGISTRATION=false
|
PUBLIC_REGISTRATION=false
|
||||||
|
INVITE_REGISTRATION=true
|
||||||
WEBSOCKETS_URI=ws://localhost:3000/api/graphql
|
WEBSOCKETS_URI=ws://localhost:3000/api/graphql
|
||||||
GRAPHQL_URI=http://localhost:4000/
|
GRAPHQL_URI=http://localhost:4000/
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="login-form">
|
<section class="registration-form">
|
||||||
<base-card>
|
<base-card>
|
||||||
<template #imageColumn>
|
<template #imageColumn>
|
||||||
<a :href="links.ORGANIZATION" :title="$t('login.moreInfo', metadata)" target="_blank">
|
<a :href="links.ORGANIZATION" :title="$t('login.moreInfo', metadata)" target="_blank">
|
||||||
|
|||||||
@ -35,9 +35,10 @@ export default {
|
|||||||
'password-reset-request',
|
'password-reset-request',
|
||||||
'password-reset-enter-nonce',
|
'password-reset-enter-nonce',
|
||||||
'password-reset-change-password',
|
'password-reset-change-password',
|
||||||
'registration-signup',
|
// 'registration-signup',
|
||||||
'registration-enter-nonce',
|
// 'registration-enter-nonce',
|
||||||
'registration-create-user-account',
|
// 'registration-create-user-account',
|
||||||
|
'registration',
|
||||||
'pages-slug',
|
'pages-slug',
|
||||||
'terms-and-conditions',
|
'terms-and-conditions',
|
||||||
'code-of-conduct',
|
'code-of-conduct',
|
||||||
|
|||||||
@ -1,45 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<ds-container width="small">
|
<section class="registration-form">
|
||||||
<base-card>
|
<base-card>
|
||||||
<template #imageColumn>
|
<registration-slider
|
||||||
<a :href="links.ORGANIZATION" :title="$t('login.moreInfo', metadata)" target="_blank">
|
v-if="registrationType"
|
||||||
<img class="image" alt="Sign up" src="/img/custom/sign-up.svg" />
|
:registrationType="registrationType"
|
||||||
</a>
|
:overwriteSliderData="overwriteSliderData"
|
||||||
</template>
|
/>
|
||||||
<nuxt-child />
|
<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>
|
||||||
<template #topMenu>
|
<template #topMenu>
|
||||||
<locale-switch offset="5" />
|
<locale-switch offset="5" />
|
||||||
</template>
|
</template>
|
||||||
</base-card>
|
</base-card>
|
||||||
</ds-container>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import links from '~/constants/links.js'
|
import HcEmpty from '~/components/Empty/Empty'
|
||||||
import metadata from '~/constants/metadata.js'
|
|
||||||
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
||||||
|
import RegistrationSlider from '~/components/Registration/RegistrationSlider'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
name: 'Registration',
|
||||||
components: {
|
components: {
|
||||||
|
HcEmpty,
|
||||||
LocaleSwitch,
|
LocaleSwitch,
|
||||||
|
RegistrationSlider,
|
||||||
},
|
},
|
||||||
layout: 'no-header',
|
|
||||||
data() {
|
data() {
|
||||||
|
const { method = null, email = null, inviteCode = null, nonce = null } = this.$route.query
|
||||||
return {
|
return {
|
||||||
metadata,
|
method,
|
||||||
links,
|
overwriteSliderData: {
|
||||||
|
collectedInputData: {
|
||||||
|
inviteCode,
|
||||||
|
email,
|
||||||
|
emailSend: !!email,
|
||||||
|
nonce,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
asyncData({ store, redirect }) {
|
asyncData({ app }) {
|
||||||
if (store.getters['auth/isLoggedIn']) {
|
return {
|
||||||
redirect('/')
|
publicRegistration: app.$env.PUBLIC_REGISTRATION === 'true',
|
||||||
|
inviteRegistration: app.$env.INVITE_REGISTRATION === 'true',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
registrationType() {
|
||||||
|
if (this.method && ['invite-code', 'invite-mail'].includes(this.method)) {
|
||||||
|
return this.method
|
||||||
|
}
|
||||||
|
return this.publicRegistration ? 'public-registration' : false
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.image {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user