feat: Add AgentBot APIs (#2323)
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
export default {
|
||||
computed: {
|
||||
hideInputForBotConversations() {
|
||||
return window.chatwootWebChannel.hideInputForBotConversations;
|
||||
},
|
||||
useInboxAvatarForBot() {
|
||||
return window.chatwootWidgetDefaults.useInboxAvatarForBot;
|
||||
},
|
||||
|
||||
@@ -3,7 +3,6 @@ import configMixin from '../configMixin';
|
||||
import Vue from 'vue';
|
||||
|
||||
global.chatwootWebChannel = {
|
||||
hideInputForBotConversations: true,
|
||||
avatarUrl: 'https://test.url',
|
||||
hasAConnectedAgentBot: 'AgentBot',
|
||||
enabledFeatures: ['emoji_picker', 'attachments'],
|
||||
@@ -25,12 +24,10 @@ describe('configMixin', () => {
|
||||
const wrapper = createWrapper(vm);
|
||||
expect(wrapper.vm.hasEmojiPickerEnabled).toBe(true);
|
||||
expect(wrapper.vm.hasAttachmentsEnabled).toBe(true);
|
||||
expect(wrapper.vm.hideInputForBotConversations).toBe(true);
|
||||
expect(wrapper.vm.hasAConnectedAgentBot).toBe(true);
|
||||
expect(wrapper.vm.useInboxAvatarForBot).toBe(true);
|
||||
expect(wrapper.vm.inboxAvatarUrl).toBe('https://test.url');
|
||||
expect(wrapper.vm.channelConfig).toEqual({
|
||||
hideInputForBotConversations: true,
|
||||
avatarUrl: 'https://test.url',
|
||||
hasAConnectedAgentBot: 'AgentBot',
|
||||
enabledFeatures: ['emoji_picker', 'attachments'],
|
||||
|
||||
@@ -62,10 +62,7 @@
|
||||
leave-class="opacity-100 transform translate-y-0"
|
||||
leave-to-class="opacity-0 transform "
|
||||
>
|
||||
<div
|
||||
v-if="showInputTextArea && currentView === 'messageView'"
|
||||
class="input-wrap"
|
||||
>
|
||||
<div v-if="currentView === 'messageView'" class="input-wrap">
|
||||
<chat-footer />
|
||||
</div>
|
||||
<team-availability
|
||||
@@ -146,15 +143,6 @@ export default {
|
||||
fileUploadSizeLimit() {
|
||||
return MAXIMUM_FILE_UPLOAD_SIZE;
|
||||
},
|
||||
showInputTextArea() {
|
||||
if (this.hideInputForBotConversations) {
|
||||
if (this.isOpen) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
isHeaderCollapsed() {
|
||||
if (!this.hasIntroText || this.conversationSize) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user