2024-12-01 17:56:31 +01:00
|
|
|
<template>
|
2025-05-05 20:12:41 +02:00
|
|
|
<ImageAttachment v-if="attachment.type === 'image'" :attachment="attachment" />
|
|
|
|
|
<VideoAttachment v-else-if="attachment.type === 'video' || attachment.type === 'gifv'" :attachment="attachment" />
|
|
|
|
|
<AudioAttachment v-else-if="attachment.type === 'audio'" :attachment="attachment" />
|
|
|
|
|
<FileAttachment v-else :attachment="attachment" />
|
2024-12-01 17:56:31 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2025-05-26 11:19:15 +02:00
|
|
|
import type { Attachment } from "@versia/client/schemas";
|
|
|
|
|
import type { z } from "zod";
|
2025-05-05 20:12:41 +02:00
|
|
|
import AudioAttachment from "./attachments/audio.vue";
|
|
|
|
|
import FileAttachment from "./attachments/file.vue";
|
|
|
|
|
import ImageAttachment from "./attachments/image.vue";
|
|
|
|
|
import VideoAttachment from "./attachments/video.vue";
|
2024-12-01 17:56:31 +01:00
|
|
|
|
|
|
|
|
defineProps<{
|
2025-05-26 11:19:15 +02:00
|
|
|
attachment: z.infer<typeof Attachment>;
|
2024-12-01 17:56:31 +01:00
|
|
|
}>();
|
2024-12-31 15:28:05 +01:00
|
|
|
</script>
|