formatting

This commit is contained in:
proddy
2024-08-15 12:27:50 +02:00
parent 817b2d1ad7
commit e0765f1c5b
2 changed files with 22 additions and 25 deletions

View File

@@ -197,18 +197,6 @@ const UploadDownload = () => {
)} )}
</Box> </Box>
<Typography sx={{ pt: 2, pb: 2 }} variant="h6" color="primary">
{LL.UPLOAD()}
</Typography>
<Box mb={2} color="warning.main">
<Typography variant="body2">
{LL.UPLOAD_TEXT()}
<br />
<br />
{LL.RESTART_TEXT(1)}.
</Typography>
</Box>
<SingleUpload /> <SingleUpload />
<Typography sx={{ pt: 4, pb: 2 }} variant="h6" color="primary"> <Typography sx={{ pt: 4, pb: 2 }} variant="h6" color="primary">

View File

@@ -36,7 +36,6 @@ const SingleUpload = () => {
setFile(undefined); setFile(undefined);
} else { } else {
setRestartNeeded(true); setRestartNeeded(true);
// setRestarting(true);
} }
}); });
@@ -68,9 +67,15 @@ const SingleUpload = () => {
return ( return (
<> <>
<DragNdrop onFileSelected={setFile} width="340px" height="140px" /> <Typography sx={{ pt: 2, pb: 2 }} variant="h6" color="primary">
{LL.UPLOAD()}
</Typography>
{isUploading && ( <Box mb={2} color="warning.main">
<Typography variant="body2">{LL.UPLOAD_TEXT()}</Typography>
</Box>
{isUploading || restartNeeded ? (
<> <>
<Box width="100%" p={2}> <Box width="100%" p={2}>
<LinearProgress <LinearProgress
@@ -85,6 +90,7 @@ const SingleUpload = () => {
/> />
</Box> </Box>
{!restartNeeded && (
<Button <Button
sx={{ ml: 2 }} sx={{ ml: 2 }}
startIcon={<CancelIcon />} startIcon={<CancelIcon />}
@@ -94,7 +100,10 @@ const SingleUpload = () => {
> >
{LL.CANCEL()} {LL.CANCEL()}
</Button> </Button>
)}
</> </>
) : (
<DragNdrop onFileSelected={setFile} width="340px" height="140px" />
)} )}
{md5 && ( {md5 && (
@@ -104,7 +113,7 @@ const SingleUpload = () => {
)} )}
{restartNeeded && ( {restartNeeded && (
<MessageBox mt={4} level="warning" message={LL.RESTART_TEXT(0)}> <MessageBox mt={2} level="warning" message={LL.RESTART_TEXT(0)}>
<Button <Button
startIcon={<PowerSettingsNewIcon />} startIcon={<PowerSettingsNewIcon />}
variant="contained" variant="contained"