mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
Gues mode in help #2054
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 (
|
||||
<>
|
||||
<SectionContent>
|
||||
<List sx={{ borderRadius: 3, border: '2px solid grey' }}>
|
||||
<ListItem>
|
||||
<ListItemButton component="a" href="https://emsesp.org">
|
||||
<ListItemAvatar>
|
||||
<Avatar sx={{ bgcolor: '#72caf9' }}>
|
||||
<MenuBookIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={LL.HELP_INFORMATION_1()} />
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
{me.admin ? (
|
||||
<List sx={{ borderRadius: 3, border: '2px solid grey' }}>
|
||||
<ListItem>
|
||||
<ListItemButton component="a" href="https://emsesp.org">
|
||||
<ListItemAvatar>
|
||||
<Avatar sx={{ bgcolor: '#72caf9' }}>
|
||||
<MenuBookIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={LL.HELP_INFORMATION_1()} />
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
|
||||
<ListItem>
|
||||
<ListItemButton component="a" href="https://discord.gg/3J3GgnzpyT">
|
||||
<ListItemAvatar>
|
||||
<Avatar sx={{ bgcolor: '#72caf9' }}>
|
||||
<CommentIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={LL.HELP_INFORMATION_2()} />
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<ListItemButton component="a" href="https://discord.gg/3J3GgnzpyT">
|
||||
<ListItemAvatar>
|
||||
<Avatar sx={{ bgcolor: '#72caf9' }}>
|
||||
<CommentIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={LL.HELP_INFORMATION_2()} />
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
|
||||
<ListItem>
|
||||
<ListItemButton
|
||||
component="a"
|
||||
href="https://github.com/emsesp/EMS-ESP32/issues/new/choose"
|
||||
>
|
||||
<ListItemAvatar>
|
||||
<Avatar sx={{ bgcolor: '#72caf9' }}>
|
||||
<GitHubIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={LL.HELP_INFORMATION_3()} />
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
</List>
|
||||
<ListItem>
|
||||
<ListItemButton
|
||||
component="a"
|
||||
href="https://github.com/emsesp/EMS-ESP32/issues/new/choose"
|
||||
>
|
||||
<ListItemAvatar>
|
||||
<Avatar sx={{ bgcolor: '#72caf9' }}>
|
||||
<GitHubIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={LL.HELP_INFORMATION_3()} />
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
</List>
|
||||
) : (
|
||||
<Stack
|
||||
spacing={1}
|
||||
padding={1}
|
||||
direction="row"
|
||||
divider={<Divider orientation="vertical" flexItem />}
|
||||
sx={{
|
||||
borderRadius: 3,
|
||||
border: '2px solid grey',
|
||||
justifyContent: 'space-around',
|
||||
alignItems: 'center'
|
||||
}}
|
||||
>
|
||||
<Typography border="red" variant="subtitle1">
|
||||
{LL.HELP_INFORMATION_5()}
|
||||
</Typography>
|
||||
<Box
|
||||
padding={1}
|
||||
component="img"
|
||||
sx={{
|
||||
maxHeight: { xs: 100, md: 250 }
|
||||
}}
|
||||
src="https://emsesp.org/_media/images/installer.jpeg"
|
||||
/>
|
||||
</Stack>
|
||||
)}
|
||||
|
||||
<Box p={2} color="warning.main">
|
||||
<Typography mb={1} variant="body2">
|
||||
@@ -116,23 +151,14 @@ const Help = () => {
|
||||
{LL.DOWNLOAD(1)} {LL.ALLVALUES()}
|
||||
</Button>
|
||||
|
||||
<Box sx={{ p: 2, mt: 4, border: '1px dashed orange' }}>
|
||||
<Typography align="center" variant="subtitle1">
|
||||
{LL.HELP_INFORMATION_5()}
|
||||
</Typography>
|
||||
<Typography align="center" mt={1}>
|
||||
<Link
|
||||
target="_blank"
|
||||
href="https://github.com/emsesp/EMS-ESP32"
|
||||
color="primary"
|
||||
>
|
||||
{'https://github.com/emsesp/EMS-ESP32'}
|
||||
</Link>
|
||||
</Typography>
|
||||
<Typography color="white" variant="subtitle1" align="center">
|
||||
© emsesp.org
|
||||
</Typography>
|
||||
</Box>
|
||||
<Divider sx={{ mt: 4 }} />
|
||||
|
||||
<Typography color="white" variant="subtitle1" align="center" mt={1}>
|
||||
©
|
||||
<Link target="_blank" href="https://ems-esp.org" color="primary">
|
||||
{'emsesp.org'}
|
||||
</Link>
|
||||
</Typography>
|
||||
</SectionContent>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -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: 'For help and questions please contact your installer.', // TODO translate
|
||||
UPLOAD: 'Hochladen',
|
||||
DOWNLOAD: '{{H|h|h}}erunterladen',
|
||||
INSTALL: 'Installieren {0}',
|
||||
|
||||
@@ -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}',
|
||||
|
||||
@@ -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}',
|
||||
|
||||
@@ -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}',
|
||||
|
||||
@@ -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}',
|
||||
|
||||
@@ -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}',
|
||||
|
||||
@@ -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}',
|
||||
|
||||
@@ -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}',
|
||||
|
||||
@@ -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}',
|
||||
|
||||
@@ -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}',
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.7.0-dev.39"
|
||||
#define EMSESP_APP_VERSION "3.7.0-dev.40"
|
||||
|
||||
Reference in New Issue
Block a user