fix: Show new message screen instead of input field (#4102)
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
import configMixin from '../mixins/configMixin';
|
||||
import TeamAvailability from 'widget/components/TeamAvailability';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { BUS_EVENTS } from 'shared/constants/busEvents';
|
||||
import routerMixin from 'widget/mixins/routerMixin';
|
||||
export default {
|
||||
name: 'Home',
|
||||
@@ -34,10 +33,7 @@ export default {
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isOnCollapsedView: false,
|
||||
isOnNewConversation: false,
|
||||
};
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
@@ -46,12 +42,6 @@ export default {
|
||||
conversationSize: 'conversation/getConversationSize',
|
||||
}),
|
||||
},
|
||||
mounted() {
|
||||
bus.$on(BUS_EVENTS.START_NEW_CONVERSATION, () => {
|
||||
this.isOnCollapsedView = true;
|
||||
this.isOnNewConversation = true;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
startConversation() {
|
||||
if (this.preChatFormEnabled && !this.conversationSize) {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="flex flex-1 overflow-auto">
|
||||
<pre-chat-form :options="preChatFormOptions" @submit="onSubmit" />
|
||||
<pre-chat-form
|
||||
:options="preChatFormOptions"
|
||||
:disable-contact-fields="disableContactFields"
|
||||
@submit="onSubmit"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -18,6 +22,10 @@ export default {
|
||||
...mapGetters({
|
||||
conversationSize: 'conversation/getConversationSize',
|
||||
}),
|
||||
disableContactFields() {
|
||||
const { disableContactFields = false } = this.$route.params || {};
|
||||
return disableContactFields;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
conversationSize(newSize, oldSize) {
|
||||
|
||||
Reference in New Issue
Block a user