diff --git a/frontend/src/components/ImageLightbox.css b/frontend/src/components/ImageLightbox.css index 8ae60eb..d08dac9 100644 --- a/frontend/src/components/ImageLightbox.css +++ b/frontend/src/components/ImageLightbox.css @@ -16,3 +16,35 @@ object-fit: contain; border-radius: var(--radius); } + +.image-lightbox-actions { + position: absolute; + top: var(--sp-4); + right: var(--sp-4); + z-index: 1; + display: flex; + gap: 6px; + cursor: default; +} + +.image-lightbox-download, +.image-lightbox-close { + width: 32px; + height: 32px; + border-radius: var(--radius); + background: rgba(0, 0, 0, 0.5); + border: 1px solid rgba(255, 255, 255, 0.2); + color: #fff; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + font-size: 1.1rem; + line-height: 1; +} + +.image-lightbox-download:hover, +.image-lightbox-close:hover { + background: rgba(0, 0, 0, 0.7); + border-color: rgba(255, 255, 255, 0.4); +} diff --git a/frontend/src/components/ImageLightbox.tsx b/frontend/src/components/ImageLightbox.tsx index 5248642..d027ddb 100644 --- a/frontend/src/components/ImageLightbox.tsx +++ b/frontend/src/components/ImageLightbox.tsx @@ -11,6 +11,26 @@ export function ImageLightbox({ src, onClose }: ImageLightboxProps) { return (
+
e.stopPropagation()}> + {/* Bare `download` (no explicit filename) -- MessageImage doesn't + store an original filename, but the server response's own + Content-Type header is enough for the browser to infer a + sensible extension on its own. */} + + + + +
)