Compare commits

...

1 Commits

Author SHA1 Message Date
Mario Pesch
328b9a141f open device selection only once 2022-11-09 16:17:31 +01:00
3 changed files with 4 additions and 28 deletions

View File

@ -29,8 +29,8 @@ class DeviceSeclection extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
open: true, open: this.props.selectedBoard !== "" ? false : true,
selectedBoard : "", selectedBoard : this.props.selectedBoard,
saveSettings: false, saveSettings: false,
}; };
@ -42,13 +42,6 @@ class DeviceSeclection extends Component {
}; };
onChange = (e) => {
if (e.target.checked) {
this.setState({ saveSettings: true});
} else {
this.setState({ saveSettings: false});
}
};
onclick = (e, value) => { onclick = (e, value) => {
console.log(e, value) console.log(e, value)
@ -121,21 +114,6 @@ class DeviceSeclection extends Component {
</Grid> </Grid>
</Grid> </Grid>
</div> </div>
{/* <FormControlLabel
style={{ marginTop: "20px" }}
classes={{ label: this.props.classes.label }}
control={
<Checkbox
size={"small"}
value={true}
checked={this.state.checked}
onChange={(e) => this.onChange(e)}
name="dialog"
color="primary"
/>
}
label={Blockly.Msg.deviceselection_keep_selection}
/> */}
<Typography variant="body1" > <Typography variant="body1" >
{Blockly.Msg.deviceselection_footnote} <a href="https://sensebox.github.io/blockly/">Arduino UNO</a> {Blockly.Msg.deviceselection_footnote_02} <a href="https://sensebox-blockly.netlify.app/ardublockly/?board=sensebox-mcu">senseBox MCU</a> {Blockly.Msg.deviceselection_footnote} <a href="https://sensebox.github.io/blockly/">Arduino UNO</a> {Blockly.Msg.deviceselection_footnote_02} <a href="https://sensebox-blockly.netlify.app/ardublockly/?board=sensebox-mcu">senseBox MCU</a>
</Typography> </Typography>

View File

@ -187,6 +187,7 @@ class Home extends Component {
</Grid> </Grid>
) : null} ) : null}
</Grid> </Grid>
<DeviceSelection /> <DeviceSelection />
{/* <HintTutorialExists /> */} {/* <HintTutorialExists /> */}
{this.props.platform ? ( {this.props.platform ? (

View File

@ -1,10 +1,7 @@
import { BOARD } from '../actions/types'; import { BOARD } from '../actions/types';
const initialValue = () => { const initialValue = () => {
if (window.localStorage.getItem("board")) { return "";
return window.localStorage.getItem("board");
}
return "bla";
}; };
const initialState = { const initialState = {