mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
formatting
This commit is contained in:
@@ -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">
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user