Merge branch 'tutorial-builder'
This commit is contained in:
commit
3f4e559866
@ -244,7 +244,6 @@ export const resetTutorial = () => (dispatch, getState) => {
|
||||
|
||||
export const readJSON = (json) => (dispatch, getState) => {
|
||||
dispatch(resetTutorial());
|
||||
console.log(json.steps.map(() => {return {};}));
|
||||
dispatch({
|
||||
type: BUILDER_ERROR,
|
||||
payload: {
|
||||
|
@ -96,7 +96,7 @@ class Navbar extends Component {
|
||||
</div>
|
||||
</div>
|
||||
<List>
|
||||
{[{text: 'Tutorials', icon: faChalkboardTeacher, link: "/tutorial"}, {text: 'Tutorial-Builder', icon: faFolderPlus, link: "/tutorial/builder"}, {text: 'Einstellungen', icon: faCog}].map((item, index) => (
|
||||
{[{text: 'Tutorials', icon: faChalkboardTeacher, link: "/tutorial"}, {text: 'Tutorial-Builder', icon: faFolderPlus, link: "/tutorial/builder"}, {text: 'Einstellungen', icon: faCog, link: "/settings"}].map((item, index) => (
|
||||
<Link to={item.link} key={index} style={{textDecoration: 'none', color: 'inherit'}}>
|
||||
<ListItem button onClick={this.toggleDrawer}>
|
||||
<ListItemIcon><FontAwesomeIcon icon={item.icon}/></ListItemIcon>
|
||||
|
@ -108,7 +108,7 @@ class BlocklyExample extends Component {
|
||||
}
|
||||
catch(err){
|
||||
initialXml = null;
|
||||
this.props.setError(this.props.index, 'xml');
|
||||
// this.props.setError(this.props.index, 'xml');
|
||||
}
|
||||
return (
|
||||
<div style={{marginTop: '10px'}}>
|
||||
|
@ -145,7 +145,7 @@ class Builder extends Component {
|
||||
<Textfield value={this.props.title} property={'title'} label={'Titel'} error={this.props.error.title}/>
|
||||
|
||||
{this.props.steps.map((step, i) =>
|
||||
<Step step={step} index={i} />
|
||||
<Step step={step} index={i} key={i}/>
|
||||
)}
|
||||
|
||||
{/*submit or reset*/}
|
||||
|
@ -36,7 +36,7 @@ class Id extends Component {
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.props.tutorialId(value);
|
||||
this.props.tutorialId(value.toString());
|
||||
this.props.setError(undefined,'id');
|
||||
}
|
||||
};
|
||||
@ -81,7 +81,7 @@ class Id extends Component {
|
||||
endAdornment={
|
||||
<div style={{display: 'flex'}}>
|
||||
<Button
|
||||
disabled={this.props.value === 1 || !this.props.value}
|
||||
disabled={this.props.value === 1 || !Number.isInteger(this.props.value)}
|
||||
onClick={() => this.handleCounter(-1)}
|
||||
variant='contained'
|
||||
color='primary'
|
||||
|
Loading…
x
Reference in New Issue
Block a user