2021-01-05 11:12:02 +00:00
|
|
|
import React from 'react';
|
2021-01-13 04:14:01 +00:00
|
|
|
import { Alert, Modal, ProgressBar } from 'react-bootstrap';
|
2021-01-05 11:12:02 +00:00
|
|
|
|
2021-01-12 14:29:38 +00:00
|
|
|
export default function UploadProgress({ fileCounter, uploadStage, now, ...props }) {
|
2021-01-11 09:15:41 +00:00
|
|
|
return (
|
|
|
|
<Modal
|
|
|
|
{...props}
|
|
|
|
size='lg'
|
|
|
|
aria-labelledby='contained-modal-title-vcenter'
|
|
|
|
centered
|
2021-01-12 08:00:14 +00:00
|
|
|
backdrop="static"
|
2021-01-11 09:15:41 +00:00
|
|
|
>
|
2021-01-12 08:00:14 +00:00
|
|
|
<Modal.Header>
|
2021-01-11 09:15:41 +00:00
|
|
|
<Modal.Title id='contained-modal-title-vcenter'>
|
|
|
|
Uploading Files
|
2021-01-05 11:12:02 +00:00
|
|
|
</Modal.Title>
|
2021-01-11 09:15:41 +00:00
|
|
|
</Modal.Header>
|
|
|
|
<Modal.Body>
|
2021-01-15 06:40:12 +00:00
|
|
|
{now === 100 ? (
|
2021-01-11 09:15:41 +00:00
|
|
|
<Alert variant='success'>Upload Completed</Alert>
|
|
|
|
) : (
|
2021-01-12 06:59:37 +00:00
|
|
|
<>
|
2021-01-13 04:14:01 +00:00
|
|
|
<Alert variant='info'>{uploadStage} {fileCounter?.current} of {fileCounter?.total}</Alert>
|
2021-01-12 14:29:38 +00:00
|
|
|
<ProgressBar animated now={now} />
|
2021-01-12 06:59:37 +00:00
|
|
|
</>
|
2021-01-11 09:15:41 +00:00
|
|
|
)}
|
|
|
|
</Modal.Body>
|
|
|
|
</Modal>
|
|
|
|
);
|
2021-01-05 11:12:02 +00:00
|
|
|
}
|