mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
rename Saved to Updated
This commit is contained in:
@@ -3,7 +3,7 @@ import { ValidateFieldsError } from 'async-validator';
|
||||
import { range } from 'lodash';
|
||||
|
||||
import { Button, Checkbox, MenuItem } from '@mui/material';
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
|
||||
import { createAPSettingsValidator, validate } from '../../validators';
|
||||
@@ -178,10 +178,10 @@ const APSettingsForm: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
disabled={saving}
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
variant="contained"
|
||||
color="info"
|
||||
type="submit"
|
||||
onClick={validateAndSubmit}
|
||||
>
|
||||
|
||||
@@ -2,7 +2,7 @@ import { FC, useState } from 'react';
|
||||
import { ValidateFieldsError } from 'async-validator';
|
||||
|
||||
import { Button, Checkbox, MenuItem, Grid, Typography, InputAdornment } from '@mui/material';
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
|
||||
import { createMqttSettingsValidator, validate } from '../../validators';
|
||||
@@ -388,10 +388,10 @@ const MqttSettingsForm: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
disabled={saving}
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
variant="contained"
|
||||
color="info"
|
||||
type="submit"
|
||||
onClick={validateAndSubmit}
|
||||
>
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
|
||||
import LockOpenIcon from '@mui/icons-material/LockOpen';
|
||||
import DeleteIcon from '@mui/icons-material/Delete';
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import LockIcon from '@mui/icons-material/Lock';
|
||||
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
@@ -313,10 +313,10 @@ const WiFiSettingsForm: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
disabled={saving}
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
variant="contained"
|
||||
color="info"
|
||||
type="submit"
|
||||
onClick={validateAndSubmit}
|
||||
>
|
||||
|
||||
@@ -2,7 +2,7 @@ import { FC, useState } from 'react';
|
||||
import { ValidateFieldsError } from 'async-validator';
|
||||
|
||||
import { Button, Checkbox, MenuItem } from '@mui/material';
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
|
||||
import { validate } from '../../validators';
|
||||
@@ -94,10 +94,10 @@ const NTPSettingsForm: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
disabled={saving}
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
variant="contained"
|
||||
color="info"
|
||||
type="submit"
|
||||
onClick={validateAndSubmit}
|
||||
>
|
||||
|
||||
@@ -2,7 +2,7 @@ import { FC, useContext, useState } from 'react';
|
||||
import { ValidateFieldsError } from 'async-validator';
|
||||
|
||||
import { Button } from '@mui/material';
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
|
||||
import * as SecurityApi from '../../api/security';
|
||||
@@ -70,10 +70,10 @@ const SecuritySettingsForm: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
disabled={saving}
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
variant="contained"
|
||||
color="info"
|
||||
type="submit"
|
||||
onClick={validateAndSubmit}
|
||||
>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { FC, useState } from 'react';
|
||||
|
||||
import { Button, Checkbox } from '@mui/material';
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
|
||||
import * as SystemApi from '../../api/system';
|
||||
@@ -91,10 +91,10 @@ const OTASettingsForm: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
disabled={saving}
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
variant="contained"
|
||||
color="info"
|
||||
type="submit"
|
||||
onClick={validateAndSubmit}
|
||||
>
|
||||
|
||||
@@ -14,7 +14,6 @@ const de: Translation = {
|
||||
SU_PASSWORD: 'su Passwort',
|
||||
DASHBOARD: 'Kontrollzentrum',
|
||||
SETTINGS_OF: '{0} Einstellungen',
|
||||
SAVED: 'gespeichert',
|
||||
APPLY_CHANGES: 'Apply Changes ({0})', // TODO translate
|
||||
UPDATE: 'Update', // TODO translate
|
||||
HELP_OF: '{0} Hilfe',
|
||||
@@ -49,7 +48,6 @@ const de: Translation = {
|
||||
CANCEL: 'Abbrechen',
|
||||
RESET: 'Zurücksetzen',
|
||||
SEND: 'Senden',
|
||||
SAVE: 'Speichern',
|
||||
REMOVE: 'Entfernen',
|
||||
PROBLEM_UPDATING: 'Problem beim Aktualisieren',
|
||||
PROBLEM_LOADING: 'Problem beim Laden',
|
||||
|
||||
@@ -14,7 +14,6 @@ const en: Translation = {
|
||||
SU_PASSWORD: 'su Password',
|
||||
DASHBOARD: 'Dashboard',
|
||||
SETTINGS_OF: '{0} Settings',
|
||||
SAVED: 'saved',
|
||||
HELP_OF: '{0} Help',
|
||||
LOGGED_IN: 'Logged in as {name}',
|
||||
PLEASE_SIGNIN: 'Please sign in to continue',
|
||||
@@ -47,7 +46,6 @@ const en: Translation = {
|
||||
CANCEL: 'Cancel',
|
||||
RESET: 'Reset',
|
||||
SEND: 'Send',
|
||||
SAVE: 'Save',
|
||||
APPLY_CHANGES: 'Apply Changes ({0})',
|
||||
UPDATE: 'Update',
|
||||
REMOVE: 'Remove',
|
||||
|
||||
@@ -14,7 +14,6 @@ const fr: Translation = {
|
||||
SU_PASSWORD: 'Mot de passe su',
|
||||
DASHBOARD: 'Tableau de bord',
|
||||
SETTINGS_OF: 'Paramètres {0}',
|
||||
SAVED: 'sauvegardé',
|
||||
HELP_OF: 'Aide {0}',
|
||||
LOGGED_IN: 'Connecté en tant que {name}',
|
||||
PLEASE_SIGNIN: 'Veuillez vous connecter pour continuer',
|
||||
@@ -47,7 +46,6 @@ const fr: Translation = {
|
||||
CANCEL: 'Annuler',
|
||||
RESET: 'Réinitialiser',
|
||||
SEND: 'Envoyer',
|
||||
SAVE: 'Sauvegarder',
|
||||
APPLY_CHANGES: 'Apply Changes ({0})', // TODO translate
|
||||
UPDATE: 'Update', // TODO translate
|
||||
REMOVE: 'Enlever',
|
||||
|
||||
@@ -14,7 +14,6 @@ const nl: Translation = {
|
||||
SU_PASSWORD: 'su Wachtwoord',
|
||||
DASHBOARD: 'Dashboard',
|
||||
SETTINGS_OF: '{0} Instellingen',
|
||||
SAVED: 'opgeslagen',
|
||||
HELP_OF: '{0} Help',
|
||||
LOGGED_IN: 'Ingelogd als {name}',
|
||||
PLEASE_SIGNIN: 'Log in om verder te gaan',
|
||||
@@ -47,7 +46,6 @@ const nl: Translation = {
|
||||
CANCEL: 'Annuleren',
|
||||
RESET: 'Reset',
|
||||
SEND: 'Verzenden',
|
||||
SAVE: 'Opslaan',
|
||||
APPLY_CHANGES: 'Apply Changes ({0})', // TODO translate
|
||||
UPDATE: 'Update', // TODO translate
|
||||
REMOVE: 'Verwijderen',
|
||||
|
||||
@@ -14,7 +14,6 @@ const no: Translation = {
|
||||
SU_PASSWORD: 'su Passord',
|
||||
DASHBOARD: 'Dashboard',
|
||||
SETTINGS_OF: '{0} Innstillinger',
|
||||
SAVED: 'lagret',
|
||||
HELP_OF: '{0} Hjelp',
|
||||
LOGGED_IN: 'Logget in som {name}',
|
||||
PLEASE_SIGNIN: 'Venligst logge inn for å fortsetta',
|
||||
@@ -47,7 +46,6 @@ const no: Translation = {
|
||||
CANCEL: 'Avbryt',
|
||||
RESET: 'Nullstill',
|
||||
SEND: 'Send',
|
||||
SAVE: 'Lagre',
|
||||
APPLY_CHANGES: 'Apply Changes ({0})', // TODO translate
|
||||
UPDATE: 'Update', // TODO translate
|
||||
REMOVE: 'Fjern',
|
||||
|
||||
@@ -14,7 +14,6 @@ const pl: BaseTranslation = {
|
||||
SU_PASSWORD: 'Hasło "su"',
|
||||
DASHBOARD: 'Pulpit',
|
||||
SETTINGS_OF: 'Ustawienia {0}',
|
||||
SAVED: 'zostały zapisane.',
|
||||
HELP_OF: 'Pomoc {0}',
|
||||
LOGGED_IN: 'Zalogowano użytkownika {name}.',
|
||||
PLEASE_SIGNIN: 'Zaloguj się aby kontynuować.',
|
||||
@@ -47,7 +46,6 @@ const pl: BaseTranslation = {
|
||||
CANCEL: 'Anuluj',
|
||||
RESET: 'Reset{{uj|owanie|}}',
|
||||
SEND: 'Wyślij',
|
||||
SAVE: 'Zapisz',
|
||||
APPLY_CHANGES: 'Apply Changes ({0})', // TODO translate
|
||||
UPDATE: 'Update', // TODO translate
|
||||
REMOVE: 'Usuń',
|
||||
|
||||
@@ -14,7 +14,6 @@ const sv: Translation = {
|
||||
SU_PASSWORD: 'su Lösenord',
|
||||
DASHBOARD: 'Kontrollpanel',
|
||||
SETTINGS_OF: '{0} Inställningar',
|
||||
SAVED: 'Sparat',
|
||||
HELP_OF: '{0} Hjälp',
|
||||
LOGGED_IN: 'Inloggad som {name}',
|
||||
PLEASE_SIGNIN: 'Vänligen logga in för att fortsätta',
|
||||
@@ -47,7 +46,6 @@ const sv: Translation = {
|
||||
CANCEL: 'Avbryt',
|
||||
RESET: 'Nollställ',
|
||||
SEND: 'Skicka',
|
||||
SAVE: 'Spara',
|
||||
APPLY_CHANGES: 'Apply Changes ({0})', // TODO translate
|
||||
UPDATE: 'Update', // TODO translate
|
||||
REMOVE: 'Ta bort',
|
||||
|
||||
@@ -35,7 +35,7 @@ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
||||
import AddCircleOutlineOutlinedIcon from '@mui/icons-material/AddCircleOutlineOutlined';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
import SendIcon from '@mui/icons-material/TrendingFlat';
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import RemoveIcon from '@mui/icons-material/RemoveCircleOutline';
|
||||
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
|
||||
import EditOffOutlinedIcon from '@mui/icons-material/EditOffOutlined';
|
||||
@@ -628,11 +628,11 @@ const DashboardData: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
variant="outlined"
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
variant="contained"
|
||||
type="submit"
|
||||
onClick={() => sendSensor()}
|
||||
color="warning"
|
||||
color="info"
|
||||
>
|
||||
{LL.UPDATE()}
|
||||
</Button>
|
||||
@@ -1229,11 +1229,11 @@ const DashboardData: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
variant="outlined"
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
variant="contained"
|
||||
type="submit"
|
||||
onClick={() => sendAnalog()}
|
||||
color="warning"
|
||||
color="info"
|
||||
>
|
||||
{LL.UPDATE()}
|
||||
</Button>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useSnackbar } from 'notistack';
|
||||
|
||||
import { Box, Button, Checkbox, MenuItem, Grid, Typography, Divider, InputAdornment } from '@mui/material';
|
||||
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';
|
||||
|
||||
@@ -645,10 +645,10 @@ const SettingsApplication: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
disabled={saving}
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
variant="contained"
|
||||
color="info"
|
||||
type="submit"
|
||||
onClick={validateAndSubmit}
|
||||
>
|
||||
|
||||
@@ -23,7 +23,7 @@ import { Header, HeaderRow, HeaderCell, Body, Row, Cell } from '@table-library/r
|
||||
|
||||
import { useSnackbar } from 'notistack';
|
||||
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
|
||||
import SettingsBackupRestoreIcon from '@mui/icons-material/SettingsBackupRestore';
|
||||
@@ -571,7 +571,12 @@ const SettingsCustomization: FC = () => {
|
||||
<Box flexGrow={1}>
|
||||
<ButtonRow>
|
||||
{num_changes !== 0 && (
|
||||
<Button startIcon={<SaveIcon />} variant="outlined" color="primary" onClick={() => saveCustomization()}>
|
||||
<Button
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
variant="contained"
|
||||
color="info"
|
||||
onClick={() => saveCustomization()}
|
||||
>
|
||||
{LL.APPLY_CHANGES(num_changes)}
|
||||
</Button>
|
||||
)}
|
||||
@@ -650,11 +655,11 @@ const SettingsCustomization: FC = () => {
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SaveIcon />}
|
||||
variant="outlined"
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
variant="contained"
|
||||
type="submit"
|
||||
onClick={() => updateEntity()}
|
||||
color="warning"
|
||||
color="info"
|
||||
>
|
||||
{LL.UPDATE()}
|
||||
</Button>
|
||||
|
||||
@@ -53,7 +53,7 @@ export const useRest = <D>({ read, update }: RestRequestOptions<D>) => {
|
||||
if (response.status === 202) {
|
||||
setRestartNeeded(true);
|
||||
} else {
|
||||
enqueueSnackbar(LL.SETTINGS_OF('') + ' ' + LL.SAVED(), { variant: 'success' });
|
||||
enqueueSnackbar(LL.UPDATED_OF(LL.SETTINGS_OF('')), { variant: 'success' });
|
||||
}
|
||||
} catch (error) {
|
||||
const message = extractErrorMessage(error, LL.PROBLEM_UPDATING());
|
||||
|
||||
Reference in New Issue
Block a user