don't use deprecated theme spacing

This commit is contained in:
rjwats 2019-06-02 19:01:06 +01:00
parent 9da0888d7d
commit 5d9ccd3095
17 changed files with 60 additions and 58 deletions

View File

@ -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),
} }
}); });

View File

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

View File

@ -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),
}, },
}); });

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
} }
} }

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

@ -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, marginTop: theme.spacing(2),
marginBottom: theme.spacing.unit marginBottom: theme.spacing(0.5)
}, },
button: { button: {
marginRight: theme.spacing.unit * 2, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 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"

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

@ -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, marginTop: theme.spacing(2),
marginBottom: theme.spacing.unit marginBottom: theme.spacing(0.5)
}, },
textField: { textField: {
width: "100%" width: "100%"
}, },
button: { button: {
marginRight: theme.spacing.unit * 2, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

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

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

@ -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, marginRight: theme.spacing(2),
marginTop: theme.spacing.unit * 2, marginTop: theme.spacing(2),
} }
}); });

View File

@ -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_flags =
;upload_port = 192.168.0.6 ; --port=8266
; --auth=esp-react
;upload_port = 192.168.0.11
build_flags= build_flags=
-D NO_GLOBAL_ARDUINOOTA -D NO_GLOBAL_ARDUINOOTA