1
0
mirror of https://github.com/elk-zone/elk synced 2025-01-10 01:19:29 +09:00
elk/components/status/StatusAttachment.vue

25 lines
493 B
Vue
Raw Normal View History

2022-11-14 12:33:09 +09:00
<script setup lang="ts">
import type { Attachment } from 'masto'
const { attachment } = defineProps<{
attachment: Attachment
}>()
</script>
<template>
<template v-if="attachment.type === 'image'">
<img
class="status-attachment-image"
:src="attachment.previewUrl!"
:alt="attachment.description!"
2022-11-14 23:54:30 +09:00
border="~ border"
2022-11-14 12:33:09 +09:00
object-cover rounded-lg
>
</template>
<template v-else>
<div>
TODO: {{ attachment }}
</div>
</template>
</template>