rename var printer to printers

This commit is contained in:
casperlamboo 2017-11-13 15:47:19 +01:00
parent 3221278853
commit 1f7b48662a
2 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ class Settings extends React.Component {
let state;
switch (fieldName) {
case 'printer':
case 'printers':
case 'quality':
case 'material':
state = {
@ -57,7 +57,7 @@ class Settings extends React.Component {
<Tabs>
<Tab label="basic">
<div>
<SelectField name="printer" floatingLabelText="Printer" fullWidth>
<SelectField name="printers" floatingLabelText="Printer" fullWidth>
{Object.entries(printers).map(([value, { title }]) => (
<MenuItem key={value} value={value} primaryText={title} />
))}

View File

@ -69,7 +69,7 @@ class Interface extends React.Component {
controlMode: 'translate',
isSlicing: false,
sliced: false,
printer: defaultPrinter,
printers: defaultPrinter,
quality: defaultQuality,
material: defaultMaterial,
settings: _.merge(
@ -190,7 +190,7 @@ class Interface extends React.Component {
render() {
const { width, height, classes, onCompleteActions, defaultPrinter, defaultQuality, defaultMaterial } = this.props;
const { sliced, isSlicing, progress, gcode, controlMode, settings, printer, quality, material } = this.state;
const { sliced, isSlicing, progress, gcode, controlMode, settings, printers, quality, material } = this.state;
return (
<div className={classes.container}>
@ -231,7 +231,7 @@ class Interface extends React.Component {
{sliced && <div className={classes.sliceBar}>
<RaisedButton className={classes.button} fullWidth onTouchTap={this.reset} primary label="slice again" />
{onCompleteActions.map(({ title, callback }, i) => (
<RaisedButton className={classes.button} key={i} fullWidth onTouchTap={() => callback({ gcode, settings, printer, quality, material })} primary label={title} />
<RaisedButton className={classes.button} key={i} fullWidth onTouchTap={() => callback({ gcode, settings, printers, quality, material })} primary label={title} />
))}
</div>}
{isSlicing && <div className={classes.overlay}>