always show buttons for stable and dev

This commit is contained in:
MichaelDvP
2025-03-30 14:11:02 +02:00
parent 006e5493e2
commit 77465ebe81

View File

@@ -223,8 +223,8 @@ const Version = () => {
</Dialog>
);
const showFirmwareDialog = (useDevVersion?: boolean) => {
setFetchDevVersion(useDevVersion || usingDevVersion);
const showFirmwareDialog = (useDevVersion: boolean) => {
setFetchDevVersion(useDevVersion);
setOpenInstallDialog(true);
};
@@ -232,7 +232,7 @@ const Version = () => {
setOpenInstallDialog(false);
};
const showButtons = (showDev?: boolean) => {
const showButtons = (showDev: boolean) => {
if (!me.admin) {
return;
}
@@ -260,13 +260,13 @@ const Version = () => {
variant="outlined"
color="warning"
size="small"
onClick={() =>
showFirmwareDialog(upgradeAvailable || (!usingDevVersion && showDev))
}
onClick={() => showFirmwareDialog(showDev)}
>
{upgradeAvailable || (!usingDevVersion && showDev)
? LL.UPGRADE()
: LL.REINSTALL()}
: !showDev && usingDevVersion
? LL.STABLE()
: LL.REINSTALL()}
&hellip;
</Button>
);
@@ -397,7 +397,7 @@ const Version = () => {
{formatTimeAgo(new Date(latestVersion.published_at))})
</Typography>
)}
{!usingDevVersion && showButtons(false)}
{showButtons(false)}
</Typography>
</Grid>