feat: add attachment only component

This commit is contained in:
Shivam Mishra
2024-11-28 18:27:55 +05:30
parent 44b4c7ce14
commit b304e86f4f
4 changed files with 197 additions and 15 deletions
@@ -17,6 +17,7 @@ import ActivityBubble from './bubbles/Activity.vue';
import ImageBubble from './bubbles/Image.vue';
import FileBubble from './bubbles/File.vue';
import AudioBubble from './bubbles/Audio.vue';
import AttachmentsBubble from './bubbles/Attachments.vue';
import MessageError from './MessageError.vue';
import MessageMeta from './MessageMeta.vue';
@@ -219,6 +220,10 @@ const componentToRender = computed(() => {
if (fileType === ATTACHMENT_TYPES.AUDIO) return AudioBubble;
}
if (props.attachments.length > 1 && !props.content) {
return AttachmentsBubble;
}
return TextBubble;
});