fix: get attachment src url

pull/214/head
三咲智子 2022-11-29 13:01:51 +08:00
rodzic 0ba7002d62
commit 22b4c4aaa5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 69992F2250DFD93E
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -6,6 +6,8 @@ const { attachment } = defineProps<{
attachment: Attachment
}>()
const src = $computed(() => attachment.remoteUrl || attachment.url || attachment.previewUrl!)
const rawAspectRatio = computed(() => {
if (attachment.meta?.original?.aspect)
return attachment.meta.original.aspect
@ -60,14 +62,14 @@ const aspectRatio = computed(() => {
focus:ring="2 primary inset"
rounded-lg
@click="openImagePreviewDialog({
src: attachment.url || attachment.previewUrl!,
src,
alt: attachment.description!,
})"
>
<CommonBlurhash
:blurhash="attachment.blurhash"
class="status-attachment-image"
:src="attachment.url || attachment.previewUrl!"
:src="src"
:alt="attachment.description!"
:style="{
aspectRatio,