Browse Source

don't use deprecated theme spacing

master
rjwats 5 years ago
parent
commit
5d9ccd3095
  1. 4
      interface/src/authentication/AuthenticationWrapper.js
  2. 4
      interface/src/components/SectionContent.js
  3. 2
      interface/src/components/SnackbarNotification.js
  4. 6
      interface/src/containers/APStatus.js
  5. 6
      interface/src/containers/NTPStatus.js
  6. 12
      interface/src/containers/SignInPage.js
  7. 6
      interface/src/containers/SystemStatus.js
  8. 6
      interface/src/containers/WiFiStatus.js
  9. 12
      interface/src/forms/APSettingsForm.js
  10. 10
      interface/src/forms/ManageUsersForm.js
  11. 8
      interface/src/forms/NTPSettingsForm.js
  12. 12
      interface/src/forms/OTASettingsForm.js
  13. 8
      interface/src/forms/SecuritySettingsForm.js
  14. 2
      interface/src/forms/UserForm.js
  15. 6
      interface/src/forms/WiFiNetworkSelector.js
  16. 8
      interface/src/forms/WiFiSettingsForm.js
  17. 6
      platformio.ini

4
interface/src/authentication/AuthenticationWrapper.js

@ -11,7 +11,7 @@ import { withStyles } from '@material-ui/core/styles';
const styles = theme => ({
loadingPanel: {
padding: theme.spacing.unit * 2,
padding: theme.spacing(2),
display: "flex",
alignItems: "center",
justifyContent: "center",
@ -19,7 +19,7 @@ const styles = theme => ({
flexDirection: "column"
},
progress: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
}
});

4
interface/src/components/SectionContent.js

@ -7,8 +7,8 @@ import Typography from '@material-ui/core/Typography';
const styles = theme => ({
content: {
padding: theme.spacing.unit * 2,
margin: theme.spacing.unit * 2,
padding: theme.spacing(2),
margin: theme.spacing(2),
}
});

2
interface/src/components/SnackbarNotification.js

@ -7,7 +7,7 @@ import CloseIcon from '@material-ui/icons/Close';
const styles = theme => ({
close: {
padding: theme.spacing.unit / 2,
padding: theme.spacing(0.5),
},
});

6
interface/src/containers/APStatus.js

@ -28,12 +28,12 @@ const styles = theme => ({
backgroundColor: theme.palette.highlight_idle
},
fetching: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

6
interface/src/containers/NTPStatus.js

@ -37,12 +37,12 @@ const styles = theme => ({
backgroundColor: theme.palette.highlight_warn
},
fetching: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

12
interface/src/containers/SignInPage.js

@ -17,30 +17,30 @@ const styles = theme => {
display: "flex",
height: "100vh",
margin: "auto",
padding: theme.spacing.unit * 2,
padding: theme.spacing(2),
justifyContent: "center",
flexDirection: "column",
maxWidth: theme.breakpoints.values.sm
},
loginPanel: {
textAlign: "center",
padding: theme.spacing.unit * 2,
padding: theme.spacing(2),
paddingTop: "200px",
backgroundImage: 'url("/app/icon.png")',
backgroundRepeat: "no-repeat",
backgroundPosition: "50% " + theme.spacing.unit * 2 + "px",
backgroundPosition: "50% " + theme.spacing(2) + "px",
backgroundSize: "auto 150px",
width: "100%"
},
extendedIcon: {
marginRight: theme.spacing.unit,
marginRight: theme.spacing(0.5),
},
textField: {
width: "100%"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
}
}

6
interface/src/containers/SystemStatus.js

@ -23,12 +23,12 @@ import SectionContent from '../components/SectionContent';
const styles = theme => ({
fetching: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

6
interface/src/containers/WiFiStatus.js

@ -38,12 +38,12 @@ const styles = theme => ({
backgroundColor: theme.palette.highlight_warn
},
fetching: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

12
interface/src/forms/APSettingsForm.js

@ -14,10 +14,10 @@ import PasswordValidator from '../components/PasswordValidator';
const styles = theme => ({
loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
},
loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
textField: {
@ -25,12 +25,12 @@ const styles = theme => ({
},
selectField:{
width: "100%",
marginTop: theme.spacing.unit * 2,
marginBottom: theme.spacing.unit
marginTop: theme.spacing(2),
marginBottom: theme.spacing(0.5)
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

10
interface/src/forms/ManageUsersForm.js

@ -26,18 +26,18 @@ import { withAuthenticationContext } from '../authentication/Context';
const styles = theme => ({
loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
},
loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
},
table: {
'& td, & th': { padding: theme.spacing.unit }
'& td, & th': { padding: theme.spacing(0.5) }
},
actions: {
whiteSpace: "nowrap"

8
interface/src/forms/NTPSettingsForm.js

@ -13,18 +13,18 @@ import or from '../validators/or';
const styles = theme => ({
loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
},
loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
textField: {
width: "100%"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

12
interface/src/forms/OTASettingsForm.js

@ -16,23 +16,23 @@ import PasswordValidator from '../components/PasswordValidator';
const styles = theme => ({
loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
},
loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
switchControl: {
width: "100%",
marginTop: theme.spacing.unit * 2,
marginBottom: theme.spacing.unit
marginTop: theme.spacing(2),
marginBottom: theme.spacing(0.5)
},
textField: {
width: "100%"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

8
interface/src/forms/SecuritySettingsForm.js

@ -13,18 +13,18 @@ import { withAuthenticationContext } from '../authentication/Context';
const styles = theme => ({
loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
},
loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
textField: {
width: "100%"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

2
interface/src/forms/UserForm.js

@ -20,7 +20,7 @@ const styles = theme => ({
width: "100%"
},
button: {
margin: theme.spacing.unit
margin: theme.spacing(0.5)
}
});

6
interface/src/forms/WiFiNetworkSelector.js

@ -23,12 +23,12 @@ import { isNetworkOpen, networkSecurityMode } from '../constants/WiFiSecurityMod
const styles = theme => ({
scanningProgress: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

8
interface/src/forms/WiFiSettingsForm.js

@ -29,10 +29,10 @@ import PasswordValidator from '../components/PasswordValidator';
const styles = theme => ({
loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
},
loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center"
},
textField: {
@ -42,8 +42,8 @@ const styles = theme => ({
width: "100%"
},
button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}
});

6
platformio.ini

@ -18,8 +18,10 @@ framework = arduino
monitor_speed = 115200
; Uncomment & modify the lines below in order to configure OTA updates
;upload_flags = --port=8266 --auth=esp-react
;upload_port = 192.168.0.6
;upload_flags =
; --port=8266
; --auth=esp-react
;upload_port = 192.168.0.11
build_flags=
-D NO_GLOBAL_ARDUINOOTA

Loading…
Cancel
Save