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 => ({ const styles = theme => ({
loadingPanel: { loadingPanel: {
padding: theme.spacing.unit * 2,
padding: theme.spacing(2),
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
justifyContent: "center", justifyContent: "center",
@ -19,7 +19,7 @@ const styles = theme => ({
flexDirection: "column" flexDirection: "column"
}, },
progress: { 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 => ({ const styles = theme => ({
content: { 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 => ({ const styles = theme => ({
close: { 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 backgroundColor: theme.palette.highlight_idle
}, },
fetching: { fetching: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
button: { 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 backgroundColor: theme.palette.highlight_warn
}, },
fetching: { fetching: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
button: { 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", display: "flex",
height: "100vh", height: "100vh",
margin: "auto", margin: "auto",
padding: theme.spacing.unit * 2,
padding: theme.spacing(2),
justifyContent: "center", justifyContent: "center",
flexDirection: "column", flexDirection: "column",
maxWidth: theme.breakpoints.values.sm maxWidth: theme.breakpoints.values.sm
}, },
loginPanel: { loginPanel: {
textAlign: "center", textAlign: "center",
padding: theme.spacing.unit * 2,
padding: theme.spacing(2),
paddingTop: "200px", paddingTop: "200px",
backgroundImage: 'url("/app/icon.png")', backgroundImage: 'url("/app/icon.png")',
backgroundRepeat: "no-repeat", backgroundRepeat: "no-repeat",
backgroundPosition: "50% " + theme.spacing.unit * 2 + "px",
backgroundPosition: "50% " + theme.spacing(2) + "px",
backgroundSize: "auto 150px", backgroundSize: "auto 150px",
width: "100%" width: "100%"
}, },
extendedIcon: { extendedIcon: {
marginRight: theme.spacing.unit,
marginRight: theme.spacing(0.5),
}, },
textField: { textField: {
width: "100%" width: "100%"
}, },
button: { 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 => ({ const styles = theme => ({
fetching: { fetching: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
button: { 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 backgroundColor: theme.palette.highlight_warn
}, },
fetching: { fetching: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
button: { 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 => ({ const styles = theme => ({
loadingSettings: { loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
}, },
loadingSettingsDetails: { loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
textField: { textField: {
@ -25,12 +25,12 @@ const styles = theme => ({
}, },
selectField:{ selectField:{
width: "100%", width: "100%",
marginTop: theme.spacing.unit * 2,
marginBottom: theme.spacing.unit
marginTop: theme.spacing(2),
marginBottom: theme.spacing(0.5)
}, },
button: { 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 => ({ const styles = theme => ({
loadingSettings: { loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
}, },
loadingSettingsDetails: { loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
button: { button: {
marginRight: theme.spacing.unit * 2,
marginTop: theme.spacing.unit * 2,
marginRight: theme.spacing(2),
marginTop: theme.spacing(2),
}, },
table: { table: {
'& td, & th': { padding: theme.spacing.unit }
'& td, & th': { padding: theme.spacing(0.5) }
}, },
actions: { actions: {
whiteSpace: "nowrap" whiteSpace: "nowrap"

8
interface/src/forms/NTPSettingsForm.js

@ -13,18 +13,18 @@ import or from '../validators/or';
const styles = theme => ({ const styles = theme => ({
loadingSettings: { loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
}, },
loadingSettingsDetails: { loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
textField: { textField: {
width: "100%" width: "100%"
}, },
button: { 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 => ({ const styles = theme => ({
loadingSettings: { loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
}, },
loadingSettingsDetails: { loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
switchControl: { switchControl: {
width: "100%", width: "100%",
marginTop: theme.spacing.unit * 2,
marginBottom: theme.spacing.unit
marginTop: theme.spacing(2),
marginBottom: theme.spacing(0.5)
}, },
textField: { textField: {
width: "100%" width: "100%"
}, },
button: { 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 => ({ const styles = theme => ({
loadingSettings: { loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
}, },
loadingSettingsDetails: { loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
textField: { textField: {
width: "100%" width: "100%"
}, },
button: { 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%" width: "100%"
}, },
button: { 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 => ({ const styles = theme => ({
scanningProgress: { scanningProgress: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
button: { 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 => ({ const styles = theme => ({
loadingSettings: { loadingSettings: {
margin: theme.spacing.unit,
margin: theme.spacing(0.5),
}, },
loadingSettingsDetails: { loadingSettingsDetails: {
margin: theme.spacing.unit * 4,
margin: theme.spacing(4),
textAlign: "center" textAlign: "center"
}, },
textField: { textField: {
@ -42,8 +42,8 @@ const styles = theme => ({
width: "100%" width: "100%"
}, },
button: { 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 monitor_speed = 115200
; Uncomment & modify the lines below in order to configure OTA updates ; 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= build_flags=
-D NO_GLOBAL_ARDUINOOTA -D NO_GLOBAL_ARDUINOOTA

Loading…
Cancel
Save