mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 19:17:48 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			51 lines
		
	
	
		
			992 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			992 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <div :class="conversationClass">
 | |
|     <messages-view
 | |
|       v-if="currentChat.id"
 | |
|       :inbox-id="inboxId"
 | |
|       :is-contact-panel-open="isContactPanelOpen"
 | |
|       @contact-panel-toggle="onToggleContactPanel"
 | |
|     />
 | |
|     <empty-state v-else />
 | |
|   </div>
 | |
| </template>
 | |
| <script>
 | |
| import { mapGetters } from 'vuex';
 | |
| import EmptyState from './EmptyState';
 | |
| import MessagesView from './MessagesView';
 | |
| 
 | |
| export default {
 | |
|   components: {
 | |
|     EmptyState,
 | |
|     MessagesView,
 | |
|   },
 | |
| 
 | |
|   props: {
 | |
|     inboxId: {
 | |
|       type: [Number, String],
 | |
|       default: '',
 | |
|       required: false,
 | |
|     },
 | |
|     isContactPanelOpen: {
 | |
|       type: Boolean,
 | |
|       default: false,
 | |
|     },
 | |
|   },
 | |
|   computed: {
 | |
|     ...mapGetters({
 | |
|       currentChat: 'getSelectedChat',
 | |
|     }),
 | |
|     conversationClass() {
 | |
|       return `medium-${
 | |
|         this.isContactPanelOpen ? '5' : '8'
 | |
|       } columns conversation-wrap`;
 | |
|     },
 | |
|   },
 | |
|   methods: {
 | |
|     onToggleContactPanel() {
 | |
|       this.$emit('contact-panel-toggle');
 | |
|     },
 | |
|   },
 | |
| };
 | |
| </script>
 | 
