diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 59238d799..6285bbc06 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -69,3 +69,4 @@ For more details go to [www.emsesp.org](https://www.emsesp.org/). - Don't start Serial console if not connected to a Serial port. Will initiate manually after a CTRL-C - WebLog UI matches color schema of the terminal console correctly - Updated Web libraries, ArduinoJson +- Help page doesn't show detailed tech info if the user is not 'admin' role [#2054](https://github.com/emsesp/EMS-ESP32/issues/2054) diff --git a/interface/package.json b/interface/package.json index 4ecda7380..508e1ac10 100644 --- a/interface/package.json +++ b/interface/package.json @@ -47,7 +47,7 @@ "@preact/preset-vite": "^2.9.1", "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/formidable": "^3", - "@types/node": "^22.7.2", + "@types/node": "^22.7.3", "@types/react": "^18.3.9", "@types/react-dom": "^18.3.0", "@types/react-router-dom": "^5.3.3", @@ -57,7 +57,7 @@ "formidable": "^3.5.1", "prettier": "^3.3.3", "rollup-plugin-visualizer": "^5.12.0", - "terser": "^5.33.0", + "terser": "^5.34.0", "typescript-eslint": "8.7.0", "vite": "^5.4.8", "vite-plugin-imagemin": "^0.6.1", diff --git a/interface/src/app/main/Customizations.tsx b/interface/src/app/main/Customizations.tsx index 604917ff2..653c28e42 100644 --- a/interface/src/app/main/Customizations.tsx +++ b/interface/src/app/main/Customizations.tsx @@ -309,7 +309,7 @@ const Customizations = () => { const filter_entity = (de: DeviceEntity) => (de.m & selectedFilters || !selectedFilters) && - formatName(de, true).includes(search.toLocaleLowerCase()); + formatName(de, true).includes(search); const maskDisabled = (set: boolean) => { setDeviceEntities( diff --git a/interface/src/app/main/Help.tsx b/interface/src/app/main/Help.tsx index 3518a892a..32b410f04 100644 --- a/interface/src/app/main/Help.tsx +++ b/interface/src/app/main/Help.tsx @@ -1,3 +1,4 @@ +import { useContext } from 'react'; import { toast } from 'react-toastify'; import CommentIcon from '@mui/icons-material/CommentTwoTone'; @@ -8,17 +9,22 @@ import { Avatar, Box, Button, + Divider, Link, List, ListItem, ListItemAvatar, ListItemButton, ListItemText, - Typography + Paper, + Stack, + Typography, + styled } from '@mui/material'; import { useRequest } from 'alova/client'; import { SectionContent, useLayoutTitle } from 'components'; +import { AuthenticatedContext } from 'contexts/authentication'; import { useI18nContext } from 'i18n/i18n-react'; import { API } from '../../api/app'; @@ -28,6 +34,8 @@ const Help = () => { const { LL } = useI18nContext(); useLayoutTitle(LL.HELP()); + const { me } = useContext(AuthenticatedContext); + const { send: sendAPI } = useRequest((data: APIcall) => API(data), { immediate: false }).onSuccess((event) => { @@ -54,43 +62,70 @@ const Help = () => { return ( <> - - - - - - - - - - - + {me.admin ? ( + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + ) : ( + } + sx={{ + borderRadius: 3, + border: '2px solid grey', + justifyContent: 'space-around', + alignItems: 'center' + }} + > + + {LL.HELP_INFORMATION_5()} + + + + )} @@ -116,23 +151,14 @@ const Help = () => { {LL.DOWNLOAD(1)} {LL.ALLVALUES()} - - - {LL.HELP_INFORMATION_5()} - - - - {'https://github.com/emsesp/EMS-ESP32'} - - - - © emsesp.org - - + + + + ©  + + {'emsesp.org'} + + ); diff --git a/interface/src/i18n/de/index.ts b/interface/src/i18n/de/index.ts index ec44fac62..03ad2f1fd 100644 --- a/interface/src/i18n/de/index.ts +++ b/interface/src/i18n/de/index.ts @@ -121,7 +121,7 @@ const de: Translation = { ENABLE_SHOWER_TIMER: 'Duschtimer aktivieren', ENABLE_SHOWER_ALERT: 'Duschalarm aktivieren', TRIGGER_TIME: 'Auslösezeit', - COLD_SHOT_DURATION: 'Kaltschussdauer', + COLD_SHOT_DURATION: 'Kaltwasserzugabe', FORMATTING_OPTIONS: 'Formatierungsoptionen', BOOLEAN_FORMAT_DASHBOARD: 'Boolsches Format für Web', BOOLEAN_FORMAT_API: 'Boolesches Format API/MQTT', @@ -159,7 +159,7 @@ const de: Translation = { HELP_INFORMATION_2: 'Für einen Live-Community-Chat besuchen Sie unseren Discord-Server.', HELP_INFORMATION_3: 'Um neue Funktionen anzufragen oder Fehler zu melden, eröffnen Sie ein Issue auf GitHub.', HELP_INFORMATION_4: 'Bitte laden Sie die Systemdetails und hängen Sie sie an das Support-Issue an.', - HELP_INFORMATION_5: 'EMS-ESP ist ein freies Open-Source Projekt. Bitte unterstützen Sie die zukünftige Entwicklung mit einem Stern "star" auf GitHub!', + HELP_INFORMATION_5: 'Für Hilfe und Fragen wenden Sie sich bitte an Ihren Installateur.', UPLOAD: 'Hochladen', DOWNLOAD: '{{H|h|h}}erunterladen', INSTALL: 'Installieren {0}', diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts index 51e484b13..b9f48abd2 100644 --- a/interface/src/i18n/en/index.ts +++ b/interface/src/i18n/en/index.ts @@ -159,7 +159,7 @@ const en: Translation = { HELP_INFORMATION_2: 'For live community chat join our Discord server', HELP_INFORMATION_3: 'To request a feature or report a bug', HELP_INFORMATION_4: 'Download and attach your support information for a faster response when reporting an issue', - HELP_INFORMATION_5: 'EMS-ESP is a free and open-source project. Please support its future development by giving it a star on GitHub!', + HELP_INFORMATION_5: 'For help and questions please contact your installer.', UPLOAD: 'Upload', DOWNLOAD: '{{D|d|d}}ownload', INSTALL: 'Install {0}', diff --git a/interface/src/i18n/fr/index.ts b/interface/src/i18n/fr/index.ts index 824c3f7be..d9ceff889 100644 --- a/interface/src/i18n/fr/index.ts +++ b/interface/src/i18n/fr/index.ts @@ -159,7 +159,7 @@ const fr: Translation = { HELP_INFORMATION_2: 'Pour une discussion en direct avec la communauté, rejoignez notre serveur Discord', HELP_INFORMATION_3: 'Pour demander une fonctionnalité ou signaler un problème', HELP_INFORMATION_4: "N'oubliez pas de télécharger et de joindre les informations relatives à votre système pour obtenir une réponse plus rapide lorsque vous signalez un problème", - HELP_INFORMATION_5: 'EMS-ESP est un projet libre et open-source. Merci de soutenir son développement futur en lui donnant une étoile sur GitHub !', + HELP_INFORMATION_5: 'For help and questions please contact your installer.', // TODO translate UPLOAD: 'Upload', DOWNLOAD: '{{D|d|d}}ownload', INSTALL: 'Installer {0}', diff --git a/interface/src/i18n/it/index.ts b/interface/src/i18n/it/index.ts index 2e9cc9cab..4dbc4b5a1 100644 --- a/interface/src/i18n/it/index.ts +++ b/interface/src/i18n/it/index.ts @@ -159,7 +159,7 @@ const it: Translation = { HELP_INFORMATION_2: 'Per la chat della community dal vivo unisciti al nostro server Discord', HELP_INFORMATION_3: 'Per richiedere una funzionalità o segnalare un errore', HELP_INFORMATION_4: 'Ricordati di scaricare e allegare le informazioni del tuo sistema per una risposta più rapida quando segnali un problema', - HELP_INFORMATION_5: 'EMS-ESP è un progetto gratuito e open-source. Supporta il suo sviluppo futuro assegnandogli una stella su GitHub!', + HELP_INFORMATION_5: 'For help and questions please contact your installer.', // TODO translate UPLOAD: 'Carica', DOWNLOAD: 'Scarica', INSTALL: 'Installare {0}', diff --git a/interface/src/i18n/nl/index.ts b/interface/src/i18n/nl/index.ts index d35099bee..688b83c43 100644 --- a/interface/src/i18n/nl/index.ts +++ b/interface/src/i18n/nl/index.ts @@ -159,7 +159,7 @@ const nl: Translation = { HELP_INFORMATION_2: 'Voor de live community ga naar de Discord server', HELP_INFORMATION_3: 'Om een nieuwe feature te vragen of een bug te rapporteren', HELP_INFORMATION_4: 'Zorg dat je ook je systeem details zijn toevoeged voor een sneller antwoord', - HELP_INFORMATION_5: 'EMS-ESP is een gratis en open source project. Steun ons met een Star op GitHub!', + HELP_INFORMATION_5: 'For help and questions please contact your installer.', // TODO translate UPLOAD: 'Upload', DOWNLOAD: '{{D|d|d}}ownload', INSTALL: 'Installeren {0}', diff --git a/interface/src/i18n/no/index.ts b/interface/src/i18n/no/index.ts index ef2778ce2..a019130d5 100644 --- a/interface/src/i18n/no/index.ts +++ b/interface/src/i18n/no/index.ts @@ -159,7 +159,7 @@ const no: Translation = { HELP_INFORMATION_2: 'For community-support besøk vår Discord-server', HELP_INFORMATION_3: 'For å be om en ny funksjon eller melde feil', HELP_INFORMATION_4: 'Husk å laste ned og legg ved din systeminformasjon for en raskere respons når du rapporterer et problem', - HELP_INFORMATION_5: 'EMS-ESP er gratis og åpen kildekode. Bidra til utviklingen ved å gi oss en stjerne på GitHub!', + HELP_INFORMATION_5: 'For help and questions please contact your installer.', // TODO translate UPLOAD: 'Opplasning', DOWNLOAD: '{{N|n|n}}edlasting', INSTALL: 'Installer {0}', diff --git a/interface/src/i18n/pl/index.ts b/interface/src/i18n/pl/index.ts index 389917b6c..09d12cff7 100644 --- a/interface/src/i18n/pl/index.ts +++ b/interface/src/i18n/pl/index.ts @@ -159,7 +159,7 @@ const pl: BaseTranslation = { HELP_INFORMATION_2: 'Dołącz do naszego serwera Discord by komunikować się na żywo ze społecznością.', HELP_INFORMATION_3: 'Zaproponuj nową funkcjonalność lub zgłoś problem.', 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!', + HELP_INFORMATION_5: 'For help and questions please contact your installer.', // TODO translate UPLOAD: 'Wysyłanie', DOWNLOAD: '{{P|p||P}}obier{{anie|z||z}}', INSTALL: 'Zainstalować {0}', diff --git a/interface/src/i18n/sk/index.ts b/interface/src/i18n/sk/index.ts index 9c95c03f2..e4e68da93 100644 --- a/interface/src/i18n/sk/index.ts +++ b/interface/src/i18n/sk/index.ts @@ -159,7 +159,7 @@ const sk: Translation = { HELP_INFORMATION_2: 'Pre živý komunitný chat sa pripojte na náš Discord server', HELP_INFORMATION_3: 'Ak chcete požiadať o funkciu alebo nahlásiť chybu', HELP_INFORMATION_4: 'nezabudnite si stiahnuť a pripojiť informácie o vašom systéme, aby ste mohli rýchlejšie reagovať pri nahlasovaní problému', - HELP_INFORMATION_5: 'EMS-ESP je bezplatný a open source projekt. Podporte jeho budúci vývoj tým, že mu dáte hviezdičku na GitHub!', + HELP_INFORMATION_5: 'For help and questions please contact your installer.', // TODO translate UPLOAD: 'Nahrať', DOWNLOAD: '{{S|s|s}}tiahnuť', INSTALL: 'Inštalovať {0}', diff --git a/interface/src/i18n/sv/index.ts b/interface/src/i18n/sv/index.ts index a8cbbd862..0a7be5378 100644 --- a/interface/src/i18n/sv/index.ts +++ b/interface/src/i18n/sv/index.ts @@ -159,7 +159,7 @@ const sv: Translation = { HELP_INFORMATION_2: 'För community-support besök vår Discord-server', HELP_INFORMATION_3: 'Önska en ny funktion eller rapportera en bugg', HELP_INFORMATION_4: 'Bifoga din systeminformation för snabbare hantering när du rapporterar ett problem', - HELP_INFORMATION_5: 'EMS-ESP är gratis och är öppen källkod. Bidra till utvecklingen genom att ge oss en stjärna på GitHub!', + HELP_INFORMATION_5: 'For help and questions please contact your installer.', // TODO translate UPLOAD: 'Uppladdning', DOWNLOAD: '{{N|n|n}}edladdning', INSTALL: 'Installera {0}', diff --git a/interface/src/i18n/tr/index.ts b/interface/src/i18n/tr/index.ts index 0c5f41ff6..a94ef0031 100644 --- a/interface/src/i18n/tr/index.ts +++ b/interface/src/i18n/tr/index.ts @@ -159,7 +159,7 @@ const tr: Translation = { HELP_INFORMATION_2: 'Canlı topluluk sohbeti için Discord sunucumuza katılın', HELP_INFORMATION_3: 'Yeni bir özellik talep etmek yada hata bildirmek için', HELP_INFORMATION_4: 'Bir sorun bildirirken daha hızlı bir dönüş için sistem bilginizi indirip eklemeyi unutmayın', - HELP_INFORMATION_5: 'EMS-ESP ücretsiz ve açık kaynaklı bir projedir. Lütfen geliştirmeyi desteklemek için GitHubda projeye yıldız verin!', + HELP_INFORMATION_5: 'For help and questions please contact your installer.', // TODO translate UPLOAD: 'Yükleme', DOWNLOAD: '{{İ|i|i}}İndirme', INSTALL: 'Düzenlemek {0}', diff --git a/interface/yarn.lock b/interface/yarn.lock index 2ac4eb759..5c976fafc 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -1446,12 +1446,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^22.7.2": - version: 22.7.2 - resolution: "@types/node@npm:22.7.2" +"@types/node@npm:^22.7.3": + version: 22.7.3 + resolution: "@types/node@npm:22.7.3" dependencies: undici-types: "npm:~6.19.2" - checksum: 10c0/987e4df034e4af0ce76b938c2c0d94373da376b228f1c93081a661c77e682795c599bcad47c93c70a25b8ea443587137cf23088fb7f62ef442955f13046eae3d + checksum: 10c0/0e579813528b0370454337a952f43b792cd12731e10fdca0fdb627158e980c1219bba99e9048c134b6a19325d817016059afe016ccd372326c838a1b85a51574 languageName: node linkType: hard @@ -1678,7 +1678,7 @@ __metadata: "@table-library/react-table-library": "npm:4.1.7" "@trivago/prettier-plugin-sort-imports": "npm:^4.3.0" "@types/formidable": "npm:^3" - "@types/node": "npm:^22.7.2" + "@types/node": "npm:^22.7.3" "@types/react": "npm:^18.3.9" "@types/react-dom": "npm:^18.3.0" "@types/react-router-dom": "npm:^5.3.3" @@ -1698,7 +1698,7 @@ __metadata: react-router-dom: "npm:^6.26.2" react-toastify: "npm:^10.0.5" rollup-plugin-visualizer: "npm:^5.12.0" - terser: "npm:^5.33.0" + terser: "npm:^5.34.0" typesafe-i18n: "npm:^5.26.2" typescript: "npm:^5.6.2" typescript-eslint: "npm:8.7.0" @@ -6654,9 +6654,9 @@ __metadata: languageName: node linkType: hard -"terser@npm:^5.33.0": - version: 5.33.0 - resolution: "terser@npm:5.33.0" +"terser@npm:^5.34.0": + version: 5.34.0 + resolution: "terser@npm:5.34.0" dependencies: "@jridgewell/source-map": "npm:^0.3.3" acorn: "npm:^8.8.2" @@ -6664,7 +6664,7 @@ __metadata: source-map-support: "npm:~0.5.20" bin: terser: bin/terser - checksum: 10c0/18a1cd33366dcd8fee7d6eef78c9c417cbe688e5153841e6a574f9d4937066dc40f67b1e96305f73f25bc6f2c458dbe442a056092c99619d4dbee8ad9fae4a3e + checksum: 10c0/74e8ef4e565e5600415cd9377a90eed419b8076465d453c0c76aef4053c45371512d2de76c34d01e004cdd49ea5a749d77eeb343f7e665b2d172158ca08ba23e languageName: node linkType: hard diff --git a/src/version.h b/src/version.h index b8067488c..f18b9395f 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.7.0-dev.39" +#define EMSESP_APP_VERSION "3.7.0-dev.40" diff --git a/src/web/WebLogService.cpp b/src/web/WebLogService.cpp index 4239061da..5686f05b9 100644 --- a/src/web/WebLogService.cpp +++ b/src/web/WebLogService.cpp @@ -141,7 +141,7 @@ void WebLogService::show(Shell & shell) { } shell.println(); - shell.printfln("Last Log (filtered by WebLog's level %s & buffer %d):", format_level_uppercase(log_level()), maximum_log_messages()); + shell.printfln("Recent Log (level %s, max %d messages):", format_level_uppercase(log_level()), maximum_log_messages()); shell.println(); for (const auto & message : log_messages_) {