diff --git a/interface/package.json b/interface/package.json index 3c4e59a62..9d12cdd96 100644 --- a/interface/package.json +++ b/interface/package.json @@ -32,7 +32,7 @@ "@types/imagemin": "^8.0.5", "@types/lodash-es": "^4.17.12", "@types/node": "^20.11.28", - "@types/react": "^18.2.66", + "@types/react": "^18.2.67", "@types/react-dom": "^18.2.22", "@types/react-router-dom": "^5.3.3", "alova": "^2.17.1", @@ -54,8 +54,8 @@ "devDependencies": { "@preact/compat": "^17.1.2", "@preact/preset-vite": "^2.8.2", - "@typescript-eslint/eslint-plugin": "^7.2.0", - "@typescript-eslint/parser": "^7.2.0", + "@typescript-eslint/eslint-plugin": "^7.3.0", + "@typescript-eslint/parser": "^7.3.0", "concurrently": "^8.2.2", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", @@ -66,7 +66,7 @@ "eslint-plugin-prettier": "alpha", "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-hooks": "^4.6.0", - "preact": "^10.19.6", + "preact": "^10.19.7", "prettier": "^3.2.5", "rollup-plugin-visualizer": "^5.12.0", "terser": "^5.29.2", diff --git a/interface/src/components/upload/SingleUpload.tsx b/interface/src/components/upload/SingleUpload.tsx index bbd3e9ce3..1a4664dab 100644 --- a/interface/src/components/upload/SingleUpload.tsx +++ b/interface/src/components/upload/SingleUpload.tsx @@ -63,7 +63,7 @@ const SingleUpload: FC = ({ onDrop, onCancel, isUploading, pr { const { LL } = useI18nContext(); useLayoutTitle(LL.SETTINGS(0)); - return ( - + const [confirmRestart, setConfirmRestart] = useState(false); + const [confirmFactoryReset, setConfirmFactoryReset] = useState(false); + const [processing, setProcessing] = useState(false); + const [restarting, setRestarting] = useState(); + + const { send: restartCommand } = useRequest(SystemApi.restart(), { + immediate: false + }); + + const { send: factoryResetCommand } = useRequest(SystemApi.factoryReset(), { + immediate: false + }); + + const { send: partitionCommand } = useRequest(SystemApi.partition(), { + immediate: false + }); + + const restart = async () => { + setProcessing(true); + await restartCommand() + .then(() => { + setRestarting(true); + }) + .catch((err) => { + toast.error(err.message); + }) + .finally(() => { + setConfirmRestart(false); + setProcessing(false); + }); + }; + + const factoryReset = async () => { + setProcessing(true); + await factoryResetCommand() + .then(() => { + setRestarting(true); + }) + .catch((err) => { + toast.error(err.message); + }) + .finally(() => { + setConfirmFactoryReset(false); + setProcessing(false); + }); + }; + + const partition = async () => { + setProcessing(true); + await partitionCommand() + .then(() => { + setRestarting(true); + }) + .catch((err) => { + toast.error(err.message); + }) + .finally(() => { + setConfirmRestart(false); + setProcessing(false); + }); + }; + + const renderRestartDialog = () => ( + setConfirmRestart(false)}> + {LL.RESTART()} + {LL.RESTART_CONFIRM()} + + + + + + + ); + + const renderFactoryResetDialog = () => ( + setConfirmFactoryReset(false)}> + {LL.FACTORY_RESET()} + {LL.SYSTEM_FACTORY_TEXT_DIALOG()} + + + + + + ); + + const content = () => ( + <> { - + {renderRestartDialog()} + {renderFactoryResetDialog()} + + + + + + + + + + + + + ); + + return {restarting ? : content()}; }; export default Settings; diff --git a/interface/src/framework/system/SystemStatusForm.tsx b/interface/src/framework/system/SystemStatusForm.tsx index 2efd72dcc..3c15d50c0 100644 --- a/interface/src/framework/system/SystemStatusForm.tsx +++ b/interface/src/framework/system/SystemStatusForm.tsx @@ -1,42 +1,20 @@ 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'; -import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew'; 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 TimerIcon from '@mui/icons-material/Timer'; -import { - Avatar, - Box, - Button, - Dialog, - DialogActions, - DialogContent, - DialogTitle, - Divider, - List, - ListItem, - ListItemAvatar, - ListItemText -} from '@mui/material'; +import { Avatar, Box, Button, Divider, List, ListItem, ListItemAvatar, ListItemText } from '@mui/material'; import { useRequest } from 'alova'; -import { useContext, useState } from 'react'; -import { toast } from 'react-toastify'; -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'; import { useI18nContext } from 'i18n/i18n-react'; function formatNumber(num: number) { @@ -46,138 +24,8 @@ function formatNumber(num: number) { const SystemStatusForm: FC = () => { const { LL } = useI18nContext(); - const [confirmRestart, setConfirmRestart] = useState(false); - const [confirmFactoryReset, setConfirmFactoryReset] = useState(false); - const [processing, setProcessing] = useState(false); - const [restarting, setRestarting] = useState(); - const [versionDialogOpen, setVersionDialogOpen] = useState(false); - - const { me } = useContext(AuthenticatedContext); - - const { send: restartCommand } = useRequest(SystemApi.restart(), { - immediate: false - }); - - const { send: factoryResetCommand } = useRequest(SystemApi.factoryReset(), { - immediate: false - }); - - const { send: partitionCommand } = useRequest(SystemApi.partition(), { - immediate: false - }); - const { data: data, send: loadData, error } = useRequest(SystemApi.readSystemStatus, { force: true }); - const restart = async () => { - setProcessing(true); - await restartCommand() - .then(() => { - setRestarting(true); - }) - .catch((err) => { - toast.error(err.message); - }) - .finally(() => { - setConfirmRestart(false); - setProcessing(false); - }); - }; - - const factoryReset = async () => { - setProcessing(true); - await factoryResetCommand() - .then(() => { - setRestarting(true); - }) - .catch((err) => { - toast.error(err.message); - }) - .finally(() => { - setConfirmFactoryReset(false); - setProcessing(false); - }); - }; - - const partition = async () => { - setProcessing(true); - await partitionCommand() - .then(() => { - setRestarting(true); - }) - .catch((err) => { - toast.error(err.message); - }) - .finally(() => { - setConfirmRestart(false); - setProcessing(false); - }); - }; - - const renderRestartDialog = () => ( - setConfirmRestart(false)}> - {LL.RESTART()} - {LL.RESTART_CONFIRM()} - - - - {data?.has_loader && ( - - )} - - - ); - - const renderFactoryResetDialog = () => ( - setConfirmFactoryReset(false)}> - {LL.FACTORY_RESET()} - {LL.SYSTEM_FACTORY_TEXT_DIALOG()} - - - - - - ); - const content = () => { if (!data) { return ; @@ -193,9 +41,6 @@ const SystemStatusForm: FC = () => { - @@ -316,48 +161,12 @@ const SystemStatusForm: FC = () => { - {me.admin && ( - - - - - - - )} - {renderRestartDialog()} - {renderFactoryResetDialog()} ); }; - return ( - - {restarting ? : content()} - {data && ( - setVersionDialogOpen(false)} - version={data.emsesp_version} - platform={data.esp_platform} - /> - )} - - ); + return {content()}; }; export default SystemStatusForm; diff --git a/interface/src/framework/system/SystemStatusVersionDialog.tsx b/interface/src/framework/system/SystemStatusVersionDialog.tsx deleted file mode 100644 index 54012c63d..000000000 --- a/interface/src/framework/system/SystemStatusVersionDialog.tsx +++ /dev/null @@ -1,112 +0,0 @@ -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'; -import { useI18nContext } from 'i18n/i18n-react'; - -type SystemStatusVersionDialogProps = { - open: boolean; - onClose: () => void; - version: string; - platform: string; -}; - -const SystemStatusVersionDialog = ({ open, onClose, version, platform }: SystemStatusVersionDialogProps) => { - const { LL } = useI18nContext(); - const { send: getLatestVersion, data: latestVersion } = useRequest(SystemApi.getStableVersion, { - immediate: false, - force: true - }); - const { send: getLatestDevVersion, data: latestDevVersion } = useRequest(SystemApi.getDevVersion, { - immediate: false, - force: true - }); - - const STABLE_URL = 'https://github.com/emsesp/EMS-ESP32/releases/download/'; - const DEV_URL = 'https://github.com/emsesp/EMS-ESP32/releases/download/latest/'; - - const STABLE_RELNOTES_URL = 'https://github.com/emsesp/EMS-ESP32/blob/main/CHANGELOG.md'; - const DEV_RELNOTES_URL = 'https://github.com/emsesp/EMS-ESP32/blob/dev/CHANGELOG_LATEST.md'; - - const uploadURL = window.location.origin + '/settings/upload'; - - const connected = latestVersion && latestDevVersion; - - const getVersions = useCallback(async () => { - await getLatestVersion(); - await getLatestDevVersion(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - useEffect(() => { - if (open) { - void getVersions(); - } - }, [getVersions, open]); - - const getBinURL = (v: string) => 'EMS-ESP-' + v.replaceAll('.', '_') + '-' + platform.replaceAll('-', '_') + '.bin'; - - return ( - - {LL.VERSION_CHECK(1)} - - - {latestVersion && ( - - {LL.THE_LATEST()} {LL.OFFICIAL()} {LL.RELEASE_IS()} {latestVersion} -  ( - - {LL.RELEASE_NOTES()} - - ) ( - - {LL.DOWNLOAD(1)} - - ) - - )} - {latestDevVersion && ( - - {LL.THE_LATEST()} {LL.DEVELOPMENT()} {LL.RELEASE_IS()}  - {latestDevVersion} -  ( - - {LL.RELEASE_NOTES()} - - ) ( - - {LL.DOWNLOAD(1)} - - ) - - )} - {connected && ( - - - {LL.USE()}  - - {LL.UPLOAD()} - -  {LL.SYSTEM_APPLY_FIRMWARE()} - - - )} - {!connected && } - - - - - - ); -}; - -export default SystemStatusVersionDialog; diff --git a/interface/src/framework/system/UploadDownload.tsx b/interface/src/framework/system/UploadDownload.tsx index 3726ec967..b1091e1ce 100644 --- a/interface/src/framework/system/UploadDownload.tsx +++ b/interface/src/framework/system/UploadDownload.tsx @@ -1,12 +1,12 @@ import DownloadIcon from '@mui/icons-material/GetApp'; -import { Typography, Button, Box } from '@mui/material'; +import { Typography, Button, Box, Link } from '@mui/material'; import { useRequest } from 'alova'; import { useState, type FC } from 'react'; import { toast } from 'react-toastify'; import RestartMonitor from './RestartMonitor'; import * as SystemApi from 'api/system'; -import { SectionContent, SingleUpload, useLayoutTitle } from 'components'; +import { FormLoader, SectionContent, SingleUpload, useLayoutTitle } from 'components'; import { useI18nContext } from 'i18n/i18n-react'; import * as EMSESP from 'project/api'; @@ -32,6 +32,26 @@ const UploadDownload: FC = () => { immediate: false }); + const { data: data, send: loadData, error } = useRequest(SystemApi.readSystemStatus, { force: true }); + + const { data: latestVersion } = useRequest(SystemApi.getStableVersion, { + immediate: true, + force: true + }); + const { data: latestDevVersion } = useRequest(SystemApi.getDevVersion, { + immediate: true, + force: true + }); + + const STABLE_URL = 'https://github.com/emsesp/EMS-ESP32/releases/download/'; + const DEV_URL = 'https://github.com/emsesp/EMS-ESP32/releases/download/latest/'; + + const STABLE_RELNOTES_URL = 'https://github.com/emsesp/EMS-ESP32/blob/main/CHANGELOG.md'; + const DEV_RELNOTES_URL = 'https://github.com/emsesp/EMS-ESP32/blob/dev/CHANGELOG_LATEST.md'; + + const getBinURL = (v: string) => + 'EMS-ESP-' + v.replaceAll('.', '_') + '-' + data.esp_platform.replaceAll('-', '_') + '.bin'; + const { loading: isUploading, uploading: progress, @@ -129,88 +149,158 @@ const UploadDownload: FC = () => { useLayoutTitle(LL.UPLOAD_DOWNLOAD()); - const content = () => ( - <> - - {LL.UPLOAD()} - - - - {LL.UPLOAD_TEXT()} -
-
- {LL.RESTART_TEXT(1)}. -
-
- {md5 && ( - - {'MD5: ' + md5} - - )} - - {!isUploading && ( - <> - - {LL.DOWNLOAD(0)} {LL.SUPPORT_INFORMATION(1)} - - - + const content = () => { + if (!data) { + return ; + } - - {LL.DOWNLOAD(0)} {LL.SETTINGS(1)} + return ( + <> + + {LL.EMS_ESP_VER()} + + + {LL.VERSION_ON() + ' '} + {data.emsesp_version} ({data.esp_platform}) + {latestVersion && ( + + {LL.THE_LATEST()} {LL.OFFICIAL()} {LL.RELEASE_IS()} {latestVersion} +  ( + + {LL.RELEASE_NOTES()} + + ) ( + + {LL.DOWNLOAD(1)} + + ) + + )} + {latestDevVersion && ( + + {LL.THE_LATEST()} {LL.DEVELOPMENT()} {LL.RELEASE_IS()}  + {latestDevVersion} +  ( + + {LL.RELEASE_NOTES()} + + ) ( + + {LL.DOWNLOAD(1)} + + ) + + )} + + + + {LL.UPLOAD()} + + + + {LL.UPLOAD_TEXT()} +
+
+ {LL.RESTART_TEXT(1)}.
- - - {LL.DOWNLOAD_SETTINGS_TEXT()} - + + {md5 && ( + + {'MD5: ' + md5} - - - - {LL.DOWNLOAD_CUSTOMIZATION_TEXT()} + )} + + {!isUploading && ( + <> + + {LL.DOWNLOAD(0)} - - - - - - {LL.DOWNLOAD_SCHEDULE_TEXT()} - - - - - )} - - ); + + + {LL.HELP_INFORMATION_4()} + + + + + + + + {LL.DOWNLOAD_SETTINGS_TEXT()} + + + + + + + {LL.DOWNLOAD_CUSTOMIZATION_TEXT()} + + + + + + {LL.DOWNLOAD_SCHEDULE_TEXT()} + + + + + + )} + + ); + }; + return {restarting ? : content()}; }; diff --git a/interface/src/i18n/de/index.ts b/interface/src/i18n/de/index.ts index 167c4cdc2..7af60142d 100644 --- a/interface/src/i18n/de/index.ts +++ b/interface/src/i18n/de/index.ts @@ -176,13 +176,11 @@ const de: Translation = { STATUS_OF: '{0} Status', UPLOAD_DOWNLOAD: 'Hoch-/Herunterladen', VERSION_ON: 'Sie verwenden derzeit', - SYSTEM_APPLY_FIRMWARE: 'um die neue Firmware anzuwenden', CLOSE: 'Schließen', USE: 'Verwenden Sie', FACTORY_RESET: 'Werkseinstellung', SYSTEM_FACTORY_TEXT: 'EMS-ESP wurde auf Werkseinstellung gesetzt und startet als Zugangspunkt neu', SYSTEM_FACTORY_TEXT_DIALOG: 'Sind Sie sicher alle Einstellungen auf Werkseinstellung zu setzen?', - VERSION_CHECK: 'Versionsprüfung', THE_LATEST: 'Die neueste', OFFICIAL: 'offizielle', DEVELOPMENT: 'Entwicklungs', diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts index 1d08d0772..465637f39 100644 --- a/interface/src/i18n/en/index.ts +++ b/interface/src/i18n/en/index.ts @@ -176,13 +176,11 @@ const en: Translation = { STATUS_OF: '{0} Status', UPLOAD_DOWNLOAD: 'Upload/Download', VERSION_ON: 'You are currently on version', - SYSTEM_APPLY_FIRMWARE: 'to apply the new firmware', CLOSE: 'Close', 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 EMS-ESP to its factory defaults?', - VERSION_CHECK: 'Version Check', THE_LATEST: 'The latest', OFFICIAL: 'official', DEVELOPMENT: 'development', diff --git a/interface/src/i18n/fr/index.ts b/interface/src/i18n/fr/index.ts index 5ab9410d0..744c064c7 100644 --- a/interface/src/i18n/fr/index.ts +++ b/interface/src/i18n/fr/index.ts @@ -176,13 +176,11 @@ const fr: Translation = { STATUS_OF: 'Statut {0}', UPLOAD_DOWNLOAD: 'Upload/Download', VERSION_ON: 'You are currently on', // TODO translate - SYSTEM_APPLY_FIRMWARE: 'pour appliquer le nouveau firmware', CLOSE: 'Fermer', USE: 'Utiliser', FACTORY_RESET: 'Réinitialisation', SYSTEM_FACTORY_TEXT: 'L\'appareil a été réinitialisé et va maintenant redémarrer', SYSTEM_FACTORY_TEXT_DIALOG: 'Êtes-vous sûr de vouloir réinitialiser l\'appareil à ses paramètres d\'usine ?', - VERSION_CHECK: 'Vérification de la version', THE_LATEST: 'La dernière', OFFICIAL: 'officielle', DEVELOPMENT: 'développement', diff --git a/interface/src/i18n/it/index.ts b/interface/src/i18n/it/index.ts index aa0f1de37..fc320c453 100644 --- a/interface/src/i18n/it/index.ts +++ b/interface/src/i18n/it/index.ts @@ -178,13 +178,11 @@ const it: Translation = { STATUS_OF: 'Stato {0}', UPLOAD_DOWNLOAD: 'Caricamento/Scaricamento', VERSION_ON: 'Attualmente stai eseguendo la versione', - SYSTEM_APPLY_FIRMWARE: 'per applicare il nuovo firmware', CLOSE: 'Chiudere', USE: 'Usa', FACTORY_RESET: 'Impostazioni di fabbrica', SYSTEM_FACTORY_TEXT: 'Il dispositivo è stato ripristinato alle impostazioni di fabbrica e ora verrà riavviato', SYSTEM_FACTORY_TEXT_DIALOG: 'Sei sicuro di voler ripristinare il dispositivo alle impostazioni di fabbrica??', - VERSION_CHECK: 'Verifica Versione', THE_LATEST: 'Ultima', OFFICIAL: 'ufficiale', DEVELOPMENT: 'sviluppo', diff --git a/interface/src/i18n/nl/index.ts b/interface/src/i18n/nl/index.ts index 784d2bdf9..78d8218ca 100644 --- a/interface/src/i18n/nl/index.ts +++ b/interface/src/i18n/nl/index.ts @@ -176,13 +176,11 @@ const nl: Translation = { STATUS_OF: '{0} Status', UPLOAD_DOWNLOAD: 'Upload/Download', VERSION_ON: 'U bevindt zich momenteel op versie', - SYSTEM_APPLY_FIRMWARE: 'om de nieuwe firmware te activeren', CLOSE: 'Sluiten', USE: 'Gebruik', FACTORY_RESET: 'Fabrieksinstellingen', SYSTEM_FACTORY_TEXT: 'Gateway is gereset en start nu weer op met fabrieksinstellingen', SYSTEM_FACTORY_TEXT_DIALOG: 'Weet je zeker dat je een reset naar fabrieksinstellingen uit wilt voeren?', - VERSION_CHECK: 'Versie Check', THE_LATEST: 'De laatste', OFFICIAL: 'official', DEVELOPMENT: 'development', diff --git a/interface/src/i18n/no/index.ts b/interface/src/i18n/no/index.ts index ead7b9e88..974bfa17c 100644 --- a/interface/src/i18n/no/index.ts +++ b/interface/src/i18n/no/index.ts @@ -176,13 +176,11 @@ const no: Translation = { STATUS_OF: '{0} Status', UPLOAD_DOWNLOAD: 'Opp/Nedlasting', VERSION_ON: 'You are currently on', // TODO translate - SYSTEM_APPLY_FIRMWARE: 'for å aktivere ny firmware', CLOSE: 'Steng', USE: 'Bruk', FACTORY_RESET: 'Sett tilbake til fabrikkinstilling', SYSTEM_FACTORY_TEXT: 'Enhet har blitt satt tilbake til fabrikkinstilling og vil restarte', SYSTEM_FACTORY_TEXT_DIALOG: 'Er du sikker på at du vil resette enheten til fabrikkinstillinger?', - VERSION_CHECK: 'Versjonsjekk', THE_LATEST: 'Den nyeste', OFFICIAL: 'official', DEVELOPMENT: 'development', diff --git a/interface/src/i18n/pl/index.ts b/interface/src/i18n/pl/index.ts index 15e423f3e..38b54f927 100644 --- a/interface/src/i18n/pl/index.ts +++ b/interface/src/i18n/pl/index.ts @@ -176,13 +176,11 @@ const pl: BaseTranslation = { STATUS_OF: 'Status {0}', UPLOAD_DOWNLOAD: 'Przesyłanie plików', VERSION_ON: 'Aktualnie używasz', - SYSTEM_APPLY_FIRMWARE: '', CLOSE: 'Zamknij', USE: 'Aby zaktualizować firmware skorzystaj z funkcji', FACTORY_RESET: 'Ustawienia fabryczne', SYSTEM_FACTORY_TEXT: 'Interfejs EMS-ESP został przywrócony do ustawień fabrycznych i zostanie teraz ponownie uruchomiony.', SYSTEM_FACTORY_TEXT_DIALOG: 'Na pewno chcesz przywrócić ustawienia fabryczne interfejsu EMS-ESP? ', - VERSION_CHECK: 'Sprawd{{ź|zanie|}} wersj{{ę|i|}}', THE_LATEST: 'Najnowsze', OFFICIAL: 'oficjalne', DEVELOPMENT: 'testowe', diff --git a/interface/src/i18n/sk/index.ts b/interface/src/i18n/sk/index.ts index 235793747..ef6adc0e0 100644 --- a/interface/src/i18n/sk/index.ts +++ b/interface/src/i18n/sk/index.ts @@ -176,13 +176,11 @@ const sk: Translation = { STATUS_OF: '{0} Stav', UPLOAD_DOWNLOAD: 'Nahrať/Stiahnuť', VERSION_ON: 'Momentálne ste vo verzii', - SYSTEM_APPLY_FIRMWARE: 'na použitie nového firmvéru', CLOSE: 'Zatvoriť', USE: 'Použiť', FACTORY_RESET: 'Továrenské nastavenia', SYSTEM_FACTORY_TEXT: 'Zariadenie bolo obnovené z výroby a teraz sa reštartuje', SYSTEM_FACTORY_TEXT_DIALOG: 'Naozaj chcete resetovať EMS-ESP na predvolené výrobné nastavenia?', - VERSION_CHECK: 'Kontrola verzie', THE_LATEST: 'Posledná', OFFICIAL: 'officiálna', DEVELOPMENT: 'vývojárska', diff --git a/interface/src/i18n/sv/index.ts b/interface/src/i18n/sv/index.ts index 7777989dd..588b86462 100644 --- a/interface/src/i18n/sv/index.ts +++ b/interface/src/i18n/sv/index.ts @@ -176,13 +176,11 @@ const sv: Translation = { STATUS_OF: '{0} Status', UPLOAD_DOWNLOAD: 'Upp/Nedladdning', VERSION_ON: 'You are currently on', // TODO translate - SYSTEM_APPLY_FIRMWARE: 'för att aktivera ny firmware', CLOSE: 'Stäng', USE: 'Använd', FACTORY_RESET: 'Fabriksåterställning', SYSTEM_FACTORY_TEXT: 'Enheten har blivit fabriksåterställd och startar nu om', SYSTEM_FACTORY_TEXT_DIALOG: 'Är du säker att du vill fabriksåterställa enheten?', - VERSION_CHECK: 'Senaste versioner', THE_LATEST: 'Den senaste', OFFICIAL: 'officiell', DEVELOPMENT: 'utveckling', diff --git a/interface/src/i18n/tr/index.ts b/interface/src/i18n/tr/index.ts index 2e97ffe2a..e229331b5 100644 --- a/interface/src/i18n/tr/index.ts +++ b/interface/src/i18n/tr/index.ts @@ -176,13 +176,11 @@ const tr: Translation = { STATUS_OF: '{0} Durumu', UPLOAD_DOWNLOAD: 'Yükleme/İndirme', VERSION_ON: 'You are currently on', // TODO translate - SYSTEM_APPLY_FIRMWARE: 'yeni bellenimi uygulamak için', CLOSE: 'Kapat', USE: 'KUllan', FACTORY_RESET: 'Fabrika ayarına dönme', SYSTEM_FACTORY_TEXT: 'Cihaz fabrika ayarlarına döndü ve şimdi yendiden başlatılacak', SYSTEM_FACTORY_TEXT_DIALOG: 'Cihazı fabrika ayarlarına döndürmek istediğinize emin misiniz?', - VERSION_CHECK: 'Sürüm Kontrolü', THE_LATEST: 'En son', OFFICIAL: 'resmi', DEVELOPMENT: 'geliştirme', diff --git a/interface/src/project/DeviceIcon.tsx b/interface/src/project/DeviceIcon.tsx index 4362b7062..d7e9645a9 100644 --- a/interface/src/project/DeviceIcon.tsx +++ b/interface/src/project/DeviceIcon.tsx @@ -42,7 +42,7 @@ const DeviceIcon: FC = ({ type_id }) => { case DeviceType.EXTENSION: return ; case DeviceType.CUSTOM: - return ; + return ; default: return null; } diff --git a/interface/src/types/system.ts b/interface/src/types/system.ts index e78f0b1cf..04eee0593 100644 --- a/interface/src/types/system.ts +++ b/interface/src/types/system.ts @@ -1,4 +1,5 @@ export interface SystemStatus { + // TODO fix this next emsesp_version: string; esp_platform: string; max_alloc_heap: number; diff --git a/interface/yarn.lock b/interface/yarn.lock index 5e936c207..694cb7e40 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -1458,7 +1458,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:^18.2.66": +"@types/react@npm:*": version: 18.2.66 resolution: "@types/react@npm:18.2.66" dependencies: @@ -1469,6 +1469,17 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:^18.2.67": + version: 18.2.67 + resolution: "@types/react@npm:18.2.67" + dependencies: + "@types/prop-types": "npm:*" + "@types/scheduler": "npm:*" + csstype: "npm:^3.0.2" + checksum: 10/d7e248dbe8d9d3b05f0d8e128d615fc9c85aa2c5d15634271d20cb9b343dbeffb0875f31a44e7ac63b42afc25949bd4c3633b7ebee45ee4666591ca934a8dffb + languageName: node + linkType: hard + "@types/responselike@npm:^1.0.0": version: 1.0.3 resolution: "@types/responselike@npm:1.0.3" @@ -1501,15 +1512,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^7.2.0": - version: 7.2.0 - resolution: "@typescript-eslint/eslint-plugin@npm:7.2.0" +"@typescript-eslint/eslint-plugin@npm:^7.3.0": + version: 7.3.0 + resolution: "@typescript-eslint/eslint-plugin@npm:7.3.0" dependencies: "@eslint-community/regexpp": "npm:^4.5.1" - "@typescript-eslint/scope-manager": "npm:7.2.0" - "@typescript-eslint/type-utils": "npm:7.2.0" - "@typescript-eslint/utils": "npm:7.2.0" - "@typescript-eslint/visitor-keys": "npm:7.2.0" + "@typescript-eslint/scope-manager": "npm:7.3.0" + "@typescript-eslint/type-utils": "npm:7.3.0" + "@typescript-eslint/utils": "npm:7.3.0" + "@typescript-eslint/visitor-keys": "npm:7.3.0" debug: "npm:^4.3.4" graphemer: "npm:^1.4.0" ignore: "npm:^5.2.4" @@ -1522,44 +1533,44 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/c50366021d63dc0f31fbd4673679d41eeaf53e1d411330742ea6e36bc854d5d9d52531df9efe708078e5c798fb9a6fca45473a451c197f46ac04050d47c9a9d2 + checksum: 10/6728d30193446f1477c3b566fb33b762c95e531b385f1aeb4d5a28b488278e7a66e1efaa7de8ffea75eb470a99c78c9ffe022067b043bd4e3c936dd26d59df0b languageName: node linkType: hard -"@typescript-eslint/parser@npm:^7.2.0": - version: 7.2.0 - resolution: "@typescript-eslint/parser@npm:7.2.0" +"@typescript-eslint/parser@npm:^7.3.0": + version: 7.3.0 + resolution: "@typescript-eslint/parser@npm:7.3.0" dependencies: - "@typescript-eslint/scope-manager": "npm:7.2.0" - "@typescript-eslint/types": "npm:7.2.0" - "@typescript-eslint/typescript-estree": "npm:7.2.0" - "@typescript-eslint/visitor-keys": "npm:7.2.0" + "@typescript-eslint/scope-manager": "npm:7.3.0" + "@typescript-eslint/types": "npm:7.3.0" + "@typescript-eslint/typescript-estree": "npm:7.3.0" + "@typescript-eslint/visitor-keys": "npm:7.3.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/2236acd9f794ccb34062309f3d6fa2a0e34ac6560262213807a11fb42592011cd13ff3290a2fdbdf441fb3d248cbe23383e6c7e6c744d1cacc916159d885204f + checksum: 10/df06a4e8d734951bb6843797f04e315122be071bbc5cc7939c9a0e61480fa3045e363db8862cdc81ebf04abd594cc1cedf625ba33fc62918319c4bd2ba7fb5fc languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.2.0": - version: 7.2.0 - resolution: "@typescript-eslint/scope-manager@npm:7.2.0" +"@typescript-eslint/scope-manager@npm:7.3.0": + version: 7.3.0 + resolution: "@typescript-eslint/scope-manager@npm:7.3.0" dependencies: - "@typescript-eslint/types": "npm:7.2.0" - "@typescript-eslint/visitor-keys": "npm:7.2.0" - checksum: 10/9b1d43c87b0fc269df1820ebcbdb08e1c5c8cc719a6af8298d87077ca78cf5ebbfa8caa6eb5141f4dfb4cbb3a641291c50c73a213faab90bc43d34abfc68a1fe + "@typescript-eslint/types": "npm:7.3.0" + "@typescript-eslint/visitor-keys": "npm:7.3.0" + checksum: 10/380ac558032f396dd7cf8a38d91a462358bef559cb2d6fcbe6a15faf846923ec31e46054d48e18def609e7c955d14ca67790d578e7a08511815b876b4497d8ac languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.2.0": - version: 7.2.0 - resolution: "@typescript-eslint/type-utils@npm:7.2.0" +"@typescript-eslint/type-utils@npm:7.3.0": + version: 7.3.0 + resolution: "@typescript-eslint/type-utils@npm:7.3.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.2.0" - "@typescript-eslint/utils": "npm:7.2.0" + "@typescript-eslint/typescript-estree": "npm:7.3.0" + "@typescript-eslint/utils": "npm:7.3.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.0.1" peerDependencies: @@ -1567,23 +1578,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/1c4efcd068987ed5bbf6f3dda1fed313eec84fc0840af6e00593338cc2605c96ab760bf83f868271a6b5fcde8a44d00e21b70a8607474a4df9d43d29775bb235 + checksum: 10/361ac197924ebc0d8530e786b1573c557589d264d3988dbe25d301d71470bcf0168e694ab31dc8b8c7385c54b178e0005e4e7b17fa2a7e617a58a363ec3d84af languageName: node linkType: hard -"@typescript-eslint/types@npm:7.2.0": - version: 7.2.0 - resolution: "@typescript-eslint/types@npm:7.2.0" - checksum: 10/d70cbd77f21caddbb1c3519bb523b5217a300d52682e9acfa9ff645d7250f7f07653f48930f531675216e848b5f83cb9b14cf63db76239cec1159550a989e16d +"@typescript-eslint/types@npm:7.3.0": + version: 7.3.0 + resolution: "@typescript-eslint/types@npm:7.3.0" + checksum: 10/7e190be9e051268f582b1ad6482adc60c1d55aef59c9ed7d962df7dfb114f41ff0b95b984cf91a295cdac6b8f530f70f5768e926eeb606801d6f2ec3f772427b languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.2.0": - version: 7.2.0 - resolution: "@typescript-eslint/typescript-estree@npm:7.2.0" +"@typescript-eslint/typescript-estree@npm:7.3.0": + version: 7.3.0 + resolution: "@typescript-eslint/typescript-estree@npm:7.3.0" dependencies: - "@typescript-eslint/types": "npm:7.2.0" - "@typescript-eslint/visitor-keys": "npm:7.2.0" + "@typescript-eslint/types": "npm:7.3.0" + "@typescript-eslint/visitor-keys": "npm:7.3.0" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -1593,34 +1604,34 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/77a81dc903da1ccb302c96bf7f845f297d87ab7871849bfabdddee51583646a1147923fc23c550c6c783229bc7bda37a3ea147478fa08b3847d0440a34587198 + checksum: 10/af3bf304401b184cd56d72aa95cc4f924ae33ae35206fa848c1ea3a2c647b03e05e8b19f42c14c5fdd67d4a47f4e9fcbc34c9b566d2fe3f93a7fd297c6241bbb languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.2.0": - version: 7.2.0 - resolution: "@typescript-eslint/utils@npm:7.2.0" +"@typescript-eslint/utils@npm:7.3.0": + version: 7.3.0 + resolution: "@typescript-eslint/utils@npm:7.3.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" "@types/json-schema": "npm:^7.0.12" "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:7.2.0" - "@typescript-eslint/types": "npm:7.2.0" - "@typescript-eslint/typescript-estree": "npm:7.2.0" + "@typescript-eslint/scope-manager": "npm:7.3.0" + "@typescript-eslint/types": "npm:7.3.0" + "@typescript-eslint/typescript-estree": "npm:7.3.0" semver: "npm:^7.5.4" peerDependencies: eslint: ^8.56.0 - checksum: 10/4852d43f1e0ca7e4914fef6cb5984a472d77af6fafcfad18905c0ba2ac5539a7ba8e72a4b3f7cbff712733f9cf8e8af790b4875f944aae1006ca297f8e041d32 + checksum: 10/349b353fdf03ed8f627287136b0cbc1fe40c670e6bd59099a6cc8ea1e37f2cc12a4d0cdf84e3a635a4f44bab92bd9d84b2c4d16525130b34cc27484177ce19b8 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.2.0": - version: 7.2.0 - resolution: "@typescript-eslint/visitor-keys@npm:7.2.0" +"@typescript-eslint/visitor-keys@npm:7.3.0": + version: 7.3.0 + resolution: "@typescript-eslint/visitor-keys@npm:7.3.0" dependencies: - "@typescript-eslint/types": "npm:7.2.0" + "@typescript-eslint/types": "npm:7.3.0" eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/e0c9c7a9bb1ae93149e7a4816aed12651fd7374d0eb17e1f45348dbfddd8ee7014d3de35b40bc46b9df73cc1c9053aaf5d82b43270d93a0b551ed14e8afde37a + checksum: 10/814d52a33eefddd32d522c9f8f3f9e163efb642e1fef5c57981bbf51382c5081451d01050e1a00d20cfbf60bfd8274a1eee4f393dbd3ec69dc5a9d36fea89269 languageName: node linkType: hard @@ -1647,11 +1658,11 @@ __metadata: "@types/imagemin": "npm:^8.0.5" "@types/lodash-es": "npm:^4.17.12" "@types/node": "npm:^20.11.28" - "@types/react": "npm:^18.2.66" + "@types/react": "npm:^18.2.67" "@types/react-dom": "npm:^18.2.22" "@types/react-router-dom": "npm:^5.3.3" - "@typescript-eslint/eslint-plugin": "npm:^7.2.0" - "@typescript-eslint/parser": "npm:^7.2.0" + "@typescript-eslint/eslint-plugin": "npm:^7.3.0" + "@typescript-eslint/parser": "npm:^7.3.0" alova: "npm:^2.17.1" async-validator: "npm:^4.2.5" concurrently: "npm:^8.2.2" @@ -1668,7 +1679,7 @@ __metadata: jwt-decode: "npm:^4.0.0" lodash-es: "npm:^4.17.21" mime-types: "npm:^2.1.35" - preact: "npm:^10.19.6" + preact: "npm:^10.19.7" prettier: "npm:^3.2.5" react: "npm:latest" react-dom: "npm:latest" @@ -6658,10 +6669,10 @@ __metadata: languageName: node linkType: hard -"preact@npm:^10.19.6": - version: 10.19.6 - resolution: "preact@npm:10.19.6" - checksum: 10/851c7d91e6899a40fdeae0ef9a792bf3217ed8365ce96f4c5630048c82b44c637fd4c0d8a4b0c3e1c8e74e243600dd9c5787520da07552d33a06c957779b4167 +"preact@npm:^10.19.7": + version: 10.19.7 + resolution: "preact@npm:10.19.7" + checksum: 10/3f64d5a0c7c01f773d5fa35ee408aa7efa87cccab75fbce2db413111815054eadef0329c65725b8f0d78d3116d6a576a6d0d4f9772450849cdd60bf325280a2a languageName: node linkType: hard