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>
<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 />
<Typography sx={{ pt: 4, pb: 2 }} variant="h6" color="primary">

View File

@@ -36,7 +36,6 @@ const SingleUpload = () => {
setFile(undefined);
} else {
setRestartNeeded(true);
// setRestarting(true);
}
});
@@ -68,9 +67,15 @@ const SingleUpload = () => {
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}>
<LinearProgress
@@ -85,16 +90,20 @@ const SingleUpload = () => {
/>
</Box>
<Button
sx={{ ml: 2 }}
startIcon={<CancelIcon />}
variant="outlined"
color="secondary"
onClick={cancelUpload}
>
{LL.CANCEL()}
</Button>
{!restartNeeded && (
<Button
sx={{ ml: 2 }}
startIcon={<CancelIcon />}
variant="outlined"
color="secondary"
onClick={cancelUpload}
>
{LL.CANCEL()}
</Button>
)}
</>
) : (
<DragNdrop onFileSelected={setFile} width="340px" height="140px" />
)}
{md5 && (
@@ -104,7 +113,7 @@ const SingleUpload = () => {
)}
{restartNeeded && (
<MessageBox mt={4} level="warning" message={LL.RESTART_TEXT(0)}>
<MessageBox mt={2} level="warning" message={LL.RESTART_TEXT(0)}>
<Button
startIcon={<PowerSettingsNewIcon />}
variant="contained"