Chatwoot/app/javascript/dashboard/routes/auth/Signup.vue
Pranav Raj S 779bcf5e0d
feat: Update Signup screen (#6002)
* feat: Update Signup page designs

* feat: Update the signup page with dynamic testimonials

* Remove the images

* chore: Minor UI fixes

* chore: Form aligned to centre

* Update app/javascript/dashboard/routes/auth/components/Signup/Form.vue

* Design improvements

* Update company name key

* Revert "chore: Minor UI fixes"

This reverts commit 1556f4ca835d9aa0d9620fd6a3d52d259f0d7d65.

* Revert "Design improvements

This reverts commit dfb2364cf2f0cc93123698fde92e5f9e00536cc2.

* Remove footer

* Fix spacing

* Update app/views/installation/onboarding/index.html.erb

Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2022-12-07 15:55:03 -08:00

133 lines
3 KiB
Vue

<template>
<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"
/>
<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>
</div>
</div>
</div>
<testimonials
v-if="isAChatwootInstance"
class="medium-6 testimonial--container"
@resize-containers="resizeContainers"
/>
</div>
<div v-show="isLoading" class="spinner--container">
<spinner size="" />
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
import SignupForm from './components/Signup/Form.vue';
import Testimonials from './components/Testimonials/Index.vue';
import Spinner from 'shared/components/Spinner.vue';
export default {
components: {
SignupForm,
Spinner,
Testimonials,
},
mixins: [globalConfigMixin],
data() {
return { showTestimonials: false, isLoading: false };
},
computed: {
...mapGetters({ globalConfig: 'globalConfig/get' }),
isAChatwootInstance() {
return this.globalConfig.installationName === 'Chatwoot';
},
},
beforeMount() {
this.isLoading = this.isAChatwootInstance;
},
methods: {
resizeContainers(hasTestimonials) {
this.showTestimonials = hasTestimonials;
this.isLoading = false;
},
},
};
</script>
<style scoped lang="scss">
.signup-form--container {
display: flex;
align-items: center;
height: 100%;
min-height: 640px;
overflow: auto;
justify-content: center;
}
.signup-form--content {
padding: var(--space-jumbo);
max-width: 600px;
width: 100%;
}
.signup--hero {
margin-bottom: var(--space-normal);
.hero--logo {
width: 160px;
}
.hero--title {
margin-top: var(--space-medium);
font-weight: var(--font-weight-light);
}
}
.auth-screen--footer {
font-size: var(--font-size-small);
}
@media screen and (max-width: 1200px) {
.testimonial--container {
display: none;
}
.signup-form--container {
width: 100%;
flex: 0 0 100%;
max-width: 100%;
}
.signup-form--content {
margin: 0 auto;
}
}
.spinner--container {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</style>