From 78d055bb991bfa4aa98ab5b876ee48e486adf8d0 Mon Sep 17 00:00:00 2001 From: TerryM Date: Sat, 30 May 2026 02:47:41 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=83=AD=E9=97=A8=E6=A6=9C=E5=B0=81?= =?UTF-8?q?=E9=9D=A2=E4=B8=8E=E6=96=87=E4=BB=B6=E6=A1=A3=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E7=BC=A9=E7=95=A5=E5=9B=BE=E6=94=B9=20object-contain=20?= =?UTF-8?q?=E5=AE=8C=E6=95=B4=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 热门榜单封面、文件档预览缩略图由 object-cover 改为 object-contain(文件预览 加底色),完整显示不裁剪。 Co-Authored-By: Claude Opus 4.8 (1M context) --- src/components/PopularRankList.tsx | 28 +++++++++++++------ .../messageStream/bubbles/FileDocBubble.tsx | 2 +- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/components/PopularRankList.tsx b/src/components/PopularRankList.tsx index f97cfed..0dc3ccd 100644 --- a/src/components/PopularRankList.tsx +++ b/src/components/PopularRankList.tsx @@ -132,14 +132,26 @@ function PopularRankRow({ }`} > {cover ? ( - setCoverFailed(true)} - /> + <> + {/* Same image, blurred + scaled, fills the letterbox area so we + see the full poster (no crop) without dead black bars. */} + + setCoverFailed(true)} + /> + ) : ( )} diff --git a/src/components/messageStream/bubbles/FileDocBubble.tsx b/src/components/messageStream/bubbles/FileDocBubble.tsx index 4e5c2b8..57c1a42 100644 --- a/src/components/messageStream/bubbles/FileDocBubble.tsx +++ b/src/components/messageStream/bubbles/FileDocBubble.tsx @@ -47,7 +47,7 @@ function AttachmentRow({ postId, att }: { postId: string; att: Attachment }) { loading="lazy" decoding="async" onError={() => setPreviewFailed(true)} - className="h-16 w-16 shrink-0 rounded-lg object-cover" + className="h-16 w-16 shrink-0 rounded-lg bg-[#111116] object-contain" /> ) : (