From ad6864fd18db6e7164e8e790de0bba11abdd4560 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 11 Dec 2024 18:25:13 +0530 Subject: [PATCH] feat: add dyte bubble --- .../components-next/message/Message.vue | 6 + .../message/bubbles/BaseAttachment.vue | 9 +- .../components-next/message/bubbles/Dyte.vue | 109 ++++++++++++++++++ .../message/stories/Bubbles.story.vue | 30 ++++- 4 files changed, 147 insertions(+), 7 deletions(-) create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Dyte.vue diff --git a/app/javascript/dashboard/components-next/message/Message.vue b/app/javascript/dashboard/components-next/message/Message.vue index e63ea1ec3..ecef5605c 100644 --- a/app/javascript/dashboard/components-next/message/Message.vue +++ b/app/javascript/dashboard/components-next/message/Message.vue @@ -23,6 +23,7 @@ import AttachmentsBubble from './bubbles/Attachments.vue'; import EmailBubble from './bubbles/Email/Index.vue'; import UnsupportedBubble from './bubbles/Unsupported.vue'; import ContactBubble from './bubbles/Contact.vue'; +import DyteBubble from './bubbles/Dyte.vue'; const LocationBubble = defineAsyncComponent( () => import('./bubbles/Location.vue') ); @@ -79,6 +80,7 @@ import MessageMeta from './MessageMeta.vue'; * @property {string} content - The message content */ +// eslint-disable-next-line vue/define-macros-order const props = defineProps({ id: { type: Number, required: true }, messageType: { @@ -250,6 +252,10 @@ const componentToRender = computed(() => { return UnsupportedBubble; } + if (props.contentAttributes.type === 'dyte') { + return DyteBubble; + } + if (props.contentAttributes.imageType === 'story_mention') { return InstagramStoryBubble; } diff --git a/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue b/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue index 59cf576bf..a2d215721 100644 --- a/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue +++ b/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue @@ -1,4 +1,3 @@ - + +