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
All checks were successful
Automated Container Build / build-and-push (push) Successful in 27s
This commit is contained in:
parent
e56370a446
commit
6ee4f56e1e
1 changed files with 2 additions and 9 deletions
|
|
@ -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' }}
|
||||
|
|
|
|||
Reference in a new issue