Fix PDF preview size to match standard aspect ratio
All checks were successful
Automated Container Build / build-and-push (push) Successful in 26s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 26s
This commit is contained in:
parent
467fe30704
commit
855c42edd9
1 changed files with 4 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ export default function FilePreview({ file, onClose, downloadToken }: FilePrevie
|
|||
exit={{ scale: 0.95, opacity: 0, y: 20 }}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className={`relative flex flex-col max-w-[95vw] max-h-[95vh] rounded-2xl overflow-hidden shadow-2xl ${
|
||||
(previewType === 'image' || previewType === 'video' || previewType === 'stl' || previewType === '3mf' || previewType === 'audio') ? 'w-fit' : 'w-full'
|
||||
(previewType === 'image' || previewType === 'video' || previewType === 'pdf' || previewType === 'stl' || previewType === '3mf' || previewType === 'audio') ? 'w-fit' : 'w-full'
|
||||
} ${
|
||||
(previewType === 'image' || previewType === 'video' || previewType === 'audio') ? 'h-fit' : 'h-full'
|
||||
}`}
|
||||
|
|
@ -158,7 +158,9 @@ export default function FilePreview({ file, onClose, downloadToken }: FilePrevie
|
|||
!downloadToken ? (
|
||||
<div className="flex items-center justify-center p-8"><Loader2 className="w-8 h-8 animate-spin text-accent" /></div>
|
||||
) : (
|
||||
<DynamicPdfViewer url={downloadUrl} />
|
||||
<div className="h-[90vh] aspect-[8.5/11] max-w-[95vw]">
|
||||
<DynamicPdfViewer url={downloadUrl} />
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
|
||||
|
|
|
|||
Reference in a new issue