feat: media grid
This commit is contained in:
parent
10143fffec
commit
c79902a04e
13 changed files with 142 additions and 39 deletions
24
components/status/StatusAttachment.vue
Normal file
24
components/status/StatusAttachment.vue
Normal file
|
@ -0,0 +1,24 @@
|
|||
<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!"
|
||||
border="~ gray/10"
|
||||
object-cover rounded-lg
|
||||
>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div>
|
||||
TODO: {{ attachment }}
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue