feat: preview multiple images
This commit is contained in:
parent
568a333d7c
commit
cf7cd1fd6c
7 changed files with 92 additions and 23 deletions
|
@ -4,6 +4,7 @@ import type { Attachment } from 'masto'
|
|||
|
||||
const { attachment } = defineProps<{
|
||||
attachment: Attachment
|
||||
attachments?: Attachment[]
|
||||
}>()
|
||||
|
||||
const src = $computed(() => attachment.remoteUrl || attachment.url || attachment.previewUrl!)
|
||||
|
@ -62,10 +63,7 @@ const aspectRatio = computed(() => {
|
|||
focus:ring="2 primary inset"
|
||||
rounded-lg
|
||||
aria-label="Open image preview dialog"
|
||||
@click="openImagePreviewDialog({
|
||||
src,
|
||||
alt: attachment.description!,
|
||||
})"
|
||||
@click="openMediaPreview(attachments ? attachments : [attachment], attachments?.indexOf(attachment) || 0)"
|
||||
>
|
||||
<CommonBlurhash
|
||||
:blurhash="attachment.blurhash"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue