From 8fa559943cc5c742f2eb1f0effc79d8d1c574335 Mon Sep 17 00:00:00 2001 From: Innei Date: Wed, 26 Nov 2025 15:16:57 +0800 Subject: [PATCH] refactor(gallery): update image format handling in MasonryPhotoItem component - Removed the generic image format extraction function and replaced it with direct access to the data format property. - Simplified the display of image format information in the gallery layout. Signed-off-by: Innei --- apps/web/src/modules/gallery/MasonryPhotoItem.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/web/src/modules/gallery/MasonryPhotoItem.tsx b/apps/web/src/modules/gallery/MasonryPhotoItem.tsx index 341a9f0d..ed764314 100644 --- a/apps/web/src/modules/gallery/MasonryPhotoItem.tsx +++ b/apps/web/src/modules/gallery/MasonryPhotoItem.tsx @@ -13,7 +13,6 @@ import { } from '~/icons' import { isMobileDevice } from '~/lib/device-viewport' import { ImageLoaderManager } from '~/lib/image-loader-manager' -import { getImageFormat } from '~/lib/image-utils' import type { PhotoManifest } from '~/types/photo' export const MasonryPhotoItem = ({ data, width, index: _ }: { data: PhotoManifest; width: number; index: number }) => { @@ -96,9 +95,6 @@ export const MasonryPhotoItem = ({ data, width, index: _ }: { data: PhotoManifes const exifData = formatExifData() - // 使用通用的图片格式提取函数 - const imageFormat = getImageFormat(data.originalUrl || data.s3Key || '') - // 检查是否有视频内容(Live Photo 或 Motion Photo) const hasVideo = data.video !== undefined @@ -312,7 +308,7 @@ export const MasonryPhotoItem = ({ data, width, index: _ }: { data: PhotoManifes {/* 基本信息 */}
- {imageFormat} + {data.format} {data.width} × {data.height}