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.
|
||||
|
||||
# ESP32 dev
|
||||
REACT_APP_HTTP_ROOT=http://10.10.10.194
|
||||
REACT_APP_WEB_SOCKET_ROOT=ws://10.10.10.194
|
||||
#REACT_APP_HTTP_ROOT=http://10.10.10.194
|
||||
#REACT_APP_WEB_SOCKET_ROOT=ws://10.10.10.194
|
||||
|
||||
# ESP8266 dev
|
||||
#REACT_APP_HTTP_ROOT=http://10.10.10.140
|
||||
#REACT_APP_WEB_SOCKET_ROOT=ws://10.10.10.140
|
||||
REACT_APP_HTTP_ROOT=http://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-router": "^5.1.2",
|
||||
"react-router-dom": "^5.1.2",
|
||||
"react-scripts": "3.4.1",
|
||||
"react-scripts": "3.4.3",
|
||||
"sockette": "^2.0.6",
|
||||
"typescript": "^3.9.5",
|
||||
"typescript": "^4.0.2",
|
||||
"zlib": "^1.0.5"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -19,7 +19,7 @@ class APSettingsForm extends React.Component<APSettingsFormProps> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data, handleValueChange, saveData, loadData } = this.props;
|
||||
const { data, handleValueChange, saveData } = this.props;
|
||||
return (
|
||||
<ValidatorForm onSubmit={saveData} ref="APSettingsForm">
|
||||
<SelectValidator name="provision_mode"
|
||||
@@ -97,9 +97,6 @@ class APSettingsForm extends React.Component<APSettingsFormProps> {
|
||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||
Save
|
||||
</FormButton>
|
||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
||||
Reset
|
||||
</FormButton>
|
||||
</FormActions>
|
||||
</ValidatorForm>
|
||||
);
|
||||
|
||||
@@ -47,7 +47,7 @@ export default function RestFormLoader<D>(props: RestFormLoaderProps<D>) {
|
||||
{errorMessage}
|
||||
</Typography>
|
||||
<Button variant="contained" color="secondary" className={classes.button} onClick={loadData}>
|
||||
Reset
|
||||
Retry
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -19,7 +19,7 @@ class MqttSettingsForm extends React.Component<MqttSettingsFormProps> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data, handleValueChange, saveData, loadData } = this.props;
|
||||
const { data, handleValueChange, saveData } = this.props;
|
||||
return (
|
||||
<ValidatorForm onSubmit={saveData}>
|
||||
<BlockFormControlLabel
|
||||
@@ -165,9 +165,6 @@ class MqttSettingsForm extends React.Component<MqttSettingsFormProps> {
|
||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||
Save
|
||||
</FormButton>
|
||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
||||
Reset
|
||||
</FormButton>
|
||||
</FormActions>
|
||||
</ValidatorForm>
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ class NTPSettingsForm extends React.Component<NTPSettingsFormProps> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data, handleValueChange, saveData, loadData } = this.props;
|
||||
const { data, handleValueChange, saveData } = this.props;
|
||||
return (
|
||||
<ValidatorForm onSubmit={saveData}>
|
||||
<BlockFormControlLabel
|
||||
@@ -71,9 +71,6 @@ class NTPSettingsForm extends React.Component<NTPSettingsFormProps> {
|
||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||
Save
|
||||
</FormButton>
|
||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
||||
Reset
|
||||
</FormButton>
|
||||
</FormActions>
|
||||
</ValidatorForm>
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ export default restController(EMSESP_SETTINGS_ENDPOINT, EMSESPSettingsController
|
||||
type EMSESPSettingsControllerFormProps = RestFormProps<EMSESPSettings>;
|
||||
|
||||
function EMSESPSettingsControllerForm(props: EMSESPSettingsControllerFormProps) {
|
||||
const { data, saveData, loadData, handleValueChange } = props;
|
||||
const { data, saveData, handleValueChange } = props;
|
||||
return (
|
||||
<ValidatorForm onSubmit={saveData}>
|
||||
<Box bgcolor="info.main" p={2} mt={2} mb={2}>
|
||||
@@ -138,9 +138,6 @@ function EMSESPSettingsControllerForm(props: EMSESPSettingsControllerFormProps)
|
||||
<FormActions>
|
||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||
Save
|
||||
</FormButton>
|
||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
||||
Reset
|
||||
</FormButton>
|
||||
</FormActions>
|
||||
</ValidatorForm>
|
||||
|
||||
@@ -106,7 +106,7 @@ class ManageUsersForm extends React.Component<ManageUsersFormProps, ManageUsersF
|
||||
}
|
||||
|
||||
render() {
|
||||
const { width, data, loadData } = this.props;
|
||||
const { width, data } = this.props;
|
||||
const { user, creating } = this.state;
|
||||
return (
|
||||
<Fragment>
|
||||
@@ -166,9 +166,6 @@ class ManageUsersForm extends React.Component<ManageUsersFormProps, ManageUsersF
|
||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit" disabled={this.noAdminConfigured()}>
|
||||
Save
|
||||
</FormButton>
|
||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
||||
Reset
|
||||
</FormButton>
|
||||
</FormActions>
|
||||
</ValidatorForm>
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ class SecuritySettingsForm extends React.Component<SecuritySettingsFormProps> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data, handleValueChange, loadData } = this.props;
|
||||
const { data, handleValueChange } = this.props;
|
||||
return (
|
||||
<ValidatorForm onSubmit={this.onSubmit}>
|
||||
<PasswordValidator
|
||||
@@ -42,9 +42,6 @@ class SecuritySettingsForm extends React.Component<SecuritySettingsFormProps> {
|
||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||
Save
|
||||
</FormButton>
|
||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
||||
Reset
|
||||
</FormButton>
|
||||
</FormActions>
|
||||
</ValidatorForm>
|
||||
);
|
||||
|
||||
@@ -18,7 +18,7 @@ class OTASettingsForm extends React.Component<OTASettingsFormProps> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { data, handleValueChange, saveData, loadData } = this.props;
|
||||
const { data, handleValueChange, saveData } = this.props;
|
||||
return (
|
||||
<ValidatorForm onSubmit={saveData}>
|
||||
<BlockFormControlLabel
|
||||
@@ -57,9 +57,6 @@ class OTASettingsForm extends React.Component<OTASettingsFormProps> {
|
||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||
Save
|
||||
</FormButton>
|
||||
<FormButton variant="contained" color="secondary" onClick={loadData}>
|
||||
Reset
|
||||
</FormButton>
|
||||
</FormActions>
|
||||
</ValidatorForm>
|
||||
);
|
||||
|
||||
@@ -191,9 +191,6 @@ class WiFiSettingsForm extends React.Component<WiFiStatusFormProps> {
|
||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||
Save
|
||||
</FormButton>
|
||||
<FormButton variant="contained" color="secondary" onClick={this.deselectNetworkAndLoadData}>
|
||||
Reset
|
||||
</FormButton>
|
||||
</FormActions>
|
||||
</ValidatorForm>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user