mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user