diff --git a/CHANGELOG.md b/CHANGELOG.md index cca73e202..7f13f08b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ All notable changes to **omp-web** (`@kahme247/ompweb`) are documented in this f ### Added +- **Download images from the image viewer.** The full-screen preview's toolbar now includes Download, using the original image rather than its thumbnail. External images may open in a new tab instead when the browser disallows cross-origin downloads. - **Upgrades check the session omp before they switch.** `ompweb preflight` resolves omp exactly as the host does for a new session (`OMP_WEB_OMP_BIN` or this version's downloaded `ompweb-omp`), starts it headless with `--no-session`, and waits up to 30 s for its hello: it prints `preflight ok: `, or exits 1 naming the binary and why (not found, not executable, exited with its code, or no hello with omp's last stderr). The host updater and the web app's in-app update run the new release's preflight in the live environment before they stop anything, and abort with the current install still running when it fails. Before the preflight, both run the new release's `ompweb fetch-omp`, so its runner is in place first. A release without the preflight command is checked only if it ships `ompweb-omp`; then the update fails. - **Rename the cluster.** Settings → Hosts shows the cluster's name with a **Rename cluster** button; the sidebar group follows. The cluster is still created as "Cluster" when the first host joins, so rename it afterwards. `PATCH /api/hosts { poolId, label }` renames a pool without replacing the pool registry. - **Cluster members use this machine's omp configuration.** diff --git a/components/ImageLightbox.tsx b/components/ImageLightbox.tsx index d22d8429d..d885e8baf 100644 --- a/components/ImageLightbox.tsx +++ b/components/ImageLightbox.tsx @@ -2,7 +2,7 @@ import { useEffect, useLayoutEffect, useRef, useState, type ImgHTMLAttributes } from "react"; import { createPortal } from "react-dom"; -import { Maximize } from "lucide-react"; +import { Download, Maximize } from "lucide-react"; import { useI18n } from "@/lib/i18n"; const ZOOM_MAX = 8; @@ -89,7 +89,7 @@ export function ClickableImage({ src, fullSrc, alt, ...imgProps }: ClickableImag ); } -function ImageLightbox({ src, alt, onClose }: { src: ClickableImageProps["src"]; alt: string; onClose: () => void }) { +function ImageLightbox({ src, alt, onClose }: { src: string; alt: string; onClose: () => void }) { const dialogRef = useRef(null); const viewportRef = useRef(null); // "fit" follows the window as it resizes; a number is a zoom the user chose. @@ -231,6 +231,17 @@ function ImageLightbox({ src, alt, onClose }: { src: ClickableImageProps["src"]; > 1:1 + +