mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
minor text changes
This commit is contained in:
57
interface/package-lock.json
generated
57
interface/package-lock.json
generated
@@ -5204,9 +5204,9 @@
|
|||||||
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
|
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
|
||||||
},
|
},
|
||||||
"eventemitter3": {
|
"eventemitter3": {
|
||||||
"version": "4.0.4",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz",
|
||||||
"integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ=="
|
"integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg=="
|
||||||
},
|
},
|
||||||
"events": {
|
"events": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
@@ -5714,9 +5714,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"follow-redirects": {
|
"follow-redirects": {
|
||||||
"version": "1.12.1",
|
"version": "1.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.10.0.tgz",
|
||||||
"integrity": "sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg=="
|
"integrity": "sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==",
|
||||||
|
"requires": {
|
||||||
|
"debug": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"debug": {
|
||||||
|
"version": "3.2.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
||||||
|
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
||||||
|
"requires": {
|
||||||
|
"ms": "^2.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"for-in": {
|
"for-in": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@@ -6293,9 +6306,9 @@
|
|||||||
"integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q="
|
"integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q="
|
||||||
},
|
},
|
||||||
"http-proxy": {
|
"http-proxy": {
|
||||||
"version": "1.18.1",
|
"version": "1.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
|
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz",
|
||||||
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
|
"integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"eventemitter3": "^4.0.0",
|
"eventemitter3": "^4.0.0",
|
||||||
"follow-redirects": "^1.0.0",
|
"follow-redirects": "^1.0.0",
|
||||||
@@ -8202,9 +8215,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.5",
|
"version": "0.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
@@ -8300,11 +8313,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.5",
|
"version": "0.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||||
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
|
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "^1.2.5"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"moment": {
|
"moment": {
|
||||||
@@ -8540,9 +8553,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notistack": {
|
"notistack": {
|
||||||
"version": "0.9.16",
|
"version": "0.9.17",
|
||||||
"resolved": "https://registry.npmjs.org/notistack/-/notistack-0.9.16.tgz",
|
"resolved": "https://registry.npmjs.org/notistack/-/notistack-0.9.17.tgz",
|
||||||
"integrity": "sha512-+q1KKj2XkU+mKnbp9PbVkRLSLfVYnPJGi+MHT+N9Pm3nZUMVtbjDFodwdv/RoEldvkXKCROnecayUFMwLOiIQA==",
|
"integrity": "sha512-nypTN6sEe+q98wMaxF/UwatA1yAq948+bZOo9JKYR+tU65DW0ipWyx8DseJ3UJYvb6VDD+Fqo83qwayQ46bEEA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"clsx": "^1.1.0",
|
"clsx": "^1.1.0",
|
||||||
"hoist-non-react-statics": "^3.3.0"
|
"hoist-non-react-statics": "^3.3.0"
|
||||||
@@ -9134,9 +9147,9 @@
|
|||||||
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
|
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
|
||||||
},
|
},
|
||||||
"portfinder": {
|
"portfinder": {
|
||||||
"version": "1.0.26",
|
"version": "1.0.25",
|
||||||
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz",
|
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz",
|
||||||
"integrity": "sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==",
|
"integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "^2.6.2",
|
"async": "^2.6.2",
|
||||||
"debug": "^3.1.1",
|
"debug": "^3.1.1",
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"mime-types": "^2.1.25",
|
"mime-types": "^2.1.25",
|
||||||
"moment": "^2.26.0",
|
"moment": "^2.26.0",
|
||||||
"notistack": "^0.9.16",
|
"notistack": "^0.9.17",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-dropzone": "^11.0.1",
|
"react-dropzone": "^11.0.1",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {PasswordValidator} from './components';
|
|||||||
import { PROJECT_NAME, SIGN_IN_ENDPOINT } from './api';
|
import { PROJECT_NAME, SIGN_IN_ENDPOINT } from './api';
|
||||||
|
|
||||||
const styles = (theme: Theme) => createStyles({
|
const styles = (theme: Theme) => createStyles({
|
||||||
loginPage: {
|
signInPage: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
height: "100vh",
|
height: "100vh",
|
||||||
margin: "auto",
|
margin: "auto",
|
||||||
@@ -20,7 +20,7 @@ const styles = (theme: Theme) => createStyles({
|
|||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
maxWidth: theme.breakpoints.values.sm
|
maxWidth: theme.breakpoints.values.sm
|
||||||
},
|
},
|
||||||
loginPanel: {
|
signInPanel: {
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
padding: theme.spacing(2),
|
padding: theme.spacing(2),
|
||||||
paddingTop: "200px",
|
paddingTop: "200px",
|
||||||
@@ -81,7 +81,7 @@ class SignIn extends Component<SignInProps, SignInState> {
|
|||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
return response.json();
|
return response.json();
|
||||||
} else if (response.status === 401) {
|
} else if (response.status === 401) {
|
||||||
throw Error("Invalid login details.");
|
throw Error("Invalid credentials.");
|
||||||
} else {
|
} else {
|
||||||
throw Error("Invalid status code: " + response.status);
|
throw Error("Invalid status code: " + response.status);
|
||||||
}
|
}
|
||||||
@@ -100,8 +100,8 @@ class SignIn extends Component<SignInProps, SignInState> {
|
|||||||
const { username, password, processing } = this.state;
|
const { username, password, processing } = this.state;
|
||||||
const { classes } = this.props;
|
const { classes } = this.props;
|
||||||
return (
|
return (
|
||||||
<div className={classes.loginPage}>
|
<div className={classes.signInPage}>
|
||||||
<Paper className={classes.loginPanel}>
|
<Paper className={classes.signInPanel}>
|
||||||
<Typography variant="h4">{PROJECT_NAME}</Typography>
|
<Typography variant="h4">{PROJECT_NAME}</Typography>
|
||||||
<ValidatorForm onSubmit={this.onSubmit}>
|
<ValidatorForm onSubmit={this.onSubmit}>
|
||||||
<TextValidator
|
<TextValidator
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ class APSettingsForm extends React.Component<APSettingsFormProps> {
|
|||||||
margin="normal"
|
margin="normal"
|
||||||
/>
|
/>
|
||||||
<PasswordValidator
|
<PasswordValidator
|
||||||
validators={['required', 'matchRegexp:^.{1,64}$']}
|
validators={['required', 'matchRegexp:^.{8,64}$']}
|
||||||
errorMessages={['Access Point Password is required', 'Access Point Password must be 64 characters or less']}
|
errorMessages={['Access Point Password is required', 'Access Point Password must be 8-64 characters']}
|
||||||
name="password"
|
name="password"
|
||||||
label="Access Point Password"
|
label="Access Point Password"
|
||||||
fullWidth
|
fullWidth
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export class AuthenticatedRoute extends React.Component<AuthenticatedRouteProps>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
Authentication.storeLoginRedirect(location);
|
Authentication.storeLoginRedirect(location);
|
||||||
enqueueSnackbar("Please log in to continue.", { variant: 'info' });
|
enqueueSnackbar("Please sign in to continue.", { variant: 'info' });
|
||||||
return (
|
return (
|
||||||
<Redirect to='/' />
|
<Redirect to='/' />
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { Features } from '../features/types';
|
|||||||
import { getDefaultRoute } from '../AppRouting';
|
import { getDefaultRoute } from '../AppRouting';
|
||||||
|
|
||||||
export const ACCESS_TOKEN = 'access_token';
|
export const ACCESS_TOKEN = 'access_token';
|
||||||
export const LOGIN_PATHNAME = 'loginPathname';
|
export const SIGN_IN_PATHNAME = 'signInPathname';
|
||||||
export const LOGIN_SEARCH = 'loginSearch';
|
export const SIGN_IN_SEARCH = 'signInSearch';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fallback to sessionStorage if localStorage is absent. WebView may not have local storage enabled.
|
* Fallback to sessionStorage if localStorage is absent. WebView may not have local storage enabled.
|
||||||
@@ -17,23 +17,23 @@ export function getStorage() {
|
|||||||
|
|
||||||
export function storeLoginRedirect(location?: H.Location) {
|
export function storeLoginRedirect(location?: H.Location) {
|
||||||
if (location) {
|
if (location) {
|
||||||
getStorage().setItem(LOGIN_PATHNAME, location.pathname);
|
getStorage().setItem(SIGN_IN_PATHNAME, location.pathname);
|
||||||
getStorage().setItem(LOGIN_SEARCH, location.search);
|
getStorage().setItem(SIGN_IN_SEARCH, location.search);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function clearLoginRedirect() {
|
export function clearLoginRedirect() {
|
||||||
getStorage().removeItem(LOGIN_PATHNAME);
|
getStorage().removeItem(SIGN_IN_PATHNAME);
|
||||||
getStorage().removeItem(LOGIN_SEARCH);
|
getStorage().removeItem(SIGN_IN_SEARCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function fetchLoginRedirect(features: Features): H.LocationDescriptorObject {
|
export function fetchLoginRedirect(features: Features): H.LocationDescriptorObject {
|
||||||
const loginPathname = getStorage().getItem(LOGIN_PATHNAME);
|
const signInPathname = getStorage().getItem(SIGN_IN_PATHNAME);
|
||||||
const loginSearch = getStorage().getItem(LOGIN_SEARCH);
|
const signInSearch = getStorage().getItem(SIGN_IN_SEARCH);
|
||||||
clearLoginRedirect();
|
clearLoginRedirect();
|
||||||
return {
|
return {
|
||||||
pathname: loginPathname || getDefaultRoute(features),
|
pathname: signInPathname || getDefaultRoute(features),
|
||||||
search: (loginPathname && loginSearch) || undefined
|
search: (signInPathname && signInSearch) || undefined
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const FullScreenLoading = () => {
|
|||||||
<div className={classes.fullScreenLoading}>
|
<div className={classes.fullScreenLoading}>
|
||||||
<CircularProgress className={classes.progress} size={100} />
|
<CircularProgress className={classes.progress} size={100} />
|
||||||
<Typography variant="h4">
|
<Typography variant="h4">
|
||||||
Loading …
|
Loading…
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -84,11 +84,11 @@ export function restController<D, P extends RestControllerProps<D>>(endpointUrl:
|
|||||||
}
|
}
|
||||||
throw Error("Invalid status code: " + response.status);
|
throw Error("Invalid status code: " + response.status);
|
||||||
}).then(json => {
|
}).then(json => {
|
||||||
this.props.enqueueSnackbar("Changes successfully applied.", { variant: 'success' });
|
this.props.enqueueSnackbar("Update successful.", { variant: 'success' });
|
||||||
this.setState({ data: json, loading: false });
|
this.setState({ data: json, loading: false });
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
const errorMessage = error.message || "Unknown error";
|
const errorMessage = error.message || "Unknown error";
|
||||||
this.props.enqueueSnackbar("Problem saving: " + errorMessage, { variant: 'error' });
|
this.props.enqueueSnackbar("Problem updating: " + errorMessage, { variant: 'error' });
|
||||||
this.setState({ data: undefined, loading: false, errorMessage });
|
this.setState({ data: undefined, loading: false, errorMessage });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { makeStyles, createStyles } from '@material-ui/styles';
|
|||||||
import CloudUploadIcon from '@material-ui/icons/CloudUpload';
|
import CloudUploadIcon from '@material-ui/icons/CloudUpload';
|
||||||
import CancelIcon from '@material-ui/icons/Cancel';
|
import CancelIcon from '@material-ui/icons/Cancel';
|
||||||
import { Theme, Box, Typography, LinearProgress, Button } from '@material-ui/core';
|
import { Theme, Box, Typography, LinearProgress, Button } from '@material-ui/core';
|
||||||
import ErrorButton from './ErrorButton';
|
|
||||||
|
|
||||||
interface SingleUploadStyleProps extends DropzoneState {
|
interface SingleUploadStyleProps extends DropzoneState {
|
||||||
uploading: boolean;
|
uploading: boolean;
|
||||||
@@ -84,9 +83,9 @@ const SingleUpload: FC<SingleUploadProps> = ({ onDrop, onCancel, accept, uploadi
|
|||||||
<Box width="100%" p={2}>
|
<Box width="100%" p={2}>
|
||||||
{renderProgress(progress)}
|
{renderProgress(progress)}
|
||||||
</Box>
|
</Box>
|
||||||
<ErrorButton startIcon={<CancelIcon />} variant="contained" color="primary" onClick={onCancel}>
|
<Button startIcon={<CancelIcon />} variant="contained" color="secondary" onClick={onCancel}>
|
||||||
Cancel
|
Cancel
|
||||||
</ErrorButton>
|
</Button>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class SecuritySettingsForm extends React.Component<SecuritySettingsFormProps> {
|
|||||||
/>
|
/>
|
||||||
<Box bgcolor="primary.main" color="primary.contrastText" p={2} mt={2} mb={2}>
|
<Box bgcolor="primary.main" color="primary.contrastText" p={2} mt={2} mb={2}>
|
||||||
<Typography variant="body1">
|
<Typography variant="body1">
|
||||||
If you modify the JWT Secret, all users will be logged out.
|
The JWT secret is used to sign authentication tokens. If you modify the JWT Secret, all users will be signed out.
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<FormActions>
|
<FormActions>
|
||||||
|
|||||||
Reference in New Issue
Block a user