+
+
+
+
@@ -32,18 +61,21 @@ import ChatFooter from 'widget/components/ChatFooter.vue';
import ChatHeaderExpanded from 'widget/components/ChatHeaderExpanded.vue';
import ChatHeader from 'widget/components/ChatHeader.vue';
import ConversationWrap from 'widget/components/ConversationWrap.vue';
-import AvailableAgents from 'widget/components/AvailableAgents.vue';
import configMixin from '../mixins/configMixin';
+import TeamAvailability from 'widget/components/TeamAvailability';
+import Spinner from 'shared/components/Spinner.vue';
+import { mapGetters } from 'vuex';
export default {
name: 'Home',
components: {
+ Branding,
ChatFooter,
+ ChatHeader,
ChatHeaderExpanded,
ConversationWrap,
- ChatHeader,
- Branding,
- AvailableAgents,
+ Spinner,
+ TeamAvailability,
},
mixins: [configMixin],
props: {
@@ -67,16 +99,20 @@ export default {
type: Object,
default: () => {},
},
- unreadMessageCount: {
- type: Number,
- default: 0,
- },
showPopoutButton: {
type: Boolean,
default: false,
},
},
+ data() {
+ return {
+ showMessageView: false,
+ };
+ },
computed: {
+ ...mapGetters({
+ isFetchingList: 'conversation/getIsFetchingList',
+ }),
isOpen() {
return this.conversationAttributes.status === 'open';
},
@@ -89,12 +125,18 @@ export default {
}
return true;
},
+ isOnMessageView() {
+ if (this.hideWelcomeHeader) {
+ return true;
+ }
+ if (this.conversationSize === 0) {
+ return this.showMessageView;
+ }
+ return true;
+ },
isHeaderExpanded() {
return this.conversationSize === 0;
},
- showAvailableAgents() {
- return this.availableAgents.length > 0 && this.conversationSize < 1;
- },
introHeading() {
return this.channelConfig.welcomeTitle;
},
@@ -105,11 +147,16 @@ export default {
return !(this.introHeading || this.introBody);
},
},
+ methods: {
+ startConversation() {
+ this.showMessageView = !this.showMessageView;
+ },
+ },
};