2019-08-14 09:48:44 +00:00
|
|
|
<template>
|
2022-12-07 23:55:03 +00:00
|
|
|
<div class="h-full w-full">
|
|
|
|
<div v-show="!isLoading" class="row h-full">
|
|
|
|
<div
|
|
|
|
:class="
|
|
|
|
`${showTestimonials ? 'large-6' : 'large-12'} signup-form--container`
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<div class="signup-form--content">
|
|
|
|
<div class="signup--hero">
|
|
|
|
<img
|
|
|
|
:src="globalConfig.logo"
|
|
|
|
:alt="globalConfig.installationName"
|
|
|
|
class="hero--logo"
|
2022-02-18 14:32:50 +00:00
|
|
|
/>
|
2022-12-07 23:55:03 +00:00
|
|
|
<h2 class="hero--title">
|
|
|
|
{{ $t('REGISTER.TRY_WOOT') }}
|
|
|
|
</h2>
|
|
|
|
</div>
|
|
|
|
<signup-form />
|
|
|
|
<div class="auth-screen--footer">
|
|
|
|
<span>{{ $t('REGISTER.HAVE_AN_ACCOUNT') }}</span>
|
|
|
|
<router-link to="/app/login">
|
|
|
|
{{
|
|
|
|
useInstallationName(
|
|
|
|
$t('LOGIN.TITLE'),
|
|
|
|
globalConfig.installationName
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
</router-link>
|
2022-02-18 14:32:50 +00:00
|
|
|
</div>
|
2019-08-14 09:48:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-07 23:55:03 +00:00
|
|
|
<testimonials
|
|
|
|
v-if="isAChatwootInstance"
|
|
|
|
class="medium-6 testimonial--container"
|
|
|
|
@resize-containers="resizeContainers"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div v-show="isLoading" class="spinner--container">
|
|
|
|
<spinner size="" />
|
2019-08-14 09:48:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-05-11 20:01:40 +00:00
|
|
|
import { mapGetters } from 'vuex';
|
|
|
|
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
|
2022-12-07 23:55:03 +00:00
|
|
|
import SignupForm from './components/Signup/Form.vue';
|
|
|
|
import Testimonials from './components/Testimonials/Index.vue';
|
|
|
|
import Spinner from 'shared/components/Spinner.vue';
|
2022-12-07 21:03:51 +00:00
|
|
|
|
2019-08-14 09:48:44 +00:00
|
|
|
export default {
|
2022-02-18 14:32:50 +00:00
|
|
|
components: {
|
2022-12-07 23:55:03 +00:00
|
|
|
SignupForm,
|
|
|
|
Spinner,
|
|
|
|
Testimonials,
|
2022-02-18 14:32:50 +00:00
|
|
|
},
|
2022-12-07 23:55:03 +00:00
|
|
|
mixins: [globalConfigMixin],
|
2019-08-14 09:48:44 +00:00
|
|
|
data() {
|
2022-12-07 23:55:03 +00:00
|
|
|
return { showTestimonials: false, isLoading: false };
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
2020-05-11 20:01:40 +00:00
|
|
|
computed: {
|
2022-02-18 14:32:50 +00:00
|
|
|
...mapGetters({ globalConfig: 'globalConfig/get' }),
|
2022-12-07 23:55:03 +00:00
|
|
|
isAChatwootInstance() {
|
|
|
|
return this.globalConfig.installationName === 'Chatwoot';
|
2022-04-12 05:38:12 +00:00
|
|
|
},
|
2020-05-11 20:01:40 +00:00
|
|
|
},
|
2022-12-07 23:55:03 +00:00
|
|
|
beforeMount() {
|
|
|
|
this.isLoading = this.isAChatwootInstance;
|
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
methods: {
|
2022-12-07 23:55:03 +00:00
|
|
|
resizeContainers(hasTestimonials) {
|
|
|
|
this.showTestimonials = hasTestimonials;
|
|
|
|
this.isLoading = false;
|
2022-02-18 14:32:50 +00:00
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
2020-12-21 08:35:19 +00:00
|
|
|
<style scoped lang="scss">
|
2022-12-07 23:55:03 +00:00
|
|
|
.signup-form--container {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
height: 100%;
|
|
|
|
min-height: 640px;
|
|
|
|
overflow: auto;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
2020-12-21 08:35:19 +00:00
|
|
|
|
2022-12-07 23:55:03 +00:00
|
|
|
.signup-form--content {
|
|
|
|
padding: var(--space-jumbo);
|
|
|
|
max-width: 600px;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2020-12-21 08:35:19 +00:00
|
|
|
|
2022-12-07 23:55:03 +00:00
|
|
|
.signup--hero {
|
|
|
|
margin-bottom: var(--space-normal);
|
2020-12-21 08:35:19 +00:00
|
|
|
|
2022-12-07 23:55:03 +00:00
|
|
|
.hero--logo {
|
|
|
|
width: 160px;
|
|
|
|
}
|
2020-12-21 08:35:19 +00:00
|
|
|
|
2022-12-07 23:55:03 +00:00
|
|
|
.hero--title {
|
|
|
|
margin-top: var(--space-medium);
|
|
|
|
font-weight: var(--font-weight-light);
|
2020-12-21 08:35:19 +00:00
|
|
|
}
|
2022-12-07 23:55:03 +00:00
|
|
|
}
|
2020-12-21 08:35:19 +00:00
|
|
|
|
2022-12-07 23:55:03 +00:00
|
|
|
.auth-screen--footer {
|
|
|
|
font-size: var(--font-size-small);
|
|
|
|
}
|
2020-12-21 08:35:19 +00:00
|
|
|
|
2022-12-07 23:55:03 +00:00
|
|
|
@media screen and (max-width: 1200px) {
|
|
|
|
.testimonial--container {
|
|
|
|
display: none;
|
2020-12-21 08:35:19 +00:00
|
|
|
}
|
2022-12-07 23:55:03 +00:00
|
|
|
.signup-form--container {
|
|
|
|
width: 100%;
|
|
|
|
flex: 0 0 100%;
|
|
|
|
max-width: 100%;
|
2020-12-21 08:35:19 +00:00
|
|
|
}
|
2022-12-07 23:55:03 +00:00
|
|
|
.signup-form--content {
|
|
|
|
margin: 0 auto;
|
2022-02-18 14:32:50 +00:00
|
|
|
}
|
2020-12-21 08:35:19 +00:00
|
|
|
}
|
2022-12-07 23:55:03 +00:00
|
|
|
|
|
|
|
.spinner--container {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
height: 100%;
|
|
|
|
}
|
2020-12-21 08:35:19 +00:00
|
|
|
</style>
|