Review fixes

This commit is contained in:
Nithin David Thomas
2024-02-13 08:55:56 +05:30
parent 0d9a94e7f5
commit 74f046be75
7 changed files with 35 additions and 57 deletions
@@ -1,6 +1,6 @@
<template>
<banner
v-if="shouldShowBanner"
v-if="false"
color-scheme="alert"
:banner-message="bannerMessage"
:action-button-label="actionButtonMessage"
@@ -34,6 +34,9 @@ export default {
actionButtonMessage() {
return this.$t('GENERAL_SETTINGS.OPEN_BILLING');
},
isOnboardingView() {
return this.$route.name.includes('onboarding_');
},
shouldShowBanner() {
if (!this.isOnChatwootCloud) {
return false;
@@ -43,6 +46,9 @@ export default {
return false;
}
if (this.isOnboardingView) {
return false;
}
return this.isPaymentPending();
},
},
@@ -29,7 +29,13 @@ export default {
actionButtonMessage() {
return this.$t('APP_GLOBAL.RESEND_VERIFICATION_MAIL');
},
isOnboardingView() {
return this.$route.name.includes('onboarding_');
},
shouldShowBanner() {
if (this.isOnboardingView) {
return false;
}
return !this.currentUser.confirmed;
},
},
+1 -29
View File
@@ -24,7 +24,7 @@
</defs>
</svg>
<div v-show="!isLoading" class="flex h-full relative z-50">
<div class="flex h-full relative z-50">
<div
class="flex-1 min-h-[640px] inline-flex items-center h-full justify-center overflow-auto py-6"
>
@@ -67,43 +67,15 @@
</div>
</div>
</div>
<div
v-show="isLoading"
class="flex items-center justify-center h-full w-full"
>
<spinner color-scheme="primary" size="" />
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
import SignupForm from './components/Signup/Form.vue';
import Spinner from 'shared/components/Spinner.vue';
export default {
components: {
SignupForm,
Spinner,
},
mixins: [globalConfigMixin],
data() {
return { isLoading: false };
},
computed: {
...mapGetters({ globalConfig: 'globalConfig/get' }),
isAChatwootInstance() {
return this.globalConfig.installationName === 'Chatwoot';
},
},
beforeMount() {
this.isLoading = this.isAChatwootInstance;
},
methods: {
resizeContainers() {
this.isLoading = false;
},
},
};
</script>
@@ -76,13 +76,6 @@ export default {
components: {
SubmitButton,
},
data() {
return {
user: {
name: '',
},
};
},
computed: {
...mapGetters({
currentUser: 'getCurrentUser',
@@ -100,15 +93,15 @@ export default {
</script>
<style>
.overlay-gradient {
background: linear-gradient(90deg, rgba(252, 252, 253, 0) 81.8%, #fcfcfd 100%),
linear-gradient(270deg, rgba(252, 252, 253, 0) 76.93%, #fcfcfd 100%),
linear-gradient(0deg, rgba(252, 252, 253, 0) 68.63%, #fcfcfd 100%),
linear-gradient(180deg, rgba(252, 252, 253, 0) 73.2%, #fcfcfd 100%);
background: linear-gradient(90deg, rgba(252, 252, 253, 0) 61.8%, #fcfcfd 90%),
linear-gradient(270deg, rgba(252, 252, 253, 0) 66.93%, #fcfcfd 90%),
linear-gradient(0deg, rgba(252, 252, 253, 0) 68.63%, #fcfcfd 90%),
linear-gradient(180deg, rgba(252, 252, 253, 0) 63.2%, #fcfcfd 80%);
}
.dark .overlay-gradient {
background: linear-gradient(270deg, rgba(24, 24, 26, 0) 76.93%, #151718 100%),
linear-gradient(90deg, rgba(24, 24, 26, 0) 81.8%, #151718 100%),
linear-gradient(0deg, rgba(24, 24, 26, 0) 68.63%, #151718 100%),
linear-gradient(180deg, rgba(24, 24, 26, 0) 73.2%, #151718 100%);
background: linear-gradient(270deg, rgba(24, 24, 26, 0) 61.93%, #151718 90%),
linear-gradient(90deg, rgba(24, 24, 26, 0) 66.8%, #151718 90%),
linear-gradient(0deg, rgba(24, 24, 26, 0) 68.63%, #151718 90%),
linear-gradient(180deg, rgba(24, 24, 26, 0) 63.2%, #151718 90%);
}
</style>
@@ -161,16 +161,16 @@ export default {
</script>
<style scoped>
.overlay-gradient {
background: linear-gradient(90deg, rgba(252, 252, 253, 0) 81.8%, #fcfcfd 100%),
linear-gradient(270deg, rgba(252, 252, 253, 0) 76.93%, #fcfcfd 100%),
linear-gradient(0deg, rgba(252, 252, 253, 0) 68.63%, #fcfcfd 100%),
linear-gradient(180deg, rgba(252, 252, 253, 0) 73.2%, #fcfcfd 100%);
background: linear-gradient(90deg, rgba(252, 252, 253, 0) 81.8%, #fcfcfd 95%),
linear-gradient(270deg, rgba(252, 252, 253, 0) 76.93%, #fcfcfd 95%),
linear-gradient(0deg, rgba(252, 252, 253, 0) 68.63%, #fcfcfd 95%),
linear-gradient(180deg, rgba(252, 252, 253, 0) 73.2%, #fcfcfd 95%);
}
.dark .overlay-gradient {
background: linear-gradient(270deg, rgba(24, 24, 26, 0) 76.93%, #151718 100%),
linear-gradient(90deg, rgba(24, 24, 26, 0) 81.8%, #151718 100%),
linear-gradient(0deg, rgba(24, 24, 26, 0) 68.63%, #151718 100%),
linear-gradient(180deg, rgba(24, 24, 26, 0) 73.2%, #151718 100%);
background: linear-gradient(270deg, rgba(24, 24, 26, 0) 76.93%, #151718 95%),
linear-gradient(90deg, rgba(24, 24, 26, 0) 81.8%, #151718 95%),
linear-gradient(0deg, rgba(24, 24, 26, 0) 68.63%, #151718 95%),
linear-gradient(180deg, rgba(24, 24, 26, 0) 73.2%, #151718 95%);
}
.fade-enter-active,
.fade-leave-active {
@@ -223,6 +223,7 @@ export default {
}
},
setFromIntelligentData() {
if (!this.intelligentData) return;
const { name: companyName, industry, size } = this.intelligentData;
this.companyName = companyName;
this.industry = industry;
@@ -182,8 +182,8 @@ export default {
},
},
watch: {
currentUser(user) {
if (!user.name && this.intelligentData.name) {
currentUser(user = {}) {
if (!user.name && this.intelligentData && this.intelligentData.name) {
this.fullName = this.intelligentData.name;
}
},
@@ -195,9 +195,9 @@ export default {
avatar_url: avatarUrl,
display_name: displayName,
message_signature: signature,
} = this.currentUser;
} = this.currentUser || {};
if (!fullName && this.intelligentData.name) {
if (!fullName && this.intelligentData && this.intelligentData.name) {
this.fullName = this.intelligentData.name;
} else {
this.fullName = fullName;