diff --git a/frontend/src/components/Media/MediaInfoPanel.tsx b/frontend/src/components/Media/MediaInfoPanel.tsx index c192aef4b..9fda0fac9 100644 --- a/frontend/src/components/Media/MediaInfoPanel.tsx +++ b/frontend/src/components/Media/MediaInfoPanel.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { motion, AnimatePresence } from 'framer-motion'; import { open } from '@tauri-apps/plugin-shell'; import { X, @@ -49,131 +50,136 @@ export const MediaInfoPanel: React.FC = ({ const handleLocationClick = async () => { if (currentImage?.metadata?.latitude && currentImage?.metadata?.longitude) { const { latitude, longitude } = currentImage.metadata; - const url = `https://maps.google.com/?q=${latitude},${longitude}`; try { - await open(url); + await open(`https://maps.google.com/?q=${latitude},${longitude}`); } catch (error) { console.error('Failed to open map URL:', error); } } }; - if (!show) return null; - return ( -
-
-

Image Details

- -
- -
-
-
- -
-
-

Name

-

+

Image Details

+
-
-
-
- -
-
-

Date

-

{getFormattedDate()}

-
-
+
+
+
+ +
+
+

Name

+

+ {getImageName()} +

+
+
-
-
- -
-
-

Location

- {currentImage?.metadata?.latitude && - currentImage?.metadata?.longitude ? ( - - ) : ( -

Location not available

- )} -
-
+
+
+ +
+
+

Date

+

{getFormattedDate()}

+
+
-
-
- -
-
-

Tags

- {currentImage?.tags && currentImage.tags.length > 0 ? ( -
- {currentImage.tags.map((tag, i) => ( - +
+ +
+
+

Location

+ {currentImage?.metadata?.latitude && + currentImage?.metadata?.longitude ? ( + + ) : ( +

Location not available

+ )}
- ) : ( -

No tags available

- )} -
-
+
-
-
- -
-
-

Position

-

- {currentIndex + 1} of {totalImages} -

-
-
+
+
+ +
+
+

Tags

+ {currentImage?.tags?.length ? ( +
+ {currentImage.tags.map((tag, i) => ( + + {tag} + + ))} +
+ ) : ( +

No tags available

+ )} +
+
-
- -
-
-
+
+
+ +
+
+

Position

+

+ {currentIndex + 1} of {totalImages} +

+
+
+ +
+ +
+
+ + )} + ); };