From 05f8cabb33306ade97848051ee729ea66061a8d5 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 8 Nov 2025 11:54:39 +0800 Subject: [PATCH] :lipstick: Update styling --- app/components/Attachment/AttachmentItem.vue | 6 +- app/components/Post/PostItem.vue | 17 +++- app/pages/files/[id].vue | 94 +++++++++++++------- 3 files changed, 77 insertions(+), 40 deletions(-) diff --git a/app/components/Attachment/AttachmentItem.vue b/app/components/Attachment/AttachmentItem.vue index 3d3fcde..8211f03 100644 --- a/app/components/Attachment/AttachmentItem.vue +++ b/app/components/Attachment/AttachmentItem.vue @@ -60,7 +60,7 @@ const aspectRatio = computed( props.item.fileMeta?.ratio ?? (imageWidth.value && imageHeight.value ? imageHeight.value / imageWidth.value - : 1) + : null) ) const imageLoaded = ref(false) @@ -77,7 +77,7 @@ function openExternally() { y: rect.top, width: rect.width, height: rect.height, - aspectRatio: aspectRatio.value + aspectRatio: aspectRatio.value == null ? 0 : aspectRatio.value } // Store transition data @@ -98,7 +98,7 @@ const remoteSource = computed( const blurhashContainerStyle = computed(() => { return { - "padding-bottom": `${aspectRatio.value * 100}%` + "padding-bottom": `${aspectRatio.value == null ? 0 : aspectRatio.value * 100}%` } }) diff --git a/app/components/Post/PostItem.vue b/app/components/Post/PostItem.vue index 8e954a8..087b075 100644 --- a/app/components/Post/PostItem.vue +++ b/app/components/Post/PostItem.vue @@ -1,5 +1,5 @@