diff --git a/frontend/src/components/ThumbnailImage.tsx b/frontend/src/components/ThumbnailImage.tsx index ae97ec8..81f6282 100644 --- a/frontend/src/components/ThumbnailImage.tsx +++ b/frontend/src/components/ThumbnailImage.tsx @@ -19,13 +19,7 @@ export default function ThumbnailImage({ checksum, fallbackIcon, downloadToken, setErrorCount(0); }, [checksum]); - const docStyle = docType === 'docs' - ? 'h-[85%] max-w-[85%] aspect-[1/1.4] bg-white border border-gray-300 dark:border-gray-600 shadow-md' - : docType === 'slides' - ? 'w-[85%] max-h-[85%] aspect-[16/9] bg-white border border-gray-300 dark:border-gray-600 shadow-md' - : docType === 'sheets' - ? 'w-[85%] max-h-[85%] aspect-[1.4/1] bg-white border border-gray-300 dark:border-gray-600 shadow-md' - : docType === 'pdf' + const docStyle = docType ? 'w-full h-full rounded-md overflow-hidden bg-white' : 'w-full h-full'; @@ -35,8 +29,7 @@ export default function ThumbnailImage({ checksum, fallbackIcon, downloadToken, src={downloadToken ? `${api.getThumbnailUrl(checksum, downloadToken)}${errorCount > 0 ? `&t=${key}` : ''}` : ''} alt="" className={`${ - docType === 'pdf' ? 'w-full h-full object-cover object-top' : - docType ? 'w-full h-full object-cover mix-blend-multiply' : + docType ? 'w-full h-full object-cover object-top' : 'object-contain w-full h-full' }`} style={{ display: showFallback ? 'none' : 'block' }}