feat: Add a pre-chat form on widget (#1769)

This commit is contained in:
Pranav Raj S
2021-02-16 00:14:13 +05:30
committed by GitHub
parent 5f2bf7dfd2
commit 037ffc7419
31 changed files with 604 additions and 200 deletions

View File

@@ -35,6 +35,7 @@
import { IFrameHelper } from 'widget/helpers/utils';
import AgentBubble from 'widget/components/AgentMessageBubble.vue';
import configMixin from '../mixins/configMixin';
import { mapGetters } from 'vuex';
export default {
name: 'Unread',
@@ -43,26 +44,10 @@ export default {
},
mixins: [configMixin],
props: {
unreadMessages: {
type: Array,
default: () => [],
},
conversationSize: {
type: Number,
default: 0,
},
availableAgents: {
type: Array,
default: () => [],
},
hasFetched: {
type: Boolean,
default: false,
},
conversationAttributes: {
type: Object,
default: () => {},
},
unreadMessageCount: {
type: Number,
default: 0,
@@ -73,6 +58,9 @@ export default {
},
},
computed: {
...mapGetters({
unreadMessages: 'conversation/getUnreadTextMessages',
}),
showCloseButton() {
return this.unreadMessageCount && this.hideMessageBubble;
},