remove check for downloadOnly

This commit is contained in:
proddy
2026-03-17 22:01:38 +01:00
parent 817b791e59
commit 40f371d23b

View File

@@ -274,7 +274,6 @@ const InstallDialog = memo(
fetchDevVersion, fetchDevVersion,
latestVersion, latestVersion,
latestDevVersion, latestDevVersion,
downloadOnly,
platform, platform,
LL, LL,
onClose, onClose,
@@ -284,7 +283,6 @@ const InstallDialog = memo(
fetchDevVersion: boolean; fetchDevVersion: boolean;
latestVersion?: VersionInfo; latestVersion?: VersionInfo;
latestDevVersion?: VersionInfo; latestDevVersion?: VersionInfo;
downloadOnly: boolean;
platform: string; platform: string;
LL: TranslationFunctions; LL: TranslationFunctions;
onClose: () => void; onClose: () => void;
@@ -309,7 +307,7 @@ const InstallDialog = memo(
<DialogContent dividers> <DialogContent dividers>
<Typography mb={2}> <Typography mb={2}>
{LL.INSTALL_VERSION( {LL.INSTALL_VERSION(
downloadOnly ? LL.DOWNLOAD(1) : LL.INSTALL(), LL.INSTALL(),
fetchDevVersion ? latestDevVersion?.name : latestVersion?.name fetchDevVersion ? latestDevVersion?.name : latestVersion?.name
)} )}
</Typography> </Typography>
@@ -333,16 +331,14 @@ const InstallDialog = memo(
{LL.DOWNLOAD(0)} {LL.DOWNLOAD(0)}
</Link> </Link>
</Button> </Button>
{!downloadOnly && ( <Button
<Button startIcon={<WarningIcon color="warning" />}
startIcon={<WarningIcon color="warning" />} variant="outlined"
variant="outlined" onClick={() => onInstall(binURL)}
onClick={() => onInstall(binURL)} color="primary"
color="primary" >
> {LL.INSTALL()}
{LL.INSTALL()} </Button>
</Button>
)}
</DialogActions> </DialogActions>
</Dialog> </Dialog>
); );
@@ -423,7 +419,6 @@ const Version = () => {
const [stableUpgradeAvailable, setStableUpgradeAvailable] = const [stableUpgradeAvailable, setStableUpgradeAvailable] =
useState<boolean>(false); useState<boolean>(false);
const [internetLive, setInternetLive] = useState<boolean>(false); const [internetLive, setInternetLive] = useState<boolean>(false);
const [downloadOnly, setDownloadOnly] = useState<boolean>(false);
const [showVersionInfo, setShowVersionInfo] = useState<number>(0); // 1 = stable, 2 = dev, 3 = partition const [showVersionInfo, setShowVersionInfo] = useState<number>(0); // 1 = stable, 2 = dev, 3 = partition
const [firmwareSize, setFirmwareSize] = useState<number>(0); const [firmwareSize, setFirmwareSize] = useState<number>(0);
@@ -449,9 +444,6 @@ const Version = () => {
error error
} = useRequest(SystemApi.readSystemStatus).onSuccess((event) => { } = useRequest(SystemApi.readSystemStatus).onSuccess((event) => {
const systemData = event.data as VersionData; const systemData = event.data as VersionData;
if (systemData.arduino_version.startsWith('Tasmota')) {
setDownloadOnly(true);
}
setUsingDevVersion(systemData.emsesp_version.includes('dev')); setUsingDevVersion(systemData.emsesp_version.includes('dev'));
}); });
@@ -815,7 +807,6 @@ const Version = () => {
fetchDevVersion={fetchDevVersion} fetchDevVersion={fetchDevVersion}
latestVersion={latestVersion} latestVersion={latestVersion}
latestDevVersion={latestDevVersion} latestDevVersion={latestDevVersion}
downloadOnly={downloadOnly}
platform={platform} platform={platform}
LL={LL} LL={LL}
onClose={closeInstallDialog} onClose={closeInstallDialog}
@@ -851,7 +842,6 @@ const Version = () => {
locale, locale,
openInstallDialog, openInstallDialog,
fetchDevVersion, fetchDevVersion,
downloadOnly,
me.admin, me.admin,
showButtons, showButtons,
handleVersionInfoClose, handleVersionInfoClose,