diff --git a/interface/src/app/settings/DownloadUpload.tsx b/interface/src/app/settings/DownloadUpload.tsx index a26c0de07..c5defa48e 100644 --- a/interface/src/app/settings/DownloadUpload.tsx +++ b/interface/src/app/settings/DownloadUpload.tsx @@ -89,12 +89,12 @@ const DownloadUpload = () => { // called immediately to get the latest version, on page load // set immediate to false to avoid calling the API on page load and GH blocking while testing! const { data: latestVersion } = useRequest(getStableVersion, { - immediate: true - // immediate: false + // immediate: true + immediate: false }); const { data: latestDevVersion } = useRequest(getDevVersion, { - immediate: true - // immediate: false + // immediate: true + immediate: false }); const STABLE_URL = 'https://github.com/emsesp/EMS-ESP32/releases/download/'; @@ -299,9 +299,15 @@ const DownloadUpload = () => { )} - + + {LL.UPLOAD()} + - {restartNeeded && ( + + {LL.UPLOAD_TEXT()} + + + {restartNeeded ? ( + ) : ( + )} ); diff --git a/interface/src/components/upload/SingleUpload.tsx b/interface/src/components/upload/SingleUpload.tsx index 72a8e9b63..126673f78 100644 --- a/interface/src/components/upload/SingleUpload.tsx +++ b/interface/src/components/upload/SingleUpload.tsx @@ -2,7 +2,13 @@ import { useEffect, useState } from 'react'; import { toast } from 'react-toastify'; import CancelIcon from '@mui/icons-material/Cancel'; -import { Box, Button, LinearProgress, Typography } from '@mui/material'; +import { + Box, + Button, + LinearProgress, + type LinearProgressProps, + Typography +} from '@mui/material'; import * as SystemApi from 'api/system'; @@ -11,6 +17,21 @@ import { useI18nContext } from 'i18n/i18n-react'; import DragNdrop from './DragNdrop'; +function LinearProgressWithLabel(props: LinearProgressProps & { value: number }) { + return ( + + + + + + {`${Math.round( + props.value + )}%`} + + + ); +} + const SingleUpload = ({ setRestartNeeded }) => { const [md5, setMd5] = useState(); const [file, setFile] = useState(); @@ -50,19 +71,10 @@ const SingleUpload = ({ setRestartNeeded }) => { return ( <> - - {LL.UPLOAD()} - - - - {LL.UPLOAD_TEXT()} - - {isUploading ? ( <> -