mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-06-15 12:26:33 +03:00
remove downloadonly
This commit is contained in:
@@ -258,7 +258,6 @@ const InstallDialog = memo(
|
|||||||
latestVersion,
|
latestVersion,
|
||||||
latestDevVersion,
|
latestDevVersion,
|
||||||
upgradeImportantMessageType,
|
upgradeImportantMessageType,
|
||||||
downloadOnly,
|
|
||||||
platform,
|
platform,
|
||||||
LL,
|
LL,
|
||||||
onClose,
|
onClose,
|
||||||
@@ -269,7 +268,6 @@ const InstallDialog = memo(
|
|||||||
latestVersion: VersionInfo | undefined;
|
latestVersion: VersionInfo | undefined;
|
||||||
latestDevVersion: VersionInfo | undefined;
|
latestDevVersion: VersionInfo | undefined;
|
||||||
upgradeImportantMessageType: number;
|
upgradeImportantMessageType: number;
|
||||||
downloadOnly: boolean;
|
|
||||||
platform: string;
|
platform: string;
|
||||||
LL: TranslationFunctions;
|
LL: TranslationFunctions;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
@@ -292,7 +290,7 @@ const InstallDialog = memo(
|
|||||||
<DialogContent dividers>
|
<DialogContent dividers>
|
||||||
<Typography sx={{ mb: 2 }}>
|
<Typography sx={{ mb: 2 }}>
|
||||||
{LL.INSTALL_VERSION(
|
{LL.INSTALL_VERSION(
|
||||||
downloadOnly ? LL.DOWNLOAD(1) : LL.INSTALL(),
|
LL.INSTALL(),
|
||||||
fetchDevVersion ? latestDevVersion?.version : latestVersion?.version
|
fetchDevVersion ? latestDevVersion?.version : latestVersion?.version
|
||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -342,7 +340,6 @@ 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"
|
||||||
@@ -351,7 +348,6 @@ const InstallDialog = memo(
|
|||||||
>
|
>
|
||||||
{LL.INSTALL()}
|
{LL.INSTALL()}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
@@ -430,7 +426,6 @@ const Version = () => {
|
|||||||
useState<boolean>(false);
|
useState<boolean>(false);
|
||||||
|
|
||||||
const [fetchDevVersion, setFetchDevVersion] = useState<boolean>(false);
|
const [fetchDevVersion, setFetchDevVersion] = 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);
|
||||||
|
|
||||||
@@ -460,16 +455,7 @@ const Version = () => {
|
|||||||
toast.error(String(error.error?.message || 'An error occurred'));
|
toast.error(String(error.error?.message || 'An error occurred'));
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
const { data, send: loadData, error } = useRequest(SystemApi.readSystemStatus);
|
||||||
data,
|
|
||||||
send: loadData,
|
|
||||||
error
|
|
||||||
} = useRequest(SystemApi.readSystemStatus).onSuccess((event) => {
|
|
||||||
const systemData = event.data as VersionData;
|
|
||||||
if (systemData.arduino_version.startsWith('Tasmota')) {
|
|
||||||
setDownloadOnly(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const { send: sendUploadURL } = useRequest(
|
const { send: sendUploadURL } = useRequest(
|
||||||
(url: string) => callAction({ action: 'uploadURL', param: url }),
|
(url: string) => callAction({ action: 'uploadURL', param: url }),
|
||||||
@@ -842,7 +828,6 @@ const Version = () => {
|
|||||||
latestVersion={latestVersion}
|
latestVersion={latestVersion}
|
||||||
latestDevVersion={latestDevVersion}
|
latestDevVersion={latestDevVersion}
|
||||||
upgradeImportantMessageType={upgradeImportantMessageType}
|
upgradeImportantMessageType={upgradeImportantMessageType}
|
||||||
downloadOnly={downloadOnly}
|
|
||||||
platform={platform}
|
platform={platform}
|
||||||
LL={LL}
|
LL={LL}
|
||||||
onClose={closeInstallDialog}
|
onClose={closeInstallDialog}
|
||||||
|
|||||||
Reference in New Issue
Block a user