mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
fixes to install
This commit is contained in:
@@ -137,14 +137,14 @@ const DownloadUpload = () => {
|
||||
const DEV_RELNOTES_URL =
|
||||
'https://github.com/emsesp/EMS-ESP32/blob/dev/CHANGELOG_LATEST.md';
|
||||
|
||||
const getBinURL = (useDev: boolean) => {
|
||||
const getBinURL = (useDevVersion: boolean) => {
|
||||
const filename =
|
||||
'EMS-ESP-' +
|
||||
(useDev ? latestDevVersion : latestVersion).replaceAll('.', '_') +
|
||||
(useDevVersion ? latestDevVersion : latestVersion).replaceAll('.', '_') +
|
||||
'-' +
|
||||
getPlatform() +
|
||||
'.bin';
|
||||
return useDev
|
||||
return useDevVersion
|
||||
? DEV_URL + filename
|
||||
: STABLE_URL + 'v' + latestVersion + '/' + filename;
|
||||
};
|
||||
@@ -262,8 +262,11 @@ const DownloadUpload = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const showFirmwareDialog = (useDev: boolean) => {
|
||||
setUseDev(useDev);
|
||||
// useDev = true to force using the dev version
|
||||
const showFirmwareDialog = (useDevVersion: boolean) => {
|
||||
if (useDevVersion || data.emsesp_version.includes('dev')) {
|
||||
setUseDev(true);
|
||||
}
|
||||
setOpenDialog(true);
|
||||
};
|
||||
|
||||
@@ -393,13 +396,15 @@ const DownloadUpload = () => {
|
||||
{upgradeAvailable ? LL.UPGRADE_AVAILABLE() : LL.LATEST_VERSION()}
|
||||
{upgradeAvailable && (
|
||||
<Button
|
||||
sx={{ ml: 2 }}
|
||||
sx={{ ml: 2, textTransform: 'none' }}
|
||||
size="small"
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
onClick={() => showFirmwareDialog(true)}
|
||||
onClick={() => showFirmwareDialog(false)}
|
||||
>
|
||||
{LL.INSTALL('v' + isDev ? latestDevVersion : latestVersion)}
|
||||
{isDev
|
||||
? LL.INSTALL('v' + latestDevVersion)
|
||||
: LL.INSTALL('v' + latestVersion)}
|
||||
</Button>
|
||||
)}
|
||||
</Typography>
|
||||
|
||||
@@ -335,7 +335,7 @@ const en: Translation = {
|
||||
SPECIAL_FUNCTIONS: 'Special Functions',
|
||||
WAIT_FIRMWARE: 'Please wait while the firmware is being uploaded. The device will restart automatically.', // TODO translate
|
||||
INSTALL_VERSION: 'This will install vesion {0}. Are you sure?', // TODO translate
|
||||
SWITCH_DEV: 'Switch to development version', // TODO translate
|
||||
SWITCH_DEV: 'switch to the development version', // TODO translate
|
||||
UPGRADE_AVAILABLE: 'There is a firmware upgrade available!', // TODO translate
|
||||
LATEST_VERSION: 'You are using the latest version.' // TODO translate
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ const fr: Translation = {
|
||||
SPECIAL_FUNCTIONS: 'Special Functions',
|
||||
WAIT_FIRMWARE: 'Please wait while the firmware is being uploaded. The device will restart automatically.', // TODO translate
|
||||
INSTALL_VERSION: 'This will install vesion {0}. Are you sure?', // TODO translate
|
||||
SWITCH_DEV: 'Switch to development version', // TODO translate
|
||||
SWITCH_DEV: 'switch to the development version', // TODO translate
|
||||
UPGRADE_AVAILABLE: 'There is a firmware upgrade available!', // TODO translate
|
||||
LATEST_VERSION: 'You are using the latest version.' // TODO translate // TODO translate
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ const it: Translation = {
|
||||
SPECIAL_FUNCTIONS: 'Special Functions', // TODO translate
|
||||
WAIT_FIRMWARE: 'Please wait while the firmware is being uploaded. The device will restart automatically.', // TODO translate
|
||||
INSTALL_VERSION: 'This will install vesion {0}. Are you sure?', // TODO translate
|
||||
SWITCH_DEV: 'Switch to development version', // TODO translate
|
||||
SWITCH_DEV: 'switch to the development version', // TODO translate
|
||||
UPGRADE_AVAILABLE: 'There is a firmware upgrade available!', // TODO translate
|
||||
LATEST_VERSION: 'You are using the latest version.' // TODO translate
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ const nl: Translation = {
|
||||
SPECIAL_FUNCTIONS: 'Special Functions', // TODO translate
|
||||
WAIT_FIRMWARE: 'Please wait while the firmware is being uploaded. The device will restart automatically.', // TODO translate
|
||||
INSTALL_VERSION: 'This will install vesion {0}. Are you sure?', // TODO translate
|
||||
SWITCH_DEV: 'Switch to development version', // TODO translate
|
||||
SWITCH_DEV: 'switch to the development version', // TODO translate
|
||||
UPGRADE_AVAILABLE: 'There is a firmware upgrade available!', // TODO translate
|
||||
LATEST_VERSION: 'You are using the latest version.' // TODO translate
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ const no: Translation = {
|
||||
SPECIAL_FUNCTIONS: 'Special Functions', // TODO translate
|
||||
WAIT_FIRMWARE: 'Please wait while the firmware is being uploaded. The device will restart automatically.', // TODO translate
|
||||
INSTALL_VERSION: 'This will install vesion {0}. Are you sure?', // TODO translate
|
||||
SWITCH_DEV: 'Switch to development version', // TODO translate
|
||||
SWITCH_DEV: 'switch to the development version', // TODO translate
|
||||
UPGRADE_AVAILABLE: 'There is a firmware upgrade available!', // TODO translate
|
||||
LATEST_VERSION: 'You are using the latest version.' // TODO translate
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ const pl: BaseTranslation = {
|
||||
SPECIAL_FUNCTIONS: 'Special Functions', // TODO translate
|
||||
WAIT_FIRMWARE: 'Please wait while the firmware is being uploaded. The device will restart automatically.', // TODO translate
|
||||
INSTALL_VERSION: 'This will install vesion {0}. Are you sure?', // TODO translate
|
||||
SWITCH_DEV: 'Switch to development version', // TODO translate
|
||||
SWITCH_DEV: 'switch to the development version', // TODO translate
|
||||
UPGRADE_AVAILABLE: 'There is a firmware upgrade available!', // TODO translate
|
||||
LATEST_VERSION: 'You are using the latest version.' // TODO translate
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ const sk: Translation = {
|
||||
SPECIAL_FUNCTIONS: 'Special Functions', // TODO translate
|
||||
WAIT_FIRMWARE: 'Please wait while the firmware is being uploaded. The device will restart automatically.', // TODO translate
|
||||
INSTALL_VERSION: 'This will install vesion {0}. Are you sure?', // TODO translate
|
||||
SWITCH_DEV: 'Switch to development version', // TODO translate
|
||||
SWITCH_DEV: 'switch to the development version', // TODO translate
|
||||
UPGRADE_AVAILABLE: 'There is a firmware upgrade available!', // TODO translate
|
||||
LATEST_VERSION: 'You are using the latest version.' // TODO translate
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ const sv: Translation = {
|
||||
SPECIAL_FUNCTIONS: 'Special Functions', // TODO translate
|
||||
WAIT_FIRMWARE: 'Please wait while the firmware is being uploaded. The device will restart automatically.', // TODO translate
|
||||
INSTALL_VERSION: 'This will install vesion {0}. Are you sure?', // TODO translate
|
||||
SWITCH_DEV: 'Switch to development version', // TODO translate
|
||||
SWITCH_DEV: 'switch to the development version', // TODO translate
|
||||
UPGRADE_AVAILABLE: 'There is a firmware upgrade available!', // TODO translate
|
||||
LATEST_VERSION: 'You are using the latest version.' // TODO translate
|
||||
};
|
||||
|
||||
@@ -335,7 +335,7 @@ const tr: Translation = {
|
||||
SPECIAL_FUNCTIONS: 'Special Functions', // TODO translate
|
||||
WAIT_FIRMWARE: 'Please wait while the firmware is being uploaded. The device will restart automatically.', // TODO translate
|
||||
INSTALL_VERSION: 'This will install vesion {0}. Are you sure?', // TODO translate
|
||||
SWITCH_DEV: 'Switch to development version', // TODO translate
|
||||
SWITCH_DEV: 'switch to the development version', // TODO translate
|
||||
UPGRADE_AVAILABLE: 'There is a firmware upgrade available!', // TODO translate
|
||||
LATEST_VERSION: 'You are using the latest version.' // TODO translate
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user