Skip to content

Commit

Permalink
Merge pull request #1543 from MichaelDvP/dev2
Browse files Browse the repository at this point in the history
Update dev2 to latest changes from dev
  • Loading branch information
proddy authored Jan 6, 2024
2 parents 77700c4 + e8217b6 commit f25ab5f
Show file tree
Hide file tree
Showing 60 changed files with 1,692 additions and 1,159 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- heatpump energy meters [#1463](https://github.com/emsesp/EMS-ESP32/issues/1463)
- heatpump max power [#1475](https://github.com/emsesp/EMS-ESP32/issues/1475)
- checkbox for MQTT-TLS enable [#1474](https://github.com/emsesp/EMS-ESP32/issues/1474)
- added SK (Slovencina) language. Thanks @misa1515
- CPU info [#1497](https://github.com/emsesp/EMS-ESP32/pull/1497)

## Fixed

Expand Down
36 changes: 18 additions & 18 deletions interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
"lint": "eslint . --cache --fix"
},
"dependencies": {
"@alova/adapter-xhr": "^1.0.1",
"@babel/core": "^7.23.6",
"@emotion/react": "^11.11.1",
"@alova/adapter-xhr": "^1.0.2",
"@babel/core": "^7.23.7",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.0",
"@mui/material": "^5.15.0",
"@mui/icons-material": "^5.15.3",
"@mui/material": "^5.15.3",
"@table-library/react-table-library": "4.1.7",
"@types/imagemin": "^8.0.5",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.4",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"@types/react-router-dom": "^5.3.3",
"alova": "^2.16.0",
"alova": "^2.16.2",
"async-validator": "^4.2.5",
"history": "^5.3.0",
"jwt-decode": "^4.0.0",
Expand All @@ -43,36 +43,36 @@
"react-dom": "latest",
"react-dropzone": "^14.2.3",
"react-icons": "^4.12.0",
"react-router-dom": "^6.20.1",
"react-router-dom": "^6.21.1",
"react-toastify": "^9.1.3",
"sockette": "^2.0.6",
"typesafe-i18n": "^5.26.2",
"typescript": "^5.3.3"
},
"devDependencies": {
"@preact/compat": "^17.1.2",
"@preact/preset-vite": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@preact/preset-vite": "^2.8.1",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"concurrently": "^8.2.2",
"eslint": "^8.55.0",
"eslint": "^8.56.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-autofix": "^1.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "alpha",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"preact": "^10.19.3",
"prettier": "^3.1.1",
"rollup-plugin-visualizer": "^5.11.0",
"rollup-plugin-visualizer": "^5.12.0",
"terser": "^5.26.0",
"vite": "^5.0.8",
"vite": "^5.0.10",
"vite-plugin-imagemin": "^0.6.1",
"vite-tsconfig-paths": "^4.2.2"
"vite-tsconfig-paths": "^4.2.3"
},
"packageManager": "yarn@4.0.2"
}
Binary file modified interface/public/fonts/re.woff2
Binary file not shown.
5 changes: 5 additions & 0 deletions interface/src/SignIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import ITflag from 'i18n/IT.svg';
import NLflag from 'i18n/NL.svg';
import NOflag from 'i18n/NO.svg';
import PLflag from 'i18n/PL.svg';
import SKflag from 'i18n/SK.svg';
import SVflag from 'i18n/SV.svg';
import TRflag from 'i18n/TR.svg';
import { I18nContext } from 'i18n/i18n-react';
Expand Down Expand Up @@ -142,6 +143,10 @@ const SignIn: FC = () => {
<img src={PLflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;PL
</MenuItem>
<MenuItem key="sk" value="sk">
<img src={SKflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;SK
</MenuItem>
<MenuItem key="sv" value="sv">
<img src={SVflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;SV
Expand Down
8 changes: 6 additions & 2 deletions interface/src/components/layout/LayoutAuthMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ import {
} from '@mui/material';
import { useState, useContext } from 'react';
import type { TypographyProps } from '@mui/material';

import type { Locales } from 'i18n/i18n-types';
import type { FC, ChangeEventHandler } from 'react';
import { AuthenticatedContext } from 'contexts/authentication';

import DEflag from 'i18n/DE.svg';
import FRflag from 'i18n/FR.svg';
import GBflag from 'i18n/GB.svg';
import ITflag from 'i18n/IT.svg';
import NLflag from 'i18n/NL.svg';
import NOflag from 'i18n/NO.svg';
import PLflag from 'i18n/PL.svg';
import SKflag from 'i18n/SK.svg';
import SVflag from 'i18n/SV.svg';
import TRflag from 'i18n/TR.svg';

import { I18nContext } from 'i18n/i18n-react';
import { loadLocaleAsync } from 'i18n/i18n-util.async';

Expand Down Expand Up @@ -102,6 +102,10 @@ const LayoutAuthMenu: FC = () => {
<img src={PLflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;PL
</MenuItem>
<MenuItem key="sk" value="sk">
<img src={SKflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;SK
</MenuItem>
<MenuItem key="sv" value="sv">
<img src={SVflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;SV
Expand Down
2 changes: 1 addition & 1 deletion interface/src/framework/network/NetworkSettingsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ const WiFiSettingsForm: FC = () => {
</>
)}
{restartNeeded && (
<MessageBox my={2} level="warning" message={LL.RESTART_TEXT()}>
<MessageBox my={2} level="warning" message={LL.RESTART_TEXT(0)}>
<Button startIcon={<PowerSettingsNewIcon />} variant="contained" color="error" onClick={restart}>
{LL.RESTART()}
</Button>
Expand Down
30 changes: 22 additions & 8 deletions interface/src/framework/system/SystemStatusForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import AppsIcon from '@mui/icons-material/Apps';
import BuildIcon from '@mui/icons-material/Build';
import CancelIcon from '@mui/icons-material/Cancel';
import DeveloperBoardIcon from '@mui/icons-material/DeveloperBoard';
import DevicesIcon from '@mui/icons-material/Devices';
import FolderIcon from '@mui/icons-material/Folder';
import MemoryIcon from '@mui/icons-material/Memory';
Expand All @@ -9,7 +10,6 @@ import RefreshIcon from '@mui/icons-material/Refresh';
import SdCardAlertIcon from '@mui/icons-material/SdCardAlert';
import SdStorageIcon from '@mui/icons-material/SdStorage';
import SettingsBackupRestoreIcon from '@mui/icons-material/SettingsBackupRestore';
import ShowChartIcon from '@mui/icons-material/ShowChart';
import TimerIcon from '@mui/icons-material/Timer';
import {
Avatar,
Expand Down Expand Up @@ -203,28 +203,40 @@ const SystemStatusForm: FC = () => {
<ListItem>
<ListItemAvatar>
<Avatar>
<DevicesIcon />
<TimerIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.PLATFORM()} secondary={data.esp_platform + ' / ' + data.sdk_version} />
<ListItemText primary={LL.UPTIME()} secondary={data.uptime} />
</ListItem>
<Divider variant="inset" component="li" />
<ListItem>
<ListItemAvatar>
<Avatar>
<TimerIcon />
<DevicesIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.UPTIME()} secondary={data.uptime} />
<ListItemText primary="SDK" secondary={data.arduino_version + ' / ESP-IDF v' + data.sdk_version} />
</ListItem>
<Divider variant="inset" component="li" />
<ListItem>
<ListItemAvatar>
<Avatar>
<ShowChartIcon />
<DeveloperBoardIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.CPU_FREQ()} secondary={data.cpu_freq_mhz + ' MHz'} />
<ListItemText
primary="CPU"
secondary={
data.cpu_type +
' (rev.' +
data.cpu_rev +
', ' +
(data.cpu_cores == 1 ? 'single-core)' : 'dual-core)') +
' @ ' +
data.cpu_freq_mhz +
' Mhz'
}
/>
</ListItem>
<Divider variant="inset" component="li" />
<ListItem>
Expand Down Expand Up @@ -277,7 +289,9 @@ const SystemStatusForm: FC = () => {
</ListItemAvatar>
<ListItemText
primary={LL.APPSIZE()}
secondary={formatNumber(data.app_used) + ' KB / ' + formatNumber(data.app_free) + ' KB'}
secondary={
data.partition + ': ' + formatNumber(data.app_used) + ' KB / ' + formatNumber(data.app_free) + ' KB'
}
/>
</ListItem>
<Divider variant="inset" component="li" />
Expand Down
8 changes: 4 additions & 4 deletions interface/src/framework/system/UploadFileForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const UploadFileForm: FC = () => {
<Typography variant="body2">
{LL.UPLOAD_TEXT()}
<br />
{LL.RESTART_TEXT()}.
{LL.RESTART_TEXT(1)}.
</Typography>
</Box>
{md5 && (
Expand All @@ -148,7 +148,7 @@ const UploadFileForm: FC = () => {
{!isUploading && (
<>
<Typography sx={{ pt: 4, pb: 2 }} variant="h6" color="primary">
{LL.DOWNLOAD(0)}&nbsp;{LL.SUPPORT_INFORMATION()}
{LL.DOWNLOAD(0)}&nbsp;{LL.SUPPORT_INFORMATION(1)}
</Typography>
<Box color="warning.main">
<Typography mb={1} variant="body2">
Expand All @@ -161,7 +161,7 @@ const UploadFileForm: FC = () => {
color="primary"
onClick={() => callAPI('system', 'info')}
>
{LL.SUPPORT_INFORMATION()}
{LL.SUPPORT_INFORMATION(0)}
</Button>
<Button
sx={{ ml: 2 }}
Expand All @@ -174,7 +174,7 @@ const UploadFileForm: FC = () => {
</Button>

<Typography sx={{ pt: 4, pb: 2 }} variant="h6" color="primary">
{LL.DOWNLOAD(0)}&nbsp;{LL.SETTINGS()}
{LL.DOWNLOAD(0)}&nbsp;{LL.SETTINGS(1)}
</Typography>
<Box color="warning.main">
<Typography mb={1} variant="body2">
Expand Down
1 change: 1 addition & 0 deletions interface/src/i18n/SK.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions interface/src/i18n/de/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,11 @@ const de: Translation = {
RELEASE_IS: 'release ist', // TODO translate
RELEASE_NOTES: 'Versionshinweise',
EMS_ESP_VER: 'EMS-ESP Version',
PLATFORM: 'Platform (Platform / SDK)',
UPTIME: 'System Betriebszeit',
CPU_FREQ: 'CPU Frequenz',
HEAP: 'freier RAM Speicher (Gesamt / max. Block)',
PSRAM: 'PSRAM (Größe / Frei)',
FLASH: 'Flash Speicher (Größe / Geschwindigkeit)',
APPSIZE: 'Programm (Genutzt / Frei)',
APPSIZE: 'Programm (Partition: Genutzt / Frei)',
FILESYSTEM: 'Dateisystem (Genutzt / Frei)',
BUFFER_SIZE: 'max. Puffergröße',
COMPACT: 'Kompakte Darstellung',
Expand Down
3 changes: 1 addition & 2 deletions interface/src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,10 @@ const en: Translation = {
EMS_ESP_VER: 'EMS-ESP Version',
PLATFORM: 'Device (Platform / SDK)',
UPTIME: 'System Uptime',
CPU_FREQ: 'CPU Frequency',
HEAP: 'Heap (Free / Max Alloc)',
PSRAM: 'PSRAM (Size / Free)',
FLASH: 'Flash Chip (Size / Speed)',
APPSIZE: 'Application (Used / Free)',
APPSIZE: 'Application (Partition: Used / Free)',
FILESYSTEM: 'File System (Used / Free)',
BUFFER_SIZE: 'Max Buffer Size',
COMPACT: 'Compact',
Expand Down
4 changes: 1 addition & 3 deletions interface/src/i18n/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,11 @@ const fr: Translation = {
RELEASE_IS: 'release est', // TODO translate
RELEASE_NOTES: 'notes de version',
EMS_ESP_VER: 'Version EMS-ESP',
PLATFORM: 'Appareil (Plateforme / SDK)',
UPTIME: 'Durée de fonctionnement du système',
CPU_FREQ: 'Fréquence du CPU',
HEAP: 'Heap (Libre / Max Allouée)',
PSRAM: 'PSRAM (Taille / Libre)',
FLASH: 'Flash Chip (Taille / Vitesse)',
APPSIZE: 'Application (Utilisée / Libre)',
APPSIZE: 'Application (Partition: Utilisée / Libre)',
FILESYSTEM: 'File System (Utilisée / Libre)',
BUFFER_SIZE: 'Max taille du buffer',
COMPACT: 'Compact',
Expand Down
4 changes: 1 addition & 3 deletions interface/src/i18n/it/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,11 @@ const it: Translation = {
RELEASE_IS: 'rilascio é',
RELEASE_NOTES: 'note rilascio',
EMS_ESP_VER: 'Versione EMS-ESP',
PLATFORM: 'Dispositivo (Piattaforma / SDK)',
UPTIME: 'Tempo di attività del sistema',
CPU_FREQ: 'Frequenza CPU ',
HEAP: 'Heap (Free / Max Alloc)',
PSRAM: 'PSRAM (Size / Free)',
FLASH: 'Flash Chip (Size / Speed)',
APPSIZE: 'Applicazione (Usata / Libera)',
APPSIZE: 'Applicazione (Partizione: Usata / Libera)',
FILESYSTEM: 'Memoria Sistema (Usata / Libera)',
BUFFER_SIZE: 'Max Buffer Size',
COMPACT: 'Compact',
Expand Down
4 changes: 1 addition & 3 deletions interface/src/i18n/nl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,11 @@ const nl: Translation = {
RELEASE_IS: 'release is',
RELEASE_NOTES: 'release notes',
EMS_ESP_VER: 'EMS-ESP Versie',
PLATFORM: 'Apparaat (Platform / SDK)',
UPTIME: 'Systeem Uptime',
CPU_FREQ: 'CPU Frequency',
HEAP: 'Heap (Free / Max Alloc)',
PSRAM: 'PSRAM (Size / Free)',
FLASH: 'Flash Chip (Size / Speed)',
APPSIZE: 'Application (Used / Free)',
APPSIZE: 'Application (Partition: Used / Free)',
FILESYSTEM: 'File System (Used / Free)',
BUFFER_SIZE: 'Max Buffer Size',
COMPACT: 'Compact',
Expand Down
4 changes: 1 addition & 3 deletions interface/src/i18n/no/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,11 @@ const no: Translation = {
RELEASE_IS: 'release er',
RELEASE_NOTES: 'release notes',
EMS_ESP_VER: 'EMS-ESP Version',
PLATFORM: 'Enhet (Platform / SDK)',
UPTIME: 'System Oppetid',
CPU_FREQ: 'CPU Frekvens',
HEAP: 'Heap (Ledig / Max Allokert)',
PSRAM: 'PSRAM (Størrelse / Ledig)',
FLASH: 'Flash Chip (Størrelse / Hastighet)',
APPSIZE: 'Applikasjon (Brukt / Ledig)',
APPSIZE: 'Applikasjon (Partition: Brukt / Ledig)',
FILESYSTEM: 'File System (Brukt / Ledig)',
BUFFER_SIZE: 'Max Buffer Størrelse',
COMPACT: 'Komprimere',
Expand Down
Loading

0 comments on commit f25ab5f

Please sign in to comment.