feat(frontend): click to expand preview in document details
This commit is contained in:
parent
ade6422e95
commit
e949d60eb0
|
|
@ -345,15 +345,37 @@ const DocumentDetailsPage: React.FC = () => {
|
||||||
<img
|
<img
|
||||||
src={thumbnailUrl}
|
src={thumbnailUrl}
|
||||||
alt={document.original_filename}
|
alt={document.original_filename}
|
||||||
|
onClick={handleViewDocument}
|
||||||
style={{
|
style={{
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
maxHeight: '200px',
|
maxHeight: '200px',
|
||||||
borderRadius: '8px',
|
borderRadius: '8px',
|
||||||
objectFit: 'contain',
|
objectFit: 'contain',
|
||||||
|
cursor: 'pointer',
|
||||||
|
transition: 'transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out',
|
||||||
|
}}
|
||||||
|
onMouseEnter={(e) => {
|
||||||
|
e.currentTarget.style.transform = 'scale(1.02)';
|
||||||
|
e.currentTarget.style.boxShadow = '0 4px 12px rgba(0,0,0,0.15)';
|
||||||
|
}}
|
||||||
|
onMouseLeave={(e) => {
|
||||||
|
e.currentTarget.style.transform = 'scale(1)';
|
||||||
|
e.currentTarget.style.boxShadow = 'none';
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
getFileIcon(document.mime_type)
|
<Box
|
||||||
|
onClick={handleViewDocument}
|
||||||
|
sx={{
|
||||||
|
cursor: 'pointer',
|
||||||
|
transition: 'transform 0.2s ease-in-out',
|
||||||
|
'&:hover': {
|
||||||
|
transform: 'scale(1.02)',
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{getFileIcon(document.mime_type)}
|
||||||
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue