remove old named files
This commit is contained in:
parent
4fd6c68a44
commit
a985fe4bf6
|
@ -1,43 +0,0 @@
|
|||
import React from 'react';
|
||||
import FileList from 'components/FileList';
|
||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
||||
import { InProgressItemContainer } from './styledComponents';
|
||||
import { FileProgresses } from '.';
|
||||
import {
|
||||
SectionInfo,
|
||||
UploadProgressSection,
|
||||
UploadProgressSectionContent,
|
||||
UploadProgressSectionTitle,
|
||||
} from './section';
|
||||
|
||||
export interface InProgressProps {
|
||||
filenames: Map<number, string>;
|
||||
sectionTitle: string;
|
||||
fileProgressStatuses: FileProgresses[];
|
||||
sectionInfo?: any;
|
||||
}
|
||||
export const InProgressSection = (props: InProgressProps) => {
|
||||
const fileList = props.fileProgressStatuses ?? [];
|
||||
|
||||
return (
|
||||
<UploadProgressSection defaultExpanded>
|
||||
<UploadProgressSectionTitle expandIcon={<ExpandMoreIcon />}>
|
||||
{props.sectionTitle}
|
||||
</UploadProgressSectionTitle>
|
||||
<UploadProgressSectionContent>
|
||||
{props.sectionInfo && (
|
||||
<SectionInfo>{props.sectionInfo}</SectionInfo>
|
||||
)}
|
||||
<FileList
|
||||
fileList={fileList.map(({ fileID, progress }) => (
|
||||
<InProgressItemContainer key={fileID}>
|
||||
<span>{props.filenames.get(fileID)}</span>
|
||||
<span className="separator">{`-`}</span>
|
||||
<span>{`${progress}%`}</span>
|
||||
</InProgressItemContainer>
|
||||
))}
|
||||
/>
|
||||
</UploadProgressSectionContent>
|
||||
</UploadProgressSection>
|
||||
);
|
||||
};
|
|
@ -1,45 +0,0 @@
|
|||
import React from 'react';
|
||||
import FileList from 'components/FileList';
|
||||
import { Typography } from '@mui/material';
|
||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
||||
import { ResultItemContainer } from './styledComponents';
|
||||
import { FileUploadResults } from 'constants/upload';
|
||||
import {
|
||||
SectionInfo,
|
||||
UploadProgressSection,
|
||||
UploadProgressSectionContent,
|
||||
UploadProgressSectionTitle,
|
||||
} from './section';
|
||||
|
||||
export interface ResultSectionProps {
|
||||
filenames: Map<number, string>;
|
||||
fileUploadResultMap: Map<FileUploadResults, number[]>;
|
||||
fileUploadResult: FileUploadResults;
|
||||
sectionTitle: any;
|
||||
sectionInfo?: any;
|
||||
}
|
||||
export const ResultSection = (props: ResultSectionProps) => {
|
||||
const fileList = props.fileUploadResultMap?.get(props.fileUploadResult);
|
||||
if (!fileList?.length) {
|
||||
return <></>;
|
||||
}
|
||||
return (
|
||||
<UploadProgressSection>
|
||||
<UploadProgressSectionTitle expandIcon={<ExpandMoreIcon />}>
|
||||
<Typography> {props.sectionTitle}</Typography>
|
||||
</UploadProgressSectionTitle>
|
||||
<UploadProgressSectionContent>
|
||||
{props.sectionInfo && (
|
||||
<SectionInfo>{props.sectionInfo}</SectionInfo>
|
||||
)}
|
||||
<FileList
|
||||
fileList={fileList.map((fileID) => (
|
||||
<ResultItemContainer key={fileID}>
|
||||
{props.filenames.get(fileID)}
|
||||
</ResultItemContainer>
|
||||
))}
|
||||
/>
|
||||
</UploadProgressSectionContent>
|
||||
</UploadProgressSection>
|
||||
);
|
||||
};
|
Loading…
Reference in a new issue