mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
fixes #2497 - showFirmwareDialog() was missing argument
This commit is contained in:
@@ -172,55 +172,59 @@ const Version = () => {
|
|||||||
|
|
||||||
useLayoutTitle('EMS-ESP Firmware');
|
useLayoutTitle('EMS-ESP Firmware');
|
||||||
|
|
||||||
const renderInstallDialog = () => (
|
const renderInstallDialog = () => {
|
||||||
<Dialog
|
const binURL = getBinURL();
|
||||||
sx={dialogStyle}
|
|
||||||
open={openInstallDialog}
|
return (
|
||||||
onClose={() => closeInstallDialog()}
|
<Dialog
|
||||||
>
|
sx={dialogStyle}
|
||||||
<DialogTitle>
|
open={openInstallDialog}
|
||||||
{LL.INSTALL() +
|
onClose={() => closeInstallDialog()}
|
||||||
' ' +
|
>
|
||||||
(usingDevVersion ? LL.DEVELOPMENT() : LL.STABLE()) +
|
<DialogTitle>
|
||||||
' Firmware'}
|
{LL.INSTALL() +
|
||||||
</DialogTitle>
|
' ' +
|
||||||
<DialogContent dividers>
|
(usingDevVersion ? LL.DEVELOPMENT() : LL.STABLE()) +
|
||||||
<Typography mb={2}>
|
' Firmware'}
|
||||||
{LL.INSTALL_VERSION(
|
</DialogTitle>
|
||||||
usingDevVersion ? latestDevVersion?.name : latestVersion?.name
|
<DialogContent dividers>
|
||||||
)}
|
<Typography mb={2}>
|
||||||
</Typography>
|
{LL.INSTALL_VERSION(
|
||||||
</DialogContent>
|
usingDevVersion ? latestDevVersion?.name : latestVersion?.name
|
||||||
<DialogActions>
|
)}
|
||||||
<Button
|
</Typography>
|
||||||
startIcon={<CancelIcon />}
|
</DialogContent>
|
||||||
variant="outlined"
|
<DialogActions>
|
||||||
onClick={() => closeInstallDialog()}
|
<Button
|
||||||
color="secondary"
|
startIcon={<CancelIcon />}
|
||||||
>
|
variant="outlined"
|
||||||
{LL.CANCEL()}
|
onClick={() => closeInstallDialog()}
|
||||||
</Button>
|
color="secondary"
|
||||||
<Button
|
>
|
||||||
startIcon={<DownloadIcon />}
|
{LL.CANCEL()}
|
||||||
variant="outlined"
|
</Button>
|
||||||
onClick={() => closeInstallDialog()}
|
<Button
|
||||||
color="primary"
|
startIcon={<DownloadIcon />}
|
||||||
>
|
variant="outlined"
|
||||||
<Link underline="none" target="_blank" href={getBinURL()} color="primary">
|
onClick={() => closeInstallDialog()}
|
||||||
{LL.DOWNLOAD(1)}
|
color="primary"
|
||||||
</Link>
|
>
|
||||||
</Button>
|
<Link underline="none" target="_blank" href={binURL} color="primary">
|
||||||
<Button
|
{LL.DOWNLOAD(1)}
|
||||||
startIcon={<WarningIcon color="warning" />}
|
</Link>
|
||||||
variant="outlined"
|
</Button>
|
||||||
onClick={() => installFirmwareURL(getBinURL())}
|
<Button
|
||||||
color="primary"
|
startIcon={<WarningIcon color="warning" />}
|
||||||
>
|
variant="outlined"
|
||||||
{LL.INSTALL()}
|
onClick={() => installFirmwareURL(binURL)}
|
||||||
</Button>
|
color="primary"
|
||||||
</DialogActions>
|
>
|
||||||
</Dialog>
|
{LL.INSTALL()}
|
||||||
);
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const showFirmwareDialog = (useDevVersion?: boolean) => {
|
const showFirmwareDialog = (useDevVersion?: boolean) => {
|
||||||
setUsingDevVersion(useDevVersion || usingDevVersion);
|
setUsingDevVersion(useDevVersion || usingDevVersion);
|
||||||
@@ -260,7 +264,7 @@ const Version = () => {
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
color="warning"
|
color="warning"
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => showFirmwareDialog()}
|
onClick={() => showFirmwareDialog(showDev)}
|
||||||
>
|
>
|
||||||
{upgradeAvailable || (!usingDevVersion && showDev)
|
{upgradeAvailable || (!usingDevVersion && showDev)
|
||||||
? LL.UPGRADE()
|
? LL.UPGRADE()
|
||||||
|
|||||||
Reference in New Issue
Block a user