don't install via URL if Tasmota build on 4MB without PSRAM, as SSL is needed

This commit is contained in:
proddy
2024-09-01 14:13:30 +02:00
parent 6504ac8cb7
commit e1f5dbae81
2 changed files with 18 additions and 4 deletions

View File

@@ -139,6 +139,9 @@ const DownloadUpload = () => {
'https://github.com/emsesp/EMS-ESP32/blob/dev/CHANGELOG_LATEST.md';
const getBinURL = (useDevVersion: boolean) => {
if (!latestVersion || !latestDevVersion) {
return '';
}
const filename =
'EMS-ESP-' +
(useDevVersion ? latestDevVersion : latestVersion).replaceAll('.', '_') +
@@ -209,10 +212,14 @@ const DownloadUpload = () => {
useLayoutTitle(LL.DOWNLOAD_UPLOAD());
const internet_live =
latestDevVersion !== undefined && latestVersion !== undefined;
const renderUploadDialog = () => {
if (latestDevVersion === undefined || latestVersion === undefined) {
if (!internet_live) {
return null;
}
return (
<Dialog
sx={dialogStyle}
@@ -395,7 +402,7 @@ const DownloadUpload = () => {
<InfoOutlinedIcon color="secondary" sx={{ verticalAlign: 'middle' }} />
&nbsp;&nbsp;
{upgradeAvailable ? LL.UPGRADE_AVAILABLE() : LL.LATEST_VERSION()}
{upgradeAvailable && (
{upgradeAvailable && internet_live && data.psram ? (
<Button
sx={{ ml: 2, textTransform: 'none' }}
size="small"
@@ -407,6 +414,12 @@ const DownloadUpload = () => {
? LL.INSTALL('v' + latestDevVersion)
: LL.INSTALL('v' + latestVersion)}
</Button>
) : (
<Typography ml={2} variant="button">
<Link target="_blank" href={getBinURL(useDev)} color="primary">
{LL.DOWNLOAD(1)}
</Link>
</Typography>
)}
</Typography>

View File

@@ -389,7 +389,8 @@ let hardware_status = {
fs_used: 24,
fs_free: 2024,
free_caps: 8376,
psram: 8189,
// psram: false,
psram: true,
psram_size: 8189,
free_psram: 8166,
has_loader: true,
@@ -4541,7 +4542,7 @@ router
// check upgrade
.post(EMSESP_CHECK_UPGRADE_ENDPOINT, async (request: any) => {
const content = await request.json();
console.log('check upgrade', content.version);
console.log('check upgrade from ', content.version);
const data = {
upgradeable: true
// upgradeable: false