feat: support attachment uploading

This commit is contained in:
三咲智子 2022-11-24 01:17:54 +08:00
parent de59800c2b
commit d79011e39a
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
6 changed files with 115 additions and 9 deletions

View file

@ -0,0 +1,24 @@
<script setup lang="ts">
import type { Attachment } from 'masto'
withDefaults(defineProps<{
attachment: Attachment
alt?: string
removable?: boolean
}>(), {
removable: true,
})
defineEmits<{
(evt: 'remove'): void
}>()
</script>
<template>
<div relative group>
<status-attachment :attachment="attachment" w-full />
<div absolute right-2 top-2 hover:bg="gray/40" transition-100 p-1 rounded-5 cursor-pointer op-0 group-hover:op-100>
<div v-if="removable" i-ri:close-line text-3 @click="$emit('remove')" />
</div>
</div>
</template>