fix: show loading spinner instead of error for HEIC preview, default fullscreen details to visible

Replace static "Preview not available" and "Cannot preview this image
format" messages with a loading spinner in ImageViewer and SplitCanvas,
since HEIC files get server-side conversion and the preview appears
after a few seconds. Also default showDetails to true on /fullscreen.
This commit is contained in:
ashim-hq
2026-04-19 20:38:51 +08:00
parent 5c897f3c1d
commit fc98037eb1
3 changed files with 10 additions and 10 deletions
@@ -88,9 +88,10 @@ export function SplitCanvas() {
if (loadError) {
return (
<div className="flex flex-col items-center justify-center h-full gap-2 text-center p-4">
<p className="text-sm text-muted-foreground">Cannot preview this image format</p>
<p className="text-xs text-muted-foreground">{filename}</p>
<div className="flex flex-col items-center justify-center h-full gap-3 text-center p-4">
<Loader2 className="h-8 w-8 text-muted-foreground animate-spin" />
<p className="text-sm text-muted-foreground">Loading preview...</p>
<p className="text-xs text-muted-foreground/60">{filename}</p>
</div>
);
}