mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
always show buttons for stable and dev
This commit is contained in:
@@ -223,8 +223,8 @@ const Version = () => {
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
|
||||||
const showFirmwareDialog = (useDevVersion?: boolean) => {
|
const showFirmwareDialog = (useDevVersion: boolean) => {
|
||||||
setFetchDevVersion(useDevVersion || usingDevVersion);
|
setFetchDevVersion(useDevVersion);
|
||||||
setOpenInstallDialog(true);
|
setOpenInstallDialog(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ const Version = () => {
|
|||||||
setOpenInstallDialog(false);
|
setOpenInstallDialog(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const showButtons = (showDev?: boolean) => {
|
const showButtons = (showDev: boolean) => {
|
||||||
if (!me.admin) {
|
if (!me.admin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -260,13 +260,13 @@ const Version = () => {
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
color="warning"
|
color="warning"
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() =>
|
onClick={() => showFirmwareDialog(showDev)}
|
||||||
showFirmwareDialog(upgradeAvailable || (!usingDevVersion && showDev))
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{upgradeAvailable || (!usingDevVersion && showDev)
|
{upgradeAvailable || (!usingDevVersion && showDev)
|
||||||
? LL.UPGRADE()
|
? LL.UPGRADE()
|
||||||
: LL.REINSTALL()}
|
: !showDev && usingDevVersion
|
||||||
|
? LL.STABLE()
|
||||||
|
: LL.REINSTALL()}
|
||||||
…
|
…
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
@@ -397,7 +397,7 @@ const Version = () => {
|
|||||||
{formatTimeAgo(new Date(latestVersion.published_at))})
|
{formatTimeAgo(new Date(latestVersion.published_at))})
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{!usingDevVersion && showButtons(false)}
|
{showButtons(false)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user