mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(web): restore preview panel rendering for all file types
The home-page preview panel always rendered ImageViewer regardless of the uploaded file's modality, causing videos, audio, PDFs, and data files to show "Preview not available". Root cause: the preview branching only checked for a blob URL and assumed all files were images. Fix: branch on currentEntry.previewKind so the existing MediaPlayerView, DocumentView, and a file-info fallback are activated for their respective modalities. Also widen the AppLayout dropzone from image-only to all file types so non-image files can reach the home page in the first place.
This commit is contained in:
@@ -148,7 +148,9 @@ export function AppLayout({
|
||||
className={cn("flex-1 flex flex-col overflow-hidden", isMobile && "pt-12 pb-20")}
|
||||
>
|
||||
<div className="flex-1 overflow-y-auto p-6 flex items-center justify-center">
|
||||
{children || <Dropzone onFiles={onFiles} onUrlImport={onUrlImport} accept="image/*" />}
|
||||
{children || (
|
||||
<Dropzone onFiles={onFiles} onUrlImport={onUrlImport} fileFilter={() => true} />
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user