Apply PDF thumbnail design (w-full h-full object-cover object-top) to all document types
All checks were successful
Automated Container Build / build-and-push (push) Successful in 27s

This commit is contained in:
Elijah 2026-06-15 16:41:14 -07:00
parent e56370a446
commit 6ee4f56e1e

View file

@ -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' }}