From 2b54db255e9a6461a95293a08adba91c829559f1 Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 8 Aug 2023 09:02:14 +0200 Subject: [PATCH 1/9] update prettier for windows --- .prettierignore | 1 + interface/.eslintrc.json | 6 ++++++ interface/.prettierignore | 5 ----- interface/.prettierrc | 8 -------- 4 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 interface/.prettierignore delete mode 100644 interface/.prettierrc diff --git a/.prettierignore b/.prettierignore index 3e5b7d2ea..370f2dd2b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,5 @@ node_modules/ build/ +dist/ .prettierrc .yarn/ \ No newline at end of file diff --git a/interface/.eslintrc.json b/interface/.eslintrc.json index 4f147e5a7..199f83753 100644 --- a/interface/.eslintrc.json +++ b/interface/.eslintrc.json @@ -97,6 +97,12 @@ "{}": false } } + ], + "prettier/prettier": [ + "error", + { + "endOfLine": "auto" + } ] } } diff --git a/interface/.prettierignore b/interface/.prettierignore deleted file mode 100644 index 370f2dd2b..000000000 --- a/interface/.prettierignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules/ -build/ -dist/ -.prettierrc -.yarn/ \ No newline at end of file diff --git a/interface/.prettierrc b/interface/.prettierrc deleted file mode 100644 index 4197de585..000000000 --- a/interface/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "trailingComma": "none", - "tabWidth": 2, - "semi": true, - "singleQuote": true, - "printWidth": 120, - "bracketSpacing": true -} \ No newline at end of file From b5b965e33970dfd60c5704c08b097870a2b7cd57 Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 8 Aug 2023 09:02:21 +0200 Subject: [PATCH 2/9] fix typo --- interface/src/project/DashboardDevices.tsx | 4 ++-- interface/src/project/DashboardDevicesDialog.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/src/project/DashboardDevices.tsx b/interface/src/project/DashboardDevices.tsx index 559d6b323..39c3a65c5 100644 --- a/interface/src/project/DashboardDevices.tsx +++ b/interface/src/project/DashboardDevices.tsx @@ -35,7 +35,7 @@ import { useState, useContext, useEffect, useCallback, useLayoutEffect } from 'r import { IconContext } from 'react-icons'; import { toast } from 'react-toastify'; -import DashboarDevicesDialog from './DashboardDevicesDialog'; +import DashboardDevicesDialog from './DashboardDevicesDialog'; import DeviceIcon from './DeviceIcon'; import * as EMSESP from './api'; @@ -581,7 +581,7 @@ const DashboardDevices: FC = () => { {renderDeviceData()} {renderDeviceDetails()} {selectedDeviceValue && ( - Date: Tue, 8 Aug 2023 10:34:10 +0200 Subject: [PATCH 3/9] remove aria labels --- .../src/components/inputs/ValidatedPasswordField.tsx | 6 +----- interface/src/components/layout/LayoutAppBar.tsx | 8 +------- interface/src/framework/network/NetworkSettingsForm.tsx | 2 +- interface/src/framework/security/ManageUsersForm.tsx | 5 ++--- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/interface/src/components/inputs/ValidatedPasswordField.tsx b/interface/src/components/inputs/ValidatedPasswordField.tsx index 43cc0f426..cae61fdd3 100644 --- a/interface/src/components/inputs/ValidatedPasswordField.tsx +++ b/interface/src/components/inputs/ValidatedPasswordField.tsx @@ -20,11 +20,7 @@ const ValidatedPasswordField: FC = ({ InputProps, . ...InputProps, endAdornment: ( - setShowPassword(!showPassword)} - edge="end" - > + setShowPassword(!showPassword)} edge="end"> {showPassword ? : } diff --git a/interface/src/components/layout/LayoutAppBar.tsx b/interface/src/components/layout/LayoutAppBar.tsx index 500d7519e..b93e8e820 100644 --- a/interface/src/components/layout/LayoutAppBar.tsx +++ b/interface/src/components/layout/LayoutAppBar.tsx @@ -21,13 +21,7 @@ const LayoutAppBar: FC = ({ title, onToggleDrawer }) => ( }} > - + diff --git a/interface/src/framework/network/NetworkSettingsForm.tsx b/interface/src/framework/network/NetworkSettingsForm.tsx index f4fefbb2a..a1a0af29e 100644 --- a/interface/src/framework/network/NetworkSettingsForm.tsx +++ b/interface/src/framework/network/NetworkSettingsForm.tsx @@ -142,7 +142,7 @@ const WiFiSettingsForm: FC = () => { secondary={'Security: ' + networkSecurityMode(selectedNetwork) + ', Ch: ' + selectedNetwork.channel} /> - + diff --git a/interface/src/framework/security/ManageUsersForm.tsx b/interface/src/framework/security/ManageUsersForm.tsx index cabeb5ea2..a8d8c9afb 100644 --- a/interface/src/framework/security/ManageUsersForm.tsx +++ b/interface/src/framework/security/ManageUsersForm.tsx @@ -161,15 +161,14 @@ const ManageUsersForm: FC = () => { generateToken(u.username)} > - removeUser(u)}> + removeUser(u)}> - editUser(u)}> + editUser(u)}> From 643b42469ed9c559ec4f537e5fb0a797be47f715 Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 8 Aug 2023 10:34:45 +0200 Subject: [PATCH 4/9] hardcode colours --- interface/src/components/layout/LayoutMenuItem.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/interface/src/components/layout/LayoutMenuItem.tsx b/interface/src/components/layout/LayoutMenuItem.tsx index 91914169d..d9bb46ca2 100644 --- a/interface/src/components/layout/LayoutMenuItem.tsx +++ b/interface/src/components/layout/LayoutMenuItem.tsx @@ -1,5 +1,4 @@ import { ListItem, ListItemButton, ListItemIcon, ListItemText } from '@mui/material'; -import { grey } from '@mui/material/colors'; import { Link, useLocation } from 'react-router-dom'; import type { SvgIconProps } from '@mui/material'; import type { FC } from 'react'; @@ -21,10 +20,10 @@ const LayoutMenuItem: FC = ({ icon: Icon, label, to, disabl return ( - + - {label} + {label} ); From ff68d23642dfcf29724cbddd737bb700224a5f4b Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 8 Aug 2023 10:35:55 +0200 Subject: [PATCH 5/9] add style to Dialog boxes --- interface/src/CustomTheme.tsx | 15 ++++++++--- .../components/routing/BlockNavigation.tsx | 3 ++- interface/src/framework/ntp/NTPStatusForm.tsx | 3 ++- .../src/framework/security/GenerateToken.tsx | 5 ++-- interface/src/framework/security/UserForm.tsx | 3 ++- .../src/framework/system/SystemStatusForm.tsx | 5 ++-- .../system/SystemStatusVersionDialog.tsx | 3 ++- interface/src/project/DashboardDevices.tsx | 3 ++- .../src/project/DashboardDevicesDialog.tsx | 25 ++++++++++--------- .../project/DashboardSensorsAnalogDialog.tsx | 3 ++- .../DashboardSensorsTemperatureDialog.tsx | 3 ++- interface/src/project/DashboardStatus.tsx | 3 ++- .../src/project/SettingsCustomization.tsx | 3 ++- .../project/SettingsCustomizationDialog.tsx | 3 ++- .../src/project/SettingsEntitiesDialog.tsx | 3 ++- .../src/project/SettingsSchedulerDialog.tsx | 3 ++- 16 files changed, 55 insertions(+), 31 deletions(-) diff --git a/interface/src/CustomTheme.tsx b/interface/src/CustomTheme.tsx index a482e0b28..1f08afc19 100644 --- a/interface/src/CustomTheme.tsx +++ b/interface/src/CustomTheme.tsx @@ -1,10 +1,19 @@ import { CssBaseline } from '@mui/material'; -import { blueGrey, blue } from '@mui/material/colors'; import { createTheme, responsiveFontSizes, ThemeProvider } from '@mui/material/styles'; import type { FC } from 'react'; import type { RequiredChildrenProps } from 'utils'; +export const dialogStyle = { + '& .MuiDialog-paper': { + borderRadius: '8px', + borderColor: '#565656', + borderStyle: 'solid', + borderWidth: '1px' + }, + backdropFilter: 'blur(1px)' +}; + const theme = responsiveFontSizes( createTheme({ typography: { @@ -13,10 +22,10 @@ const theme = responsiveFontSizes( palette: { mode: 'dark', secondary: { - main: blue[500] + main: '#2196f3' // blue[500] }, info: { - main: blueGrey[500] + main: '#607d8b' // blueGrey[500] } } }) diff --git a/interface/src/components/routing/BlockNavigation.tsx b/interface/src/components/routing/BlockNavigation.tsx index c8986c14a..dd0541075 100644 --- a/interface/src/components/routing/BlockNavigation.tsx +++ b/interface/src/components/routing/BlockNavigation.tsx @@ -3,6 +3,7 @@ import type { FC } from 'react'; import type { unstable_Blocker as Blocker } from 'react-router-dom'; +import { dialogStyle } from 'CustomTheme'; import { useI18nContext } from 'i18n/i18n-react'; interface BlockNavigationProps { @@ -13,7 +14,7 @@ const BlockNavigation: FC = ({ blocker }) => { const { LL } = useI18nContext(); return ( - + {LL.BLOCK_NAVIGATE_1()} {LL.BLOCK_NAVIGATE_2()} diff --git a/interface/src/framework/ntp/NTPStatusForm.tsx b/interface/src/framework/ntp/NTPStatusForm.tsx index 6b47b56e1..c8e73ef74 100644 --- a/interface/src/framework/ntp/NTPStatusForm.tsx +++ b/interface/src/framework/ntp/NTPStatusForm.tsx @@ -28,6 +28,7 @@ import type { Theme } from '@mui/material'; import type { FC } from 'react'; import type { NTPStatus } from 'types'; +import { dialogStyle } from 'CustomTheme'; import * as NTPApi from 'api/ntp'; import { ButtonRow, FormLoader, SectionContent } from 'components'; import { AuthenticatedContext } from 'contexts/authentication'; @@ -108,7 +109,7 @@ const NTPStatusForm: FC = () => { }; const renderSetTimeDialog = () => ( - setSettingTime(false)}> + setSettingTime(false)}> {LL.SET_TIME(1)} diff --git a/interface/src/framework/security/GenerateToken.tsx b/interface/src/framework/security/GenerateToken.tsx index 0a2e8a0ef..f7092829f 100644 --- a/interface/src/framework/security/GenerateToken.tsx +++ b/interface/src/framework/security/GenerateToken.tsx @@ -14,6 +14,7 @@ import { useRequest } from 'alova'; import { useEffect } from 'react'; import type { FC } from 'react'; +import { dialogStyle } from 'CustomTheme'; import * as SecurityApi from 'api/security'; import { MessageBox } from 'components'; @@ -39,8 +40,8 @@ const GenerateToken: FC = ({ username, onClose }) => { }, [open, generateToken]); return ( - - {LL.ACCESS_TOKEN_FOR() + ' ' + username} + + {LL.ACCESS_TOKEN_FOR() + ' ' + username} {token ? ( <> diff --git a/interface/src/framework/security/UserForm.tsx b/interface/src/framework/security/UserForm.tsx index f11343096..3416b5dd4 100644 --- a/interface/src/framework/security/UserForm.tsx +++ b/interface/src/framework/security/UserForm.tsx @@ -9,6 +9,7 @@ import type { ValidateFieldsError } from 'async-validator'; import type { FC } from 'react'; import type { User } from 'types'; +import { dialogStyle } from 'CustomTheme'; import { BlockFormControlLabel, ValidatedPasswordField, ValidatedTextField } from 'components'; import { useI18nContext } from 'i18n/i18n-react'; import { updateValue } from 'utils'; @@ -51,7 +52,7 @@ const UserForm: FC = ({ creating, validator, user, setUser, onDon }; return ( - + {user && ( <> diff --git a/interface/src/framework/system/SystemStatusForm.tsx b/interface/src/framework/system/SystemStatusForm.tsx index dd2416ca1..a6c24c993 100644 --- a/interface/src/framework/system/SystemStatusForm.tsx +++ b/interface/src/framework/system/SystemStatusForm.tsx @@ -34,6 +34,7 @@ import RestartMonitor from './RestartMonitor'; import SystemStatusVersionDialog from './SystemStatusVersionDialog'; import type { FC } from 'react'; +import { dialogStyle } from 'CustomTheme'; import * as SystemApi from 'api/system'; import { ButtonRow, FormLoader, SectionContent } from 'components'; import { AuthenticatedContext } from 'contexts/authentication'; @@ -115,7 +116,7 @@ const SystemStatusForm: FC = () => { }; const renderRestartDialog = () => ( - setConfirmRestart(false)}> + setConfirmRestart(false)}> {LL.RESTART()} {LL.RESTART_CONFIRM()} @@ -153,7 +154,7 @@ const SystemStatusForm: FC = () => { ); const renderFactoryResetDialog = () => ( - setConfirmFactoryReset(false)}> + setConfirmFactoryReset(false)}> {LL.FACTORY_RESET()} {LL.SYSTEM_FACTORY_TEXT_DIALOG()} diff --git a/interface/src/framework/system/SystemStatusVersionDialog.tsx b/interface/src/framework/system/SystemStatusVersionDialog.tsx index fa2851025..1c7ab8876 100644 --- a/interface/src/framework/system/SystemStatusVersionDialog.tsx +++ b/interface/src/framework/system/SystemStatusVersionDialog.tsx @@ -1,6 +1,7 @@ import { Box, Button, Dialog, DialogActions, DialogContent, DialogTitle, Link, Typography } from '@mui/material'; import { useRequest } from 'alova'; import { useCallback, useEffect } from 'react'; +import { dialogStyle } from 'CustomTheme'; import * as SystemApi from 'api/system'; import MessageBox from 'components/MessageBox'; @@ -49,7 +50,7 @@ const SystemStatusVersionDialog = ({ open, onClose, version, platform }: SystemS const getBinURL = (v: string) => 'EMS-ESP-' + v.replaceAll('.', '_') + '-' + platform.replaceAll('-', '_') + '.bin'; return ( - + {LL.VERSION_CHECK(1)} diff --git a/interface/src/project/DashboardDevices.tsx b/interface/src/project/DashboardDevices.tsx index 39c3a65c5..09dd0dfcb 100644 --- a/interface/src/project/DashboardDevices.tsx +++ b/interface/src/project/DashboardDevices.tsx @@ -45,6 +45,7 @@ import { DeviceValueUOM_s, DeviceEntityMask, DeviceType } from './types'; import { deviceValueItemValidation } from './validators'; import type { Device, DeviceValue } from './types'; import type { FC } from 'react'; +import { dialogStyle } from 'CustomTheme'; import { ButtonRow, SectionContent, MessageBox } from 'components'; import { AuthenticatedContext } from 'contexts/authentication'; @@ -361,7 +362,7 @@ const DashboardDevices: FC = () => { } return ( - setShowDeviceInfo(false)}> + setShowDeviceInfo(false)}> {LL.DEVICE_DETAILS()} diff --git a/interface/src/project/DashboardDevicesDialog.tsx b/interface/src/project/DashboardDevicesDialog.tsx index 042fb8eee..c4a291f5e 100644 --- a/interface/src/project/DashboardDevicesDialog.tsx +++ b/interface/src/project/DashboardDevicesDialog.tsx @@ -16,7 +16,6 @@ import { Typography, CircularProgress } from '@mui/material'; -import { green } from '@mui/material/colors'; import { useState, useEffect } from 'react'; import { DeviceValueUOM, DeviceValueUOM_s } from './types'; @@ -24,12 +23,23 @@ import type { DeviceValue } from './types'; import type Schema from 'async-validator'; import type { ValidateFieldsError } from 'async-validator'; +import { dialogStyle } from 'CustomTheme'; import { ValidatedTextField } from 'components'; import { useI18nContext } from 'i18n/i18n-react'; import { updateValue } from 'utils'; import { validate } from 'validators'; +// const dialogStyle = { +// '& .MuiDialog-paper': { +// borderRadius: '8px', +// borderColor: '#565656', +// borderStyle: 'solid', +// borderWidth: '1px' +// }, +// backdropFilter: 'blur(1px)' +// }; + type DashboardDevicesDialogProps = { open: boolean; onClose: () => void; @@ -112,16 +122,7 @@ const DashboardDevicesDialog = ({ }; return ( - + {selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(0)} @@ -206,7 +207,7 @@ const DashboardDevicesDialog = ({ + {creating ? LL.ADD(1) + ' ' + LL.NEW(0) : LL.EDIT()} {LL.ANALOG_SENSOR(0)} diff --git a/interface/src/project/DashboardSensorsTemperatureDialog.tsx b/interface/src/project/DashboardSensorsTemperatureDialog.tsx index 78ae78074..3a0ef4dd4 100644 --- a/interface/src/project/DashboardSensorsTemperatureDialog.tsx +++ b/interface/src/project/DashboardSensorsTemperatureDialog.tsx @@ -18,6 +18,7 @@ import { useState, useEffect } from 'react'; import type { TemperatureSensor } from './types'; import type Schema from 'async-validator'; import type { ValidateFieldsError } from 'async-validator'; +import { dialogStyle } from 'CustomTheme'; import { ValidatedTextField } from 'components'; import { useI18nContext } from 'i18n/i18n-react'; @@ -67,7 +68,7 @@ const DashboardSensorsTemperatureDialog = ({ }; return ( - + {LL.EDIT()} {LL.TEMP_SENSOR()} diff --git a/interface/src/project/DashboardStatus.tsx b/interface/src/project/DashboardStatus.tsx index 4c43014b3..9c1e05b33 100644 --- a/interface/src/project/DashboardStatus.tsx +++ b/interface/src/project/DashboardStatus.tsx @@ -30,6 +30,7 @@ import type { Theme } from '@mui/material'; import type { Translation } from 'i18n/i18n-types'; import type { FC } from 'react'; +import { dialogStyle } from 'CustomTheme'; import { ButtonRow, FormLoader, SectionContent } from 'components'; import { AuthenticatedContext } from 'contexts/authentication'; import { useI18nContext } from 'i18n/i18n-react'; @@ -173,7 +174,7 @@ const DashboardStatus: FC = () => { }; const renderScanDialog = () => ( - setConfirmScan(false)}> + setConfirmScan(false)}> {LL.SCAN_DEVICES()} {LL.EMS_SCAN()} diff --git a/interface/src/project/SettingsCustomization.tsx b/interface/src/project/SettingsCustomization.tsx index 8c032ea16..2fb0e47b0 100644 --- a/interface/src/project/SettingsCustomization.tsx +++ b/interface/src/project/SettingsCustomization.tsx @@ -35,6 +35,7 @@ import * as EMSESP from './api'; import { DeviceEntityMask } from './types'; import type { DeviceShort, DeviceEntity } from './types'; import type { FC } from 'react'; +import { dialogStyle } from 'CustomTheme'; import * as SystemApi from 'api/system'; import { ButtonRow, SectionContent, MessageBox, BlockNavigation } from 'components'; @@ -484,7 +485,7 @@ const SettingsCustomization: FC = () => { }; const renderResetDialog = () => ( - setConfirmReset(false)}> + setConfirmReset(false)}> {LL.RESET(1)} {LL.CUSTOMIZATIONS_RESET()} diff --git a/interface/src/project/SettingsCustomizationDialog.tsx b/interface/src/project/SettingsCustomizationDialog.tsx index 50601785d..8476cd501 100644 --- a/interface/src/project/SettingsCustomizationDialog.tsx +++ b/interface/src/project/SettingsCustomizationDialog.tsx @@ -18,6 +18,7 @@ import EntityMaskToggle from './EntityMaskToggle'; import { DeviceEntityMask } from './types'; import type { DeviceEntity } from './types'; +import { dialogStyle } from 'CustomTheme'; import { useI18nContext } from 'i18n/i18n-react'; import { updateValue } from 'utils'; @@ -63,7 +64,7 @@ const SettingsCustomizationDialog = ({ open, onClose, onSave, selectedItem }: Se }; return ( - + {LL.EDIT() + ' ' + LL.ENTITY()} diff --git a/interface/src/project/SettingsEntitiesDialog.tsx b/interface/src/project/SettingsEntitiesDialog.tsx index 6d8d39511..7006e92d6 100644 --- a/interface/src/project/SettingsEntitiesDialog.tsx +++ b/interface/src/project/SettingsEntitiesDialog.tsx @@ -22,6 +22,7 @@ import type { EntityItem } from './types'; import type Schema from 'async-validator'; import type { ValidateFieldsError } from 'async-validator'; +import { dialogStyle } from 'CustomTheme'; import { BlockFormControlLabel, ValidatedTextField } from 'components'; import { useI18nContext } from 'i18n/i18n-react'; @@ -90,7 +91,7 @@ const SettingsEntitiesDialog = ({ }; return ( - + {creating ? LL.ADD(1) + ' ' + LL.NEW(1) : LL.EDIT()} {LL.ENTITY()} diff --git a/interface/src/project/SettingsSchedulerDialog.tsx b/interface/src/project/SettingsSchedulerDialog.tsx index d074848a4..b5a4eb90f 100644 --- a/interface/src/project/SettingsSchedulerDialog.tsx +++ b/interface/src/project/SettingsSchedulerDialog.tsx @@ -25,6 +25,7 @@ import type { ScheduleItem } from './types'; import type Schema from 'async-validator'; import type { ValidateFieldsError } from 'async-validator'; +import { dialogStyle } from 'CustomTheme'; import { BlockFormControlLabel, ValidatedTextField } from 'components'; import { useI18nContext } from 'i18n/i18n-react'; @@ -129,7 +130,7 @@ const SettingsSchedulerDialog = ({ const isTimer = editItem.flags === ScheduleFlag.SCHEDULE_TIMER; return ( - + {creating ? LL.ADD(1) + ' ' + LL.NEW(0) : LL.EDIT()} {LL.SCHEDULE(1)} From 3c51e8040867fbd991c5e9ddf6f4b4745d8968bf Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 8 Aug 2023 10:36:14 +0200 Subject: [PATCH 6/9] remove translation for Heatbeat --- interface/src/framework/mqtt/MqttSettingsForm.tsx | 2 +- interface/src/i18n/de/index.ts | 1 - interface/src/i18n/en/index.ts | 3 +-- interface/src/i18n/fr/index.ts | 1 - interface/src/i18n/it/index.ts | 1 - interface/src/i18n/nl/index.ts | 7 +++---- interface/src/i18n/no/index.ts | 1 - interface/src/i18n/pl/index.ts | 1 - interface/src/i18n/sv/index.ts | 1 - interface/src/i18n/tr/index.ts | 1 - 10 files changed, 5 insertions(+), 14 deletions(-) diff --git a/interface/src/framework/mqtt/MqttSettingsForm.tsx b/interface/src/framework/mqtt/MqttSettingsForm.tsx index d9e49ab95..1647c3f9d 100644 --- a/interface/src/framework/mqtt/MqttSettingsForm.tsx +++ b/interface/src/framework/mqtt/MqttSettingsForm.tsx @@ -310,7 +310,7 @@ const MqttSettingsForm: FC = () => { {LL.SECONDS()} }} diff --git a/interface/src/i18n/de/index.ts b/interface/src/i18n/de/index.ts index dfbab3705..9b799bf19 100644 --- a/interface/src/i18n/de/index.ts +++ b/interface/src/i18n/de/index.ts @@ -246,7 +246,6 @@ const de: Translation = { MQTT_INT_THERMOSTATS: 'Thermostate', MQTT_INT_SOLAR: 'Solarmodule', MQTT_INT_MIXER: 'Mischermodule', - MQTT_INT_HEARTBEAT: 'Heartbeat', MQTT_QUEUE: 'MQTT Queue', DEFAULT: 'Standard', MQTT_ENTITY_FORMAT: 'Entitäts-ID Format', diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts index fb3e89512..490bb57ef 100644 --- a/interface/src/i18n/en/index.ts +++ b/interface/src/i18n/en/index.ts @@ -186,7 +186,7 @@ const en: Translation = { USE: 'Use', FACTORY_RESET: 'Factory Reset', SYSTEM_FACTORY_TEXT: 'Device has been factory reset and will now restart', - SYSTEM_FACTORY_TEXT_DIALOG: 'Are you sure you want to reset the device to its factory defaults?', + SYSTEM_FACTORY_TEXT_DIALOG: 'Are you sure you want to reset EMS-ESP to its factory defaults?', VERSION_CHECK: 'Version Check', THE_LATEST: 'The latest', OFFICIAL: 'official', @@ -246,7 +246,6 @@ const en: Translation = { MQTT_INT_THERMOSTATS: 'Thermostats', MQTT_INT_SOLAR: 'Solar Modules', MQTT_INT_MIXER: 'Mixer Modules', - MQTT_INT_HEARTBEAT: 'Heartbeat', MQTT_QUEUE: 'MQTT Queue', DEFAULT: 'Default', MQTT_ENTITY_FORMAT: 'Entity ID format', diff --git a/interface/src/i18n/fr/index.ts b/interface/src/i18n/fr/index.ts index 965803614..a9a8fceb9 100644 --- a/interface/src/i18n/fr/index.ts +++ b/interface/src/i18n/fr/index.ts @@ -246,7 +246,6 @@ const fr: Translation = { MQTT_INT_THERMOSTATS: 'Thermostats', MQTT_INT_SOLAR: 'Modules solaires', MQTT_INT_MIXER: 'Modules mélangeurs', - MQTT_INT_HEARTBEAT: 'Battements', MQTT_QUEUE: 'Queue MQTT', DEFAULT: 'Défaut', MQTT_ENTITY_FORMAT: 'Entity ID format', // TODO translate diff --git a/interface/src/i18n/it/index.ts b/interface/src/i18n/it/index.ts index f122a8fec..7efbb03f0 100644 --- a/interface/src/i18n/it/index.ts +++ b/interface/src/i18n/it/index.ts @@ -248,7 +248,6 @@ const it: Translation = { MQTT_INT_THERMOSTATS: 'Termostati', MQTT_INT_SOLAR: 'Moduli solari', MQTT_INT_MIXER: 'Moduli Mixer', - MQTT_INT_HEARTBEAT: 'Heartbeat', MQTT_QUEUE: 'Coda MQTT', DEFAULT: 'Predefinito', MQTT_ENTITY_FORMAT: 'Formato ID entità', diff --git a/interface/src/i18n/nl/index.ts b/interface/src/i18n/nl/index.ts index d49662bcc..993f64812 100644 --- a/interface/src/i18n/nl/index.ts +++ b/interface/src/i18n/nl/index.ts @@ -193,7 +193,7 @@ const nl: Translation = { DEVELOPMENT: 'development', RELEASE_IS: 'release is', RELEASE_NOTES: 'release notes', - EMS_ESP_VER: 'EMS-ESP Version', + EMS_ESP_VER: 'EMS-ESP Versie', PLATFORM: 'Apparaat (Platform / SDK)', UPTIME: 'Systeem Uptime', CPU_FREQ: 'CPU Frequency', @@ -246,7 +246,6 @@ const nl: Translation = { MQTT_INT_THERMOSTATS: 'Thermostaten', MQTT_INT_SOLAR: 'Solar Modules', MQTT_INT_MIXER: 'Mixer Modules', - MQTT_INT_HEARTBEAT: 'Heartbeat', MQTT_QUEUE: 'MQTT Queue', DEFAULT: 'Default', MQTT_ENTITY_FORMAT: 'Entity ID formaat', @@ -282,7 +281,7 @@ const nl: Translation = { SCAN_AGAIN: 'Opnieuw scannen', NETWORK_SCANNER: 'Netwerk Scanner', NETWORK_NO_WIFI: 'Geen WiFi networken gevonden', - NETWORK_BLANK_SSID: 'laat leeg om WiFi uit te schakelen', // and enable ETH // TODO translate + NETWORK_BLANK_SSID: 'laat leeg om WiFi uit te schakelen', TX_POWER: 'Tx Vermogen', HOSTNAME: 'Hostname', NETWORK_DISABLE_SLEEP: 'WiFi Sleep Mode uitzetten', @@ -323,7 +322,7 @@ const nl: Translation = { WRITEABLE: 'Beschrijfbare', SHOWING: 'Tonen', SEARCH: 'Zoek', - CERT: 'TSL root certificate (leave blank to disable TSL)' // TODO translate + CERT: 'TSL rootcertificaat (laat leeg om TSL uit te schakelen)' }; export default nl; diff --git a/interface/src/i18n/no/index.ts b/interface/src/i18n/no/index.ts index dd4f51318..f396d634f 100644 --- a/interface/src/i18n/no/index.ts +++ b/interface/src/i18n/no/index.ts @@ -246,7 +246,6 @@ const no: Translation = { MQTT_INT_THERMOSTATS: 'Termostat', MQTT_INT_SOLAR: 'Solpaneler', MQTT_INT_MIXER: 'Blandeventil', - MQTT_INT_HEARTBEAT: 'Heartbeat', MQTT_QUEUE: 'MQTT Queue', DEFAULT: 'Standard', MQTT_ENTITY_FORMAT: 'Enhets ID format', diff --git a/interface/src/i18n/pl/index.ts b/interface/src/i18n/pl/index.ts index 2073acb1f..47d259a03 100644 --- a/interface/src/i18n/pl/index.ts +++ b/interface/src/i18n/pl/index.ts @@ -246,7 +246,6 @@ const pl: BaseTranslation = { MQTT_INT_THERMOSTATS: 'Termostaty', MQTT_INT_SOLAR: 'Panele solarne', MQTT_INT_MIXER: 'Mieszacze', - MQTT_INT_HEARTBEAT: '"Heartbeat" (aktywność)', MQTT_QUEUE: 'Kolejka MQTT', DEFAULT: '{{Pozostałe|Domyślna|}}', MQTT_ENTITY_FORMAT: 'Format "Entity ID"', diff --git a/interface/src/i18n/sv/index.ts b/interface/src/i18n/sv/index.ts index 2f6e27381..fd96fd714 100644 --- a/interface/src/i18n/sv/index.ts +++ b/interface/src/i18n/sv/index.ts @@ -246,7 +246,6 @@ const sv: Translation = { MQTT_INT_THERMOSTATS: 'Termostater', MQTT_INT_SOLAR: 'Solpaneler', MQTT_INT_MIXER: 'Blandningsventiler', - MQTT_INT_HEARTBEAT: 'Heartbeat', MQTT_QUEUE: 'MQTT-kö', DEFAULT: 'Standard', MQTT_ENTITY_FORMAT: 'Entitets-ID format', diff --git a/interface/src/i18n/tr/index.ts b/interface/src/i18n/tr/index.ts index d046b2b85..15c7214a4 100644 --- a/interface/src/i18n/tr/index.ts +++ b/interface/src/i18n/tr/index.ts @@ -246,7 +246,6 @@ const tr: Translation = { MQTT_INT_THERMOSTATS: 'Termostatlar', MQTT_INT_SOLAR: 'Güneş Enerjisi Modülleri', MQTT_INT_MIXER: 'Karışım Modülleri', - MQTT_INT_HEARTBEAT: 'Kalp atışı', MQTT_QUEUE: 'MQTT Sırası', DEFAULT: 'Varsayılan', MQTT_ENTITY_FORMAT: 'Varlık Kimlik biçimi', From f39deefbb444c0d7358eed044530d4e3d8b55102 Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 8 Aug 2023 15:48:45 +0200 Subject: [PATCH 7/9] add vscode extensions --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4d67849f9..7a033d0fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # vscode .vscode/c_cpp_properties.json -# .vscode/extensions.json +.vscode/extensions.json .vscode/launch.json # .vscode/settings.json From 0924f441cb82b130d43d6fa7007bdeea26875bfc Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 8 Aug 2023 15:48:54 +0200 Subject: [PATCH 8/9] update packages --- interface/package.json | 6 +-- interface/yarn.lock | 95 +++++++++++++++++++++++------------------- 2 files changed, 56 insertions(+), 45 deletions(-) diff --git a/interface/package.json b/interface/package.json index 7de7d4bc6..02f6494ee 100644 --- a/interface/package.json +++ b/interface/package.json @@ -23,13 +23,13 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.14.3", - "@mui/material": "^5.14.3", + "@mui/material": "^5.14.4", "@preact/compat": "^17.1.2", "@prefresh/vite": "^2.4.1", - "@table-library/react-table-library": "4.1.4", + "@table-library/react-table-library": "4.1.6", "@types/lodash-es": "^4.17.8", "@types/node": "^20.4.8", - "@types/react": "^18.2.18", + "@types/react": "^18.2.19", "@types/react-dom": "^18.2.7", "@types/react-router-dom": "^5.3.3", "alova": "^2.9.3", diff --git a/interface/yarn.lock b/interface/yarn.lock index 91fd2cb6b..52ec53c6c 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -357,7 +357,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.7": +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.7": version: 7.22.6 resolution: "@babel/runtime@npm:7.22.6" dependencies: @@ -875,14 +875,14 @@ __metadata: languageName: node linkType: hard -"@mui/base@npm:5.0.0-beta.9": - version: 5.0.0-beta.9 - resolution: "@mui/base@npm:5.0.0-beta.9" +"@mui/base@npm:5.0.0-beta.10": + version: 5.0.0-beta.10 + resolution: "@mui/base@npm:5.0.0-beta.10" dependencies: "@babel/runtime": ^7.22.6 "@emotion/is-prop-valid": ^1.2.1 "@mui/types": ^7.2.4 - "@mui/utils": ^5.14.3 + "@mui/utils": ^5.14.4 "@popperjs/core": ^2.11.8 clsx: ^2.0.0 prop-types: ^15.8.1 @@ -894,14 +894,14 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: adf4e08b0798266ecf80c50b8898913c46cae829958b938c69a662bd88146a112d15277e257043ab540e95d397710388b7e59d2043f45faef9e6a993415d46a5 + checksum: c7563a107334ef47eff5aa2595b0200f3b4061a0757aa0fb43e5c56e2fba594b20a3a535ea9847fa6e7138f4fcff7e67893193fb647730a2a6b0cb9ea1016c9a languageName: node linkType: hard -"@mui/core-downloads-tracker@npm:^5.14.3": - version: 5.14.3 - resolution: "@mui/core-downloads-tracker@npm:5.14.3" - checksum: aa26434efc2e36aeb58f5f56d879a02eb064765bb3c82abe6e9e72330b6778852852e11ecc6166aecf168b1f6f07d81d4ecf84f8b3f2978587485013d5e82c54 +"@mui/core-downloads-tracker@npm:^5.14.4": + version: 5.14.4 + resolution: "@mui/core-downloads-tracker@npm:5.14.4" + checksum: 23d652570020fcba2956dcc53da94da0242a900a3fa5ca4af1bfcb74f4ea6bc6f6725e1908dde232caf3a3a55fc0ab34fcb05832e3a41fbd8070b3d13a6aa6cc languageName: node linkType: hard @@ -921,16 +921,16 @@ __metadata: languageName: node linkType: hard -"@mui/material@npm:^5.14.3": - version: 5.14.3 - resolution: "@mui/material@npm:5.14.3" +"@mui/material@npm:^5.14.4": + version: 5.14.4 + resolution: "@mui/material@npm:5.14.4" dependencies: "@babel/runtime": ^7.22.6 - "@mui/base": 5.0.0-beta.9 - "@mui/core-downloads-tracker": ^5.14.3 - "@mui/system": ^5.14.3 + "@mui/base": 5.0.0-beta.10 + "@mui/core-downloads-tracker": ^5.14.4 + "@mui/system": ^5.14.4 "@mui/types": ^7.2.4 - "@mui/utils": ^5.14.3 + "@mui/utils": ^5.14.4 "@types/react-transition-group": ^4.4.6 clsx: ^2.0.0 csstype: ^3.1.2 @@ -950,16 +950,16 @@ __metadata: optional: true "@types/react": optional: true - checksum: 29c3122b57423467b8ece41dacffb0bf8bdec5cd498d61ab6c0d320cd2a6d567e78ce3658a2987c2d5ab474b4396104af99308193d51a53c51d0e2ac3e99bb8b + checksum: 653b87fbd92de29a0e37579651333bea078518a81cbbab6f37b807aee10af438a050660b887da81ee5df8d14f688b169573f4f709f0e6c28d4a19c9de2eed502 languageName: node linkType: hard -"@mui/private-theming@npm:^5.13.7": - version: 5.13.7 - resolution: "@mui/private-theming@npm:5.13.7" +"@mui/private-theming@npm:^5.14.4": + version: 5.14.4 + resolution: "@mui/private-theming@npm:5.14.4" dependencies: - "@babel/runtime": ^7.22.5 - "@mui/utils": ^5.13.7 + "@babel/runtime": ^7.22.6 + "@mui/utils": ^5.14.4 prop-types: ^15.8.1 peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 @@ -967,7 +967,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: e38b0a441f55651767a8b29d767c9457d368ab0870f76d38d001fd127663796a219f8c50be79a71343faa798e1ae78b4b379d3c1e391fb0910b27fedf5ce3f70 + checksum: 647c19aab6420c4cd5529220c30afa77278badb8cff0251f84bc0d41b566f9c3f3771a59f1100d87a90f420a057679bc9e696da0fcd56272bf3fb4c13769fb8b languageName: node linkType: hard @@ -992,15 +992,15 @@ __metadata: languageName: node linkType: hard -"@mui/system@npm:^5.14.3": - version: 5.14.3 - resolution: "@mui/system@npm:5.14.3" +"@mui/system@npm:^5.14.4": + version: 5.14.4 + resolution: "@mui/system@npm:5.14.4" dependencies: "@babel/runtime": ^7.22.6 - "@mui/private-theming": ^5.13.7 + "@mui/private-theming": ^5.14.4 "@mui/styled-engine": ^5.13.2 "@mui/types": ^7.2.4 - "@mui/utils": ^5.14.3 + "@mui/utils": ^5.14.4 clsx: ^2.0.0 csstype: ^3.1.2 prop-types: ^15.8.1 @@ -1016,7 +1016,7 @@ __metadata: optional: true "@types/react": optional: true - checksum: 8fef8203a024ea24b581096cc9a72ef0d6df3bf492949faf603dee242a3d36c74903d5683cda786af228a7ad5c169b40e83f101030dab149e7857cf77c59fed1 + checksum: d8d74d5c05cd73cf859649ca2abbbaccc37bf6b87a122c09f080349f3e22e3d1c4cacc1f6d23a808b19078eba9a68a6ac2781e0783f6ca18d66964306c766f78 languageName: node linkType: hard @@ -1032,9 +1032,9 @@ __metadata: languageName: node linkType: hard -"@mui/utils@npm:^5.13.7, @mui/utils@npm:^5.14.3": - version: 5.14.3 - resolution: "@mui/utils@npm:5.14.3" +"@mui/utils@npm:^5.14.4": + version: 5.14.4 + resolution: "@mui/utils@npm:5.14.4" dependencies: "@babel/runtime": ^7.22.6 "@types/prop-types": ^15.7.5 @@ -1043,7 +1043,7 @@ __metadata: react-is: ^18.2.0 peerDependencies: react: ^17.0.0 || ^18.0.0 - checksum: 0f713f45639865df7babcd34bd69f5dc7214f27f31a519671f67c98d4b5c971e1e3e5321cca5ffa533f500eb8ebb88b806534202c2800d9395b43cabfb24d42a + checksum: ad0d6ac443cc99c74949bd0cac86034ea2c847419e014e2e49f9bf1d1c648d05649d682145fc7ff632b064bbf9f582a28e313091388ed6e640266c2a0ecf8533 languageName: node linkType: hard @@ -1335,9 +1335,9 @@ __metadata: languageName: node linkType: hard -"@table-library/react-table-library@npm:4.1.4": - version: 4.1.4 - resolution: "@table-library/react-table-library@npm:4.1.4" +"@table-library/react-table-library@npm:4.1.6": + version: 4.1.6 + resolution: "@table-library/react-table-library@npm:4.1.6" dependencies: clsx: 1.1.1 react-virtualized-auto-sizer: 1.0.7 @@ -1346,7 +1346,7 @@ __metadata: "@emotion/react": ">= 11" react: ">=16.8.0" react-dom: ">=16.8.0" - checksum: ace2711b777e596ed5fd1623108ac8fb7403566b108725f97e6710019a11f28f1f86b916932a662ad53ad18c994ba626f0b2fd7e6be91c44dff16d54e0364f0d + checksum: 148b33000353068d2f40ce4e18d5c3314e4d66840822f83abbdc5c3cd9c82c297f28eea3df0ea2231308c56cc5fe34c5d4ab69be38a066cd4fd18e25214a76c0 languageName: node linkType: hard @@ -1511,7 +1511,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:^18.2.18": +"@types/react@npm:*": version: 18.2.18 resolution: "@types/react@npm:18.2.18" dependencies: @@ -1522,6 +1522,17 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:^18.2.19": + version: 18.2.19 + resolution: "@types/react@npm:18.2.19" + dependencies: + "@types/prop-types": "*" + "@types/scheduler": "*" + csstype: ^3.0.2 + checksum: 8ebea4e6e154b32135e54d8ead9ec2d7c99bdeb0b5d51b4a01dfcb0a6eaf0cea566463148abff8755b29e2aea8c3e66dc09e6cfface2161f46fc9a023823ffd3 + languageName: node + linkType: hard + "@types/scheduler@npm:*": version: 0.16.3 resolution: "@types/scheduler@npm:0.16.3" @@ -1668,15 +1679,15 @@ __metadata: "@emotion/react": ^11.11.1 "@emotion/styled": ^11.11.0 "@mui/icons-material": ^5.14.3 - "@mui/material": ^5.14.3 + "@mui/material": ^5.14.4 "@preact/compat": ^17.1.2 "@preact/preset-vite": ^2.5.0 "@prefresh/vite": ^2.4.1 - "@table-library/react-table-library": 4.1.4 + "@table-library/react-table-library": 4.1.6 "@types/babel__core": ^7 "@types/lodash-es": ^4.17.8 "@types/node": ^20.4.8 - "@types/react": ^18.2.18 + "@types/react": ^18.2.19 "@types/react-dom": ^18.2.7 "@types/react-router-dom": ^5.3.3 "@typescript-eslint/eslint-plugin": ^6.3.0 From faa3479f0aa3d74b1b3b0edd139f8a11dacd1065 Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 8 Aug 2023 15:49:08 +0200 Subject: [PATCH 9/9] make progmem work again --- interface/vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/vite.config.ts b/interface/vite.config.ts index bedec9b79..700091981 100644 --- a/interface/vite.config.ts +++ b/interface/vite.config.ts @@ -18,9 +18,9 @@ export default defineConfig(({ command, mode }) => { plugins: [ preact(), viteTsconfigPaths(), - svgrPlugin() + svgrPlugin(), // prefresh() - // ProgmemGenerator({ outputPath: '../lib/framework/WWWData.h', bytesPerLine: 20 }) + ProgmemGenerator({ outputPath: '../lib/framework/WWWData.h', bytesPerLine: 20 }) ], build: {