feat: display rating in exif panel (#69)

This commit is contained in:
Wenzhuo Liu
2025-07-28 19:48:57 +08:00
committed by GitHub
parent ae289773ec
commit d440b6914c
9 changed files with 19 additions and 0 deletions

View File

@@ -128,6 +128,12 @@ export const ExifPanel: FC<{
value={formattedExifData.colorSpace}
/>
)}
{formattedExifData?.rating && formattedExifData.rating > 0 && (
<Row
label={t('exif.rating')}
value={'★'.repeat(formattedExifData.rating)}
/>
)}
{formattedExifData?.dateTime && (
<Row

View File

@@ -343,6 +343,9 @@ export const formatExifData = (exif: PickedExif | null) => {
// 色彩空间 - with translation
const colorSpace = translateColorSpace(exif.ColorSpace || null)
// 评分
const rating = exif.Rating
const GPSAltitudeIsAboveSeaLevel = exif.GPSAltitudeRef === 'Above Sea Level'
// GPS 信息
@@ -421,6 +424,7 @@ export const formatExifData = (exif: PickedExif | null) => {
fujiRecipe: exif.FujiRecipe ? processFujiRecipe(exif.FujiRecipe) : null,
exposureProgram,
rating,
}
}

View File

@@ -150,6 +150,7 @@
"exif.noise.reduction": "Noise Reduction",
"exif.not.available": "N/A",
"exif.pixels": "Pixels",
"exif.rating": "Rating",
"exif.raw.category.basic": "File Information",
"exif.raw.category.camera": "Camera Information",
"exif.raw.category.datetime": "Date & Time",

View File

@@ -150,6 +150,7 @@
"exif.noise.reduction": "ノイズリダクション",
"exif.not.available": "N/A",
"exif.pixels": "ピクセル",
"exif.rating": "評価",
"exif.raw.category.basic": "ファイル情報",
"exif.raw.category.camera": "カメラ情報",
"exif.raw.category.datetime": "日時",

View File

@@ -150,6 +150,7 @@
"exif.noise.reduction": "노이즈 감소",
"exif.not.available": "N/A",
"exif.pixels": "픽셀",
"exif.rating": "평점",
"exif.raw.category.basic": "파일 정보",
"exif.raw.category.camera": "카메라 정보",
"exif.raw.category.datetime": "날짜 및 시간",

View File

@@ -150,6 +150,7 @@
"exif.noise.reduction": "降噪",
"exif.not.available": "不可用",
"exif.pixels": "像素",
"exif.rating": "评分",
"exif.raw.category.basic": "文件信息",
"exif.raw.category.camera": "相机信息",
"exif.raw.category.datetime": "日期时间",

View File

@@ -150,6 +150,7 @@
"exif.noise.reduction": "降噪",
"exif.not.available": "不可用",
"exif.pixels": "像素",
"exif.rating": "評分",
"exif.raw.category.basic": "檔案資訊",
"exif.raw.category.camera": "相機資訊",
"exif.raw.category.datetime": "日期時間",

View File

@@ -119,6 +119,7 @@ const pickKeys: Array<keyof Tags | (string & {})> = [
'ScaleFactor35efl',
'ShutterSpeed',
'LightValue',
'Rating',
// GPS
'GPSAltitude',
'GPSCoordinates',

View File

@@ -150,6 +150,9 @@ export interface PickedExif {
// HDR 相关
MPImageType?: Tags['MPImageType']
// 评分
Rating?: number
}
export interface ThumbnailResult {