1
Fork 0

Add units to exif data in UI

This commit is contained in:
viktorstrate 2020-02-24 23:48:32 +01:00
parent 96ec3663b1
commit b7e579f1bb
1 changed files with 10 additions and 1 deletions

View File

@ -88,8 +88,17 @@ const SidebarContent = ({ photo, hidePreview }) => {
) )
exif.dateShot = new Date(exif.dateShot).toLocaleString() exif.dateShot = new Date(exif.dateShot).toLocaleString()
if (exif.exposureProgram) if (exif.exposureProgram) {
exif.exposureProgram = exposurePrograms[exif.exposureProgram] exif.exposureProgram = exposurePrograms[exif.exposureProgram]
}
if (exif.aperture) {
exif.aperture = `f/${exif.aperture}`
}
if (exif.focalLength) {
exif.focalLength = `${exif.focalLength}mm`
}
exif.exposureProgram = exifItems = exifKeys.map(key => ( exif.exposureProgram = exifItems = exifKeys.map(key => (
<SidebarItem key={key} name={exifNameLookup[key]} value={exif[key]} /> <SidebarItem key={key} name={exifNameLookup[key]} value={exif[key]} />