fixes to install

This commit is contained in:
proddy
2024-08-30 14:54:30 +02:00
parent c0305ddf38
commit 7c3c5917db
11 changed files with 28 additions and 21 deletions

View File

@@ -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>

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -331,6 +331,7 @@ let mqtt_settings = {
publish_time_other: 10,
publish_time_sensor: 10,
publish_time_heartbeat: 60,
publish_time_water: 60,
mqtt_qos: 0,
rootCA: '',
mqtt_retain: false,
@@ -367,9 +368,11 @@ const VERIFY_AUTHORIZATION_ENDPOINT = REST_ENDPOINT_ROOT + 'verifyAuthorization'
const SIGN_IN_ENDPOINT = REST_ENDPOINT_ROOT + 'signIn';
const GENERATE_TOKEN_ENDPOINT = REST_ENDPOINT_ROOT + 'generateToken';
const VERSION = '3.7.0-dev.0';
// const VERSION = '3.6.4';
const hardware_status = {
emsesp_version: '3.7.0-dev.33',
// emsesp_version: '3.6.5',
emsesp_version: VERSION,
esp_platform: 'ESP32S3',
build_flags: 'DEMO',
cpu_type: 'ESP32-S3',
@@ -397,8 +400,7 @@ const hardware_status = {
};
const system_status = {
emsesp_version: '3.7.0-dev.33',
// emsesp_version: '3.6.5',
emsesp_version: VERSION,
status: 0,
// status: 2,
uptime: 77186,