mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
remove Reset button from WebUI
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
# Remember to also enable CORS in platformio.ini before uploading the code to the device.
|
# Remember to also enable CORS in platformio.ini before uploading the code to the device.
|
||||||
|
|
||||||
# ESP32 dev
|
# ESP32 dev
|
||||||
REACT_APP_HTTP_ROOT=http://10.10.10.194
|
#REACT_APP_HTTP_ROOT=http://10.10.10.194
|
||||||
REACT_APP_WEB_SOCKET_ROOT=ws://10.10.10.194
|
#REACT_APP_WEB_SOCKET_ROOT=ws://10.10.10.194
|
||||||
|
|
||||||
# ESP8266 dev
|
# ESP8266 dev
|
||||||
#REACT_APP_HTTP_ROOT=http://10.10.10.140
|
REACT_APP_HTTP_ROOT=http://10.10.10.140
|
||||||
#REACT_APP_WEB_SOCKET_ROOT=ws://10.10.10.140
|
REACT_APP_WEB_SOCKET_ROOT=ws://10.10.10.140
|
||||||
|
|||||||
1153
interface/package-lock.json
generated
1153
interface/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -26,9 +26,9 @@
|
|||||||
"react-material-ui-form-validator": "^2.0.10",
|
"react-material-ui-form-validator": "^2.0.10",
|
||||||
"react-router": "^5.1.2",
|
"react-router": "^5.1.2",
|
||||||
"react-router-dom": "^5.1.2",
|
"react-router-dom": "^5.1.2",
|
||||||
"react-scripts": "3.4.1",
|
"react-scripts": "3.4.3",
|
||||||
"sockette": "^2.0.6",
|
"sockette": "^2.0.6",
|
||||||
"typescript": "^3.9.5",
|
"typescript": "^4.0.2",
|
||||||
"zlib": "^1.0.5"
|
"zlib": "^1.0.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class APSettingsForm extends React.Component<APSettingsFormProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data, handleValueChange, saveData, loadData } = this.props;
|
const { data, handleValueChange, saveData } = this.props;
|
||||||
return (
|
return (
|
||||||
<ValidatorForm onSubmit={saveData} ref="APSettingsForm">
|
<ValidatorForm onSubmit={saveData} ref="APSettingsForm">
|
||||||
<SelectValidator name="provision_mode"
|
<SelectValidator name="provision_mode"
|
||||||
@@ -97,9 +97,6 @@ class APSettingsForm extends React.Component<APSettingsFormProps> {
|
|||||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||||
Save
|
Save
|
||||||
</FormButton>
|
</FormButton>
|
||||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
|
||||||
Reset
|
|
||||||
</FormButton>
|
|
||||||
</FormActions>
|
</FormActions>
|
||||||
</ValidatorForm>
|
</ValidatorForm>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export default function RestFormLoader<D>(props: RestFormLoaderProps<D>) {
|
|||||||
{errorMessage}
|
{errorMessage}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button variant="contained" color="secondary" className={classes.button} onClick={loadData}>
|
<Button variant="contained" color="secondary" className={classes.button} onClick={loadData}>
|
||||||
Reset
|
Retry
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class MqttSettingsForm extends React.Component<MqttSettingsFormProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data, handleValueChange, saveData, loadData } = this.props;
|
const { data, handleValueChange, saveData } = this.props;
|
||||||
return (
|
return (
|
||||||
<ValidatorForm onSubmit={saveData}>
|
<ValidatorForm onSubmit={saveData}>
|
||||||
<BlockFormControlLabel
|
<BlockFormControlLabel
|
||||||
@@ -165,9 +165,6 @@ class MqttSettingsForm extends React.Component<MqttSettingsFormProps> {
|
|||||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||||
Save
|
Save
|
||||||
</FormButton>
|
</FormButton>
|
||||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
|
||||||
Reset
|
|
||||||
</FormButton>
|
|
||||||
</FormActions>
|
</FormActions>
|
||||||
</ValidatorForm>
|
</ValidatorForm>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class NTPSettingsForm extends React.Component<NTPSettingsFormProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data, handleValueChange, saveData, loadData } = this.props;
|
const { data, handleValueChange, saveData } = this.props;
|
||||||
return (
|
return (
|
||||||
<ValidatorForm onSubmit={saveData}>
|
<ValidatorForm onSubmit={saveData}>
|
||||||
<BlockFormControlLabel
|
<BlockFormControlLabel
|
||||||
@@ -71,9 +71,6 @@ class NTPSettingsForm extends React.Component<NTPSettingsFormProps> {
|
|||||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||||
Save
|
Save
|
||||||
</FormButton>
|
</FormButton>
|
||||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
|
||||||
Reset
|
|
||||||
</FormButton>
|
|
||||||
</FormActions>
|
</FormActions>
|
||||||
</ValidatorForm>
|
</ValidatorForm>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default restController(EMSESP_SETTINGS_ENDPOINT, EMSESPSettingsController
|
|||||||
type EMSESPSettingsControllerFormProps = RestFormProps<EMSESPSettings>;
|
type EMSESPSettingsControllerFormProps = RestFormProps<EMSESPSettings>;
|
||||||
|
|
||||||
function EMSESPSettingsControllerForm(props: EMSESPSettingsControllerFormProps) {
|
function EMSESPSettingsControllerForm(props: EMSESPSettingsControllerFormProps) {
|
||||||
const { data, saveData, loadData, handleValueChange } = props;
|
const { data, saveData, handleValueChange } = props;
|
||||||
return (
|
return (
|
||||||
<ValidatorForm onSubmit={saveData}>
|
<ValidatorForm onSubmit={saveData}>
|
||||||
<Box bgcolor="info.main" p={2} mt={2} mb={2}>
|
<Box bgcolor="info.main" p={2} mt={2} mb={2}>
|
||||||
@@ -138,9 +138,6 @@ function EMSESPSettingsControllerForm(props: EMSESPSettingsControllerFormProps)
|
|||||||
<FormActions>
|
<FormActions>
|
||||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||||
Save
|
Save
|
||||||
</FormButton>
|
|
||||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
|
||||||
Reset
|
|
||||||
</FormButton>
|
</FormButton>
|
||||||
</FormActions>
|
</FormActions>
|
||||||
</ValidatorForm>
|
</ValidatorForm>
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class ManageUsersForm extends React.Component<ManageUsersFormProps, ManageUsersF
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { width, data, loadData } = this.props;
|
const { width, data } = this.props;
|
||||||
const { user, creating } = this.state;
|
const { user, creating } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
@@ -166,9 +166,6 @@ class ManageUsersForm extends React.Component<ManageUsersFormProps, ManageUsersF
|
|||||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit" disabled={this.noAdminConfigured()}>
|
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit" disabled={this.noAdminConfigured()}>
|
||||||
Save
|
Save
|
||||||
</FormButton>
|
</FormButton>
|
||||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
|
||||||
Reset
|
|
||||||
</FormButton>
|
|
||||||
</FormActions>
|
</FormActions>
|
||||||
</ValidatorForm>
|
</ValidatorForm>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class SecuritySettingsForm extends React.Component<SecuritySettingsFormProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data, handleValueChange, loadData } = this.props;
|
const { data, handleValueChange } = this.props;
|
||||||
return (
|
return (
|
||||||
<ValidatorForm onSubmit={this.onSubmit}>
|
<ValidatorForm onSubmit={this.onSubmit}>
|
||||||
<PasswordValidator
|
<PasswordValidator
|
||||||
@@ -42,9 +42,6 @@ class SecuritySettingsForm extends React.Component<SecuritySettingsFormProps> {
|
|||||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||||
Save
|
Save
|
||||||
</FormButton>
|
</FormButton>
|
||||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
|
||||||
Reset
|
|
||||||
</FormButton>
|
|
||||||
</FormActions>
|
</FormActions>
|
||||||
</ValidatorForm>
|
</ValidatorForm>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class OTASettingsForm extends React.Component<OTASettingsFormProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data, handleValueChange, saveData, loadData } = this.props;
|
const { data, handleValueChange, saveData } = this.props;
|
||||||
return (
|
return (
|
||||||
<ValidatorForm onSubmit={saveData}>
|
<ValidatorForm onSubmit={saveData}>
|
||||||
<BlockFormControlLabel
|
<BlockFormControlLabel
|
||||||
@@ -57,9 +57,6 @@ class OTASettingsForm extends React.Component<OTASettingsFormProps> {
|
|||||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||||
Save
|
Save
|
||||||
</FormButton>
|
</FormButton>
|
||||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
|
||||||
Reset
|
|
||||||
</FormButton>
|
|
||||||
</FormActions>
|
</FormActions>
|
||||||
</ValidatorForm>
|
</ValidatorForm>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -191,9 +191,6 @@ class WiFiSettingsForm extends React.Component<WiFiStatusFormProps> {
|
|||||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||||
Save
|
Save
|
||||||
</FormButton>
|
</FormButton>
|
||||||
<FormButton variant="contained" color="secondary" onClick={this.deselectNetworkAndLoadData}>
|
|
||||||
Reset
|
|
||||||
</FormButton>
|
|
||||||
</FormActions>
|
</FormActions>
|
||||||
</ValidatorForm>
|
</ValidatorForm>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user