Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Jan 4, 2024
2 parents ebfe487 + 0fce450 commit e8217b6
Show file tree
Hide file tree
Showing 40 changed files with 456 additions and 355 deletions.
26 changes: 13 additions & 13 deletions interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
},
"dependencies": {
"@alova/adapter-xhr": "^1.0.2",
"@babel/core": "^7.23.6",
"@emotion/react": "^11.11.1",
"@babel/core": "^7.23.7",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.1",
"@mui/material": "^5.15.1",
"@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.5",
"@types/react": "^18.2.45",
"@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.1",
"alova": "^2.16.2",
"async-validator": "^4.2.5",
"history": "^5.3.0",
"jwt-decode": "^4.0.0",
Expand All @@ -43,17 +43,17 @@
"react-dom": "latest",
"react-dropzone": "^14.2.3",
"react-icons": "^4.12.0",
"react-router-dom": "^6.21.0",
"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.15.0",
"@typescript-eslint/parser": "^6.15.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.56.0",
"eslint-config-airbnb": "^19.0.4",
Expand All @@ -68,11 +68,11 @@
"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.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.
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
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: 0 additions & 1 deletion interface/src/i18n/de/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ 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',
HEAP: 'freier RAM Speicher (Gesamt / max. Block)',
PSRAM: 'PSRAM (Größe / Frei)',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ 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',
HEAP: 'Heap (Libre / Max Allouée)',
PSRAM: 'PSRAM (Taille / Libre)',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/it/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ 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',
HEAP: 'Heap (Free / Max Alloc)',
PSRAM: 'PSRAM (Size / Free)',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/nl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ const nl: Translation = {
RELEASE_IS: 'release is',
RELEASE_NOTES: 'release notes',
EMS_ESP_VER: 'EMS-ESP Versie',
PLATFORM: 'Apparaat (Platform / SDK)',
UPTIME: 'Systeem Uptime',
HEAP: 'Heap (Free / Max Alloc)',
PSRAM: 'PSRAM (Size / Free)',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/no/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ const no: Translation = {
RELEASE_IS: 'release er',
RELEASE_NOTES: 'release notes',
EMS_ESP_VER: 'EMS-ESP Version',
PLATFORM: 'Enhet (Platform / SDK)',
UPTIME: 'System Oppetid',
HEAP: 'Heap (Ledig / Max Allokert)',
PSRAM: 'PSRAM (Størrelse / Ledig)',
Expand Down
25 changes: 12 additions & 13 deletions interface/src/i18n/pl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const pl: BaseTranslation = {
PROBLEM_LOADING: 'Problem z załadowaniem!',
ANALOG_SENSOR: '{{u|u||ustawienia u|ustawień u}}rządzeni{{a podłączonego do EMS-ESP|e||a podłączonego do EMS-ESP|a podłączonego do EMS-ESP}}',
ANALOG_SENSORS: 'Urządzenia podłączone do EMS-ESP',
SETTINGS: 'ustawienia',
SETTINGS: 'ustawie{{nia|ń|}}',
UPDATED_OF: 'Zaktualizowano {0}.',
UPDATE_OF: 'Aktualizacja {0}',
REMOVED_OF: 'Usunięto ustawienia {0}.',
Expand Down Expand Up @@ -126,7 +126,7 @@ const pl: BaseTranslation = {
BYPASS_TOKEN: 'Pomiń autoryzację tokenem w wywołaniach API',
READONLY: 'Tryb pracy "tylko do odczytu" (blokuje wszystkie komendy zapisu na magistralę EMS)',
UNDERCLOCK_CPU: 'Obniż taktowanie CPU',
HEATINGOFF: 'Uruchom boiler z wymuszonym wyłączonym grzaniem',
HEATINGOFF: 'Uruchom kocioł z wymuszonym wyłączonym grzaniem',
ENABLE_SHOWER_TIMER: 'Aktywuj minutnik prysznica',
ENABLE_SHOWER_ALERT: 'Aktywuj alarm prysznica',
TRIGGER_TIME: 'Wyzwalaj po czasie',
Expand All @@ -146,13 +146,13 @@ const pl: BaseTranslation = {
MINUTES: 'minut',
HOURS: 'godzin',
RESTART: 'Restart',
RESTART_TEXT: 'Aby zastosować wprowadzone zmiany interfejs EMS-ESP musi zostać zrestartowany.',
RESTART_TEXT: 'Aby zastosować wprowadzone zmiany, interfejs EMS-ESP {{musi zostać|zostanie|}} uruchomiony ponowni{{e.|e|}}',
RESTART_CONFIRM: 'Na pewno chcesz zrestartować interfejs EMS-ESP?',
COMMAND: '{{Komenda|KOMENDA|}}',
CUSTOMIZATIONS_RESTART: 'Wszystkie personalizacje zostały usunięte. Restartuję...',
CUSTOMIZATIONS_FULL: 'Wybrano za dużo obiektów. Wprowadź zmiany w mniejszych partiach.',
CUSTOMIZATIONS_SAVED: 'Personalizacje zostały zapisane.',
CUSTOMIZATIONS_HELP_1: 'Wybierz urządzenie EMS, dostosuj opcje lub kliknij by zmienić nazwę encji.',
CUSTOMIZATIONS_HELP_1: 'Wybierz urządzenie EMS, a następnie dostosuj opcje lub kliknij na nazwie encji by nazwę zmienić',
CUSTOMIZATIONS_HELP_2: 'oznacz jako ulubioną',
CUSTOMIZATIONS_HELP_3: 'zablokuj akcje zapisu',
CUSTOMIZATIONS_HELP_4: 'wyklucz z MQTT i API',
Expand All @@ -164,12 +164,12 @@ const pl: BaseTranslation = {
NAME: '{{Nazwa|nazwa|}}',
CUSTOMIZATIONS_RESET: 'Na pewno chcesz usunąć wszystkie personalizacje łącznie z ustawieniami dla czujników temperatury 1-Wire® i urządzeń podłączonych do EMS-ESP?',
DEVICE_ENTITIES: 'Encje urządzenia',
SUPPORT_INFORMATION: 'Informacje dotyczące wsparcia',
SUPPORT_INFORMATION: '{{I|i|}}nformacj{{e|i|}} o systemie',
CLICK_HERE: 'Kliknij tu',
HELP_INFORMATION_1: 'Aby uzyskać instrukcje dotyczące konfiguracji EMS-ESP skorzystaj z wiki w internecie',
HELP_INFORMATION_1: 'Aby uzyskać instrukcje dotyczące konfiguracji EMS-ESP, skorzystaj z wiki w internecie',
HELP_INFORMATION_2: 'Aby dołączyć do naszego serwera Discord i komunikować się na żywo ze społecznością',
HELP_INFORMATION_3: 'Aby zaproponować nową funkcjonalność lub zgłosić problem',
HELP_INFORMATION_4: 'Zgłaszając problem, nie zapomnij dołączyć informacji o swoim systemie!',
HELP_INFORMATION_4: 'Zgłaszając problem, nie zapomnij pobrać i dołączyć informacji o swoim systemie!',
HELP_INFORMATION_5: 'EMS-ESP jest darmowym projektem typu open-source. Aby go wesprzeć, rozważ przyznanie nam gwiazdki na Github!',
UPLOAD: 'Wysyłanie',
DOWNLOAD: '{{P|p||P}}obier{{anie|z||z}}',
Expand All @@ -194,20 +194,19 @@ const pl: BaseTranslation = {
RELEASE_IS: 'wydanie to',
RELEASE_NOTES: 'lista zmian',
EMS_ESP_VER: 'Wersja EMS-ESP',
PLATFORM: 'Urządzenie (platforma / SDK)',
UPTIME: 'Czas działania systemu',
HEAP: 'HEAP (wolne / maksymalny przydział)',
PSRAM: 'PSRAM (rozmiar / wolne)',
FLASH: 'FLASH (rozmiar / taktowanie)',
APPSIZE: 'Aplikacja (Partition: wykorzystane / wolne)',
APPSIZE: 'Aplikacja (partycja: wykorzystane / wolne)',
FILESYSTEM: 'System plików (wykorzystane / wolne)',
BUFFER_SIZE: 'Maksymalna pojemność bufora (ilość wpisów)',
COMPACT: 'Kompaktowy',
ENABLE_OTA: 'Aktywuj aktualizację OTA',
DOWNLOAD_CUSTOMIZATION_TEXT: 'Pobierz personalizacje.',
DOWNLOAD_SCHEDULE_TEXT: 'Pobierz harmonogram zdarzeń.',
DOWNLOAD_SETTINGS_TEXT: 'Pobierz ustawienia aplikacji. Uważaj jeśli udostępniasz plik z ustawieniami, ponieważ zawiera on hasła oraz inne wrażliwe informacje!',
UPLOAD_TEXT: 'Wyślij firmware (.bin), ustawienia lub personalizacje (.json). Opcjonalnie, wyślij wcześniej plik walidacji (.md5).',
DOWNLOAD_SETTINGS_TEXT: 'Pobierz ustawienia aplikacji. Uwaga! Plik z ustawieniami zawiera hasła oraz inne wrażliwe informacje systemowe! Nie udostepniaj go pochopnie!',
UPLOAD_TEXT: 'Wyślij firmware (.bin), ustawienia lub personalizacje (.json). Opcjonalnie, wyślij wcześniej plik walidacji z sumą kontrolną (.md5).',
UPLOADING: 'Wysłano',
UPLOAD_DROP_TEXT: 'Przeciągnij tutaj plik lub kliknij',
ERROR: 'Nieoczekiwany błąd, spróbuj ponownie!',
Expand Down Expand Up @@ -320,10 +319,10 @@ const pl: BaseTranslation = {
CUSTOM_ENTITIES: '{{N|n|}}iestandardowe{{|j|}} encj{{e|i|}}',
ENTITIES_HELP_1: 'Zdefiniuj niestandardowe encje dla magistrali EMS.',
ENTITIES_UPDATED: 'Niestandardowe encje zostały uaktualnione.',
WRITEABLE: 'zapisywalna',
WRITEABLE: 'Zapisywalna',
SHOWING: 'Wyświetlane',
SEARCH: 'Szukaj',
CERT: 'Certyfikat główny TLS (pozostaw puste zby wyłączyć TLS-insecure)',
CERT: 'Certyfikat główny TLS (pozostaw puste dla TLS-insecure)',
ENABLE_TLS: 'Włącz wsparcie dla TLS',
ON: 'włączony',
OFF: 'wyłączony',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/sk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ const sk: Translation = {
RELEASE_IS: 'vydanie je',
RELEASE_NOTES: 'poznámky k vydaniu',
EMS_ESP_VER: 'EMS-ESP verzia',
PLATFORM: 'Zariadenie (Platforma / SDK)',
UPTIME: 'Beh systému',
HEAP: 'Zásobník (voľné / max pridelenie)',
PSRAM: 'PSRAM (Veľkosť / Voľné)',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/sv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ const sv: Translation = {
RELEASE_IS: 'release är', // TODO translate
RELEASE_NOTES: 'release-logg',
EMS_ESP_VER: 'EMS-ESP Version',
PLATFORM: 'Enhet (Plattform / SDK)',
UPTIME: 'Systemets Upptid',
HEAP: 'Heap (Ledigt / Max allokerat)',
PSRAM: 'PSRAM (Storlek / Ledigt)',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/tr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ const tr: Translation = {
RELEASE_IS: 'release is', // TODO translate
RELEASE_NOTES: 'yayınlanma notları',
EMS_ESP_VER: 'EMS-ESP Sürümü',
PLATFORM: 'Cihaz (Platform / SDK)',
UPTIME: 'Sistem Çalışma Süresi',
HEAP: 'Yığın (Boş / Maksimum Tahsis)',
PSRAM: 'PSRAM (Boyut / Boş)',
Expand Down
56 changes: 29 additions & 27 deletions interface/src/project/DashboardDevices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -420,33 +420,35 @@ const DashboardDevices: FC = () => {
<MessageBox my={2} level="warning" message={LL.EMS_BUS_SCANNING()} />
)}

<Table data={{ nodes: coreData.devices }} select={device_select} theme={device_theme} layout={{ custom: true }}>
{(tableList: any) => (
<>
<Header>
<HeaderRow>
<HeaderCell stiff />
<HeaderCell resize>{LL.DESCRIPTION()}</HeaderCell>
<HeaderCell stiff>{LL.TYPE(0)}</HeaderCell>
</HeaderRow>
</Header>
<Body>
{tableList.map((device: Device) => (
<Row key={device.id} item={device}>
<Cell stiff>
<DeviceIcon type_id={device.t} />
</Cell>
<Cell>
{device.n}
<span style={{ color: 'lightblue' }}>&nbsp;&nbsp;({device.e})</span>
</Cell>
<Cell stiff>{device.tn}</Cell>
</Row>
))}
</Body>
</>
)}
</Table>
{coreData.connected && (
<Table data={{ nodes: coreData.devices }} select={device_select} theme={device_theme} layout={{ custom: true }}>
{(tableList: any) => (
<>
<Header>
<HeaderRow>
<HeaderCell stiff />
<HeaderCell resize>{LL.DESCRIPTION()}</HeaderCell>
<HeaderCell stiff>{LL.TYPE(0)}</HeaderCell>
</HeaderRow>
</Header>
<Body>
{tableList.map((device: Device) => (
<Row key={device.id} item={device}>
<Cell stiff>
<DeviceIcon type_id={device.t} />
</Cell>
<Cell>
{device.n}
<span style={{ color: 'lightblue' }}>&nbsp;&nbsp;({device.e})</span>
</Cell>
<Cell stiff>{device.tn}</Cell>
</Row>
))}
</Body>
</>
)}
</Table>
)}
</IconContext.Provider>
);

Expand Down
2 changes: 1 addition & 1 deletion interface/src/project/DashboardDevicesDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const DashboardDevicesDialog = ({
return (
<Dialog sx={dialogStyle} open={open} onClose={close}>
<DialogTitle>
{selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(1)}
{selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(0)}
</DialogTitle>
<DialogContent dividers>
<Box color="warning.main" p={0} pl={0} pr={0} mt={0} mb={2}>
Expand Down
6 changes: 3 additions & 3 deletions interface/src/project/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Help: FC = () => {
};

return (
<SectionContent title={LL.SUPPORT_INFORMATION()} titleGutter>
<SectionContent title={LL.SUPPORT_INFORMATION(0)} titleGutter>
<List>
<ListItem>
<ListItemAvatar>
Expand Down Expand Up @@ -90,7 +90,7 @@ const Help: FC = () => {
</Typography>
</Box>
<Button startIcon={<DownloadIcon />} variant="outlined" color="primary" onClick={() => callAPI('system', 'info')}>
{LL.SUPPORT_INFORMATION()}
{LL.SUPPORT_INFORMATION(0)}
</Button>
<Button
sx={{ ml: 2 }}
Expand All @@ -111,7 +111,7 @@ const Help: FC = () => {
{'github.com/emsesp/EMS-ESP32'}
</Link>
</Typography>
<Typography color="white" align="center">
<Typography color="white" variant="subtitle2" align="center">
@proddy @MichaelDvP
</Typography>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion interface/src/project/SettingsApplication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ const SettingsApplication: FC = () => {
</Grid>
)}
{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
2 changes: 1 addition & 1 deletion interface/src/project/SettingsCustomization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ const SettingsCustomization: FC = () => {
{devices && renderDeviceList()}
{deviceEntities && renderDeviceData()}
{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
2 changes: 1 addition & 1 deletion interface/src/project/SettingsCustomizationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const SettingsCustomizationDialog = ({ open, onClose, onSave, selectedItem }: Se
<DialogContent dividers>
<Grid container direction="row">
<Typography variant="body2" color="warning.main">
{LL.ENTITY() + ' ID'}:&nbsp;
{LL.ID_OF(LL.ENTITY())}:&nbsp;
</Typography>
<Typography variant="body2">{editItem.id}</Typography>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion interface/src/project/SettingsScheduler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const SettingsScheduler: FC = () => {
<HeaderCell stiff>{LL.SCHEDULE(0)}</HeaderCell>
<HeaderCell stiff>{LL.TIME(0)}</HeaderCell>
<HeaderCell stiff>{LL.COMMAND(0)}</HeaderCell>
<HeaderCell stiff>{LL.VALUE(0)}</HeaderCell>
<HeaderCell stiff>{LL.VALUE(1)}</HeaderCell>
<HeaderCell stiff>{LL.NAME(0)}</HeaderCell>
</HeaderRow>
</Header>
Expand Down
Loading

0 comments on commit e8217b6

Please sign in to comment.