diff --git a/frontend/src/components/documents/DocumentDetailModal.tsx b/frontend/src/components/documents/DocumentDetailModal.tsx index 118d934e..46e5824c 100644 --- a/frontend/src/components/documents/DocumentDetailModal.tsx +++ b/frontend/src/components/documents/DocumentDetailModal.tsx @@ -268,19 +268,19 @@ export function DocumentDetailModal({ {/* Content Area */} -
- {/* Desktop Layout: Side-by-side */} -
- {/* Preview Panel (Left) */} - {documentHasFile && ( -
- {renderPreview()} -
- )} +
+ {/* One preview instance shared by mobile and desktop layouts. */} + {documentHasFile && ( +
+ {renderPreview()} +
+ )} - {/* Info Panel (Right) */} - {!(documentHasFile && isFullscreen) && ( -
+ {/* Desktop Info Panel (Right) */} + {!(documentHasFile && isFullscreen) && ( +
{/* Desktop Tabs */}
)}
-
- )} -
+
+ )} {/* Mobile Layout: Tabs */} -
- {currentActiveTab === "preview" && ( -
{renderPreview()}
- )} - +
{currentActiveTab === "info" && (
diff --git a/frontend/src/components/documents/DocumentPreview.tsx b/frontend/src/components/documents/DocumentPreview.tsx index c755f71f..d27b8fd5 100644 --- a/frontend/src/components/documents/DocumentPreview.tsx +++ b/frontend/src/components/documents/DocumentPreview.tsx @@ -396,15 +396,20 @@ export function DocumentPreviewPane({ fileUrl, fileName, className = "" }: Docum )} {previewType === "image" && ( -
+
{loading && } {error && } {fileName} setLoading(false)} onError={() => {