|
|
@ -2,6 +2,7 @@ import { Box, Divider, List, ListItem } from '@mui/material'; |
|
|
|
import * as prettyBytes from 'pretty-bytes'; |
|
|
|
import * as prettyBytes from 'pretty-bytes'; |
|
|
|
|
|
|
|
|
|
|
|
import { DIVIDER } from '../../lib/consts/DEFAULT_THEME'; |
|
|
|
import { DIVIDER } from '../../lib/consts/DEFAULT_THEME'; |
|
|
|
|
|
|
|
import { UPLOAD_FILE_TYPES } from '../../lib/consts/UPLOAD_FILE_TYPES'; |
|
|
|
|
|
|
|
|
|
|
|
import { BodyText } from '../Text'; |
|
|
|
import { BodyText } from '../Text'; |
|
|
|
|
|
|
|
|
|
|
@ -19,22 +20,28 @@ const FileList = ({ filesOverview }: FileListProps): JSX.Element => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<ListItem button key={fileUUID}> |
|
|
|
<ListItem key={fileUUID} sx={{ padding: '.6em 0' }}> |
|
|
|
<Box |
|
|
|
<Box |
|
|
|
sx={{ |
|
|
|
sx={{ |
|
|
|
display: 'flex', |
|
|
|
display: 'flex', |
|
|
|
flexDirection: 'row', |
|
|
|
flexDirection: { xs: 'column', md: 'row' }, |
|
|
|
width: '100%', |
|
|
|
width: '100%', |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
<Box sx={{ p: 1, flexGrow: 1 }}> |
|
|
|
<Box sx={{ flexGrow: 1 }}> |
|
|
|
<Box |
|
|
|
<Box |
|
|
|
sx={{ |
|
|
|
sx={{ |
|
|
|
display: 'flex', |
|
|
|
display: 'flex', |
|
|
|
flexDirection: 'row', |
|
|
|
flexDirection: 'row', |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
<BodyText text={fileName} /> |
|
|
|
<BodyText |
|
|
|
|
|
|
|
sx={{ |
|
|
|
|
|
|
|
fontFamily: 'Source Code Pro', |
|
|
|
|
|
|
|
fontWeight: 400, |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
text={fileName} |
|
|
|
|
|
|
|
/> |
|
|
|
<Divider |
|
|
|
<Divider |
|
|
|
flexItem |
|
|
|
flexItem |
|
|
|
orientation="vertical" |
|
|
|
orientation="vertical" |
|
|
@ -44,7 +51,9 @@ const FileList = ({ filesOverview }: FileListProps): JSX.Element => { |
|
|
|
marginRight: '.5em', |
|
|
|
marginRight: '.5em', |
|
|
|
}} |
|
|
|
}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<BodyText text={fileType} /> |
|
|
|
<BodyText |
|
|
|
|
|
|
|
text={UPLOAD_FILE_TYPES.get(fileType)?.[1] ?? ''} |
|
|
|
|
|
|
|
/> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
<BodyText text={fileSize} /> |
|
|
|
<BodyText text={fileSize} /> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
@ -55,7 +64,13 @@ const FileList = ({ filesOverview }: FileListProps): JSX.Element => { |
|
|
|
flexDirection: 'row', |
|
|
|
flexDirection: 'row', |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
<BodyText text={fileChecksum} /> |
|
|
|
<BodyText |
|
|
|
|
|
|
|
sx={{ |
|
|
|
|
|
|
|
fontFamily: 'Source Code Pro', |
|
|
|
|
|
|
|
fontWeight: 400, |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
text={fileChecksum} |
|
|
|
|
|
|
|
/> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
</ListItem> |
|
|
|
</ListItem> |
|
|
|