proddy
2024-08-17 12:37:11 +02:00
parent cf949a9c86
commit f576ee4fe6
2 changed files with 37 additions and 17 deletions

View File

@@ -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 = () => {
)}
</Box>
<SingleUpload setRestartNeeded={setRestartNeeded} />
<Typography sx={{ pt: 2, pb: 2 }} variant="h6" color="primary">
{LL.UPLOAD()}
</Typography>
{restartNeeded && (
<Box mb={2} color="warning.main">
<Typography variant="body2">{LL.UPLOAD_TEXT()}</Typography>
</Box>
{restartNeeded ? (
<MessageBox mt={2} level="warning" message={LL.RESTART_TEXT(0)}>
<Button
startIcon={<PowerSettingsNewIcon />}
@@ -312,6 +318,8 @@ const DownloadUpload = () => {
{LL.RESTART()}
</Button>
</MessageBox>
) : (
<SingleUpload setRestartNeeded={setRestartNeeded} />
)}
</>
);