diff --git a/frontend/src/app/documents/page.tsx b/frontend/src/app/documents/page.tsx index e57678db..727672cc 100644 --- a/frontend/src/app/documents/page.tsx +++ b/frontend/src/app/documents/page.tsx @@ -658,21 +658,23 @@ export default function DocumentsPage() { isOpen={!!selectedDocument} onClose={() => setSelectedDocument(null)} title={selectedDocument?.title} - size="lg" + size="xl" showFullscreenToggle > {selectedDocument && ( -
- {/* Status Badge */} -
- -
+
+ {/* Left Column - Information */} +
+ {/* Status Badge */} +
+ +
- {/* Metadata Grid */} -
+ {/* Metadata Grid */} +
{/* Author */}
@@ -816,27 +818,6 @@ export default function DocumentsPage() {
)} - {/* Divider */} -
- - {/* File Action */} - {selectedDocument.file_url && ( -
- -
- )} - {/* Workflow Actions */}

Действия

@@ -880,6 +861,96 @@ export default function DocumentsPage() { />
)} +
+ + {/* Right Column - Document Thumbnail */} +
+
+ {selectedDocument.file_url && ( +
+
+

Превью документа

+
+ + {/* Thumbnail Content */} +
+ {(() => { + const fileExt = selectedDocument.file_name?.toLowerCase().split('.').pop() || ''; + const isImage = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'bmp'].includes(fileExt); + const isPDF = fileExt === 'pdf'; + + if (isImage) { + return ( + {selectedDocument.file_name { + // Fallback to icon on error + e.currentTarget.style.display = 'none'; + }} + /> + ); + } + + if (isPDF) { + return ( +
+