feat: Disable attachments and emoji picker in the web widget (#1102)

Signed-off-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
Pranav Raj S 2020-08-05 17:46:17 +05:30 committed by GitHub
parent 3b23aa7913
commit db877453a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 422 additions and 141 deletions

View file

@ -18,6 +18,7 @@
:on-click="emojiOnClick"
/>
<i
v-if="hasEmojiPickerEnabled"
class="emoji-toggle icon ion-happy-outline"
:class="{ active: showEmojiPicker }"
@click="toggleEmojiPicker()"
@ -39,6 +40,7 @@ import ChatSendButton from 'widget/components/ChatSendButton.vue';
import ChatAttachmentButton from 'widget/components/ChatAttachment.vue';
import ResizableTextArea from 'shared/components/ResizableTextArea';
import EmojiInput from 'dashboard/components/widgets/emoji/EmojiInput';
import configMixin from '../mixins/configMixin';
export default {
name: 'ChatInputWrap',
@ -48,7 +50,7 @@ export default {
EmojiInput,
ResizableTextArea,
},
mixins: [clickaway],
mixins: [clickaway, configMixin],
props: {
onSendMessage: {
type: Function,
@ -72,7 +74,7 @@ export default {
widgetColor: 'appConfig/getWidgetColor',
}),
showAttachment() {
return this.userInput.length === 0;
return this.hasAttachmentsEnabled && this.userInput.length === 0;
},
showSendButton() {
return this.userInput.length > 0;