ente/src/pages/gallery/components/UploadProgress.tsx

31 lines
1 KiB
TypeScript
Raw Normal View History

2021-01-05 11:12:02 +00:00
import Container from 'components/Container';
import React from 'react';
import { Alert, Button, Modal, ProgressBar } from 'react-bootstrap';
2021-01-06 03:45:49 +00:00
export default function UploadProgress(props) {
return (
<Modal
{...props}
size='lg'
aria-labelledby='contained-modal-title-vcenter'
centered
>
<Modal.Header closeButton>
<Modal.Title id='contained-modal-title-vcenter'>
Uploading Files
2021-01-05 11:12:02 +00:00
</Modal.Title>
</Modal.Header>
<Modal.Body>
{props.now == 100 ? (
<Alert variant='success'>Upload Completed</Alert>
) : (
2021-01-12 06:59:37 +00:00
<>
<Alert variant='info'>{props.uploadStage} {props.fileCounter.current} of {props.fileCounter.total}</Alert>
<ProgressBar animated now={props.now} />
</>
)}
</Modal.Body>
</Modal>
);
2021-01-05 11:12:02 +00:00
}