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> </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()}
&hellip; &hellip;
</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>