{Blockly.Msg.settings_sounds}
diff --git a/src/components/Settings/StatsSelector.js b/src/components/Settings/StatsSelector.js
index b0b3cfe..6ab82d6 100644
--- a/src/components/Settings/StatsSelector.js
+++ b/src/components/Settings/StatsSelector.js
@@ -5,12 +5,12 @@ import { setStatistics } from '../../actions/generalActions';
import * as Blockly from 'blockly/core'
-import InputLabel from '@material-ui/core/InputLabel';
-import MenuItem from '@material-ui/core/MenuItem';
-import FormControl from '@material-ui/core/FormControl';
-import Select from '@material-ui/core/Select';
-import Typography from '@material-ui/core/Typography';
-import FormHelperText from '@material-ui/core/FormHelperText';
+import InputLabel from '@mui/material/InputLabel';
+import MenuItem from '@mui/material/MenuItem';
+import FormControl from '@mui/material/FormControl';
+import Select from '@mui/material/Select';
+import Typography from '@mui/material/Typography';
+import FormHelperText from '@mui/material/FormHelperText';
class StatsSelector extends Component {
@@ -25,14 +25,14 @@ class StatsSelector extends Component {
{Blockly.Msg.settings_statistics}
{Blockly.Msg.settings_statistics_text}
-
+
{Blockly.Msg.settings_statistics}
diff --git a/src/components/Snackbar.js b/src/components/Snackbar.js
index 55e7429..554f335 100644
--- a/src/components/Snackbar.js
+++ b/src/components/Snackbar.js
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
-import { withStyles } from '@material-ui/core/styles';
-import IconButton from '@material-ui/core/IconButton';
-import MaterialUISnackbar from '@material-ui/core/Snackbar';
-import SnackbarContent from '@material-ui/core/SnackbarContent';
+import withStyles from '@mui/styles/withStyles';
+import IconButton from '@mui/material/IconButton';
+import MaterialUISnackbar from '@mui/material/Snackbar';
+import SnackbarContent from '@mui/material/SnackbarContent';
import { faTimes } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@@ -69,8 +69,8 @@ class Snackbar extends Component {
style={{flexWrap: 'nowrap'}}
className={this.props.type === 'error' ? this.props.classes.error : this.props.classes.success}
action={
-
-
+
+
}
message={this.props.message}
diff --git a/src/components/TooltipViewer.js b/src/components/TooltipViewer.js
index 7d69a57..758a67b 100644
--- a/src/components/TooltipViewer.js
+++ b/src/components/TooltipViewer.js
@@ -1,17 +1,43 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
-
-import withWidth from "@material-ui/core/withWidth";
-
-import { Card } from "@material-ui/core";
+import { Button, Card } from "@mui/material";
import * as Blockly from "blockly";
-import CardContent from "@material-ui/core/CardContent";
-
-import Typography from "@material-ui/core/Typography";
+import CardContent from "@mui/material/CardContent";
+import Typography from "@mui/material/Typography";
import ReactMarkdown from "react-markdown";
+import Dialog from "@mui/material/Dialog";
+import DialogActions from "@mui/material/DialogActions";
+import DialogContent from "@mui/material/DialogContent";
+import Slide from "@mui/material/Slide";
+import SensorInfo from "./SensorInfo";
+import store from "../store";
+
+// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth
+const withWidth = () => (WrappedComponent) => (props) => ;
+
+const Transition = React.forwardRef(function Transition(props, ref) {
+ return ;
+});
class TooltipViewer extends Component {
+
+ constructor(props) {
+ super(props);
+ this.inputRef = React.createRef();
+ this.state = {
+ open: false,
+ };
+ }
+
+ toggleDialog = () => {
+ this.setState({ open: !this.state });
+ };
+
+ openDialog = () => {
+ this.setState({ open: true });
+ };
+
render() {
return (
-
- {this.props.tooltip}
-
-
- {this.props.helpurl !== "" ? (
- {`${Blockly.Msg.tooltip_moreInformation} [${Blockly.Msg.labels_here}](${this.props.helpurl})`}
- ) : null}
+
+
+ {this.props.tooltip}
+
+ {store.getState().workspace.code.data ? (
+
+ ) : (
+ {`${Blockly.Msg.tooltip_moreInformation} [${Blockly.Msg.labels_here}](${this.props.helpurl})`}
+ )}
+
+ {store.getState().workspace.code.data ? () : (null)}
);
}
diff --git a/src/components/Tutorial/Assessment.js b/src/components/Tutorial/Assessment.js
index ddd7248..4f95d59 100644
--- a/src/components/Tutorial/Assessment.js
+++ b/src/components/Tutorial/Assessment.js
@@ -6,22 +6,26 @@ import { workspaceName } from "../../actions/workspaceActions";
import BlocklyWindow from "../Blockly/BlocklyWindow";
import WorkspaceFunc from "../Workspace/WorkspaceFunc";
-import withWidth, { isWidthDown } from "@material-ui/core/withWidth";
-import Grid from "@material-ui/core/Grid";
-import Card from "@material-ui/core/Card";
-import Typography from "@material-ui/core/Typography";
+import Grid from "@mui/material/Grid";
+import Card from "@mui/material/Card";
+import Typography from "@mui/material/Typography";
import * as Blockly from "blockly";
import { initialXml } from "../Blockly/initialXml";
-import IconButton from "@material-ui/core/IconButton";
+import IconButton from "@mui/material/IconButton";
import CodeViewer from "../CodeViewer";
import TooltipViewer from "../TooltipViewer";
-import Tooltip from "@material-ui/core/Tooltip";
+import Tooltip from "@mui/material/Tooltip";
import ReactMarkdown from "react-markdown";
import { faCode } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { withStyles } from "@material-ui/core/styles";
+import withStyles from '@mui/styles/withStyles';
import remarkGfm from "remark-gfm";
import remarkGemoji from "remark-gemoji";
+import { isWidthDown } from "../../helpers/handleBreakpoints";
+
+
+// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth
+const withWidth = () => (WrappedComponent) => (props) => ;
const styles = (theme) => ({
codeOn: {
@@ -98,11 +102,10 @@ class Assessment extends Component {
}
>
this.onChange()}
- >
-
+ size="large">
+
({
errorColor: {
@@ -139,7 +139,6 @@ class BlocklyExample extends Component {
this.onChange(e.target.checked)}
- color="primary"
/>
}
/>
diff --git a/src/components/Tutorial/Builder/Builder.js b/src/components/Tutorial/Builder/Builder.js
index d603e00..d1c6052 100644
--- a/src/components/Tutorial/Builder/Builder.js
+++ b/src/components/Tutorial/Builder/Builder.js
@@ -33,19 +33,19 @@ import Snackbar from "../../Snackbar";
import Public from "./Public";
import Review from "./Review";
-import { withStyles } from "@material-ui/core/styles";
-import Button from "@material-ui/core/Button";
-import Backdrop from "@material-ui/core/Backdrop";
-import CircularProgress from "@material-ui/core/CircularProgress";
-import Divider from "@material-ui/core/Divider";
-import FormHelperText from "@material-ui/core/FormHelperText";
-import Radio from "@material-ui/core/Radio";
-import RadioGroup from "@material-ui/core/RadioGroup";
-import FormControlLabel from "@material-ui/core/FormControlLabel";
-import InputLabel from "@material-ui/core/InputLabel";
-import MenuItem from "@material-ui/core/MenuItem";
-import FormControl from "@material-ui/core/FormControl";
-import Select from "@material-ui/core/Select";
+import withStyles from '@mui/styles/withStyles';
+import Button from "@mui/material/Button";
+import Backdrop from "@mui/material/Backdrop";
+import CircularProgress from "@mui/material/CircularProgress";
+import Divider from "@mui/material/Divider";
+import FormHelperText from "@mui/material/FormHelperText";
+import Radio from "@mui/material/Radio";
+import RadioGroup from "@mui/material/RadioGroup";
+import FormControlLabel from "@mui/material/FormControlLabel";
+import InputLabel from "@mui/material/InputLabel";
+import MenuItem from "@mui/material/MenuItem";
+import FormControl from "@mui/material/FormControl";
+import Select from "@mui/material/Select";
import * as Blockly from "blockly";
const styles = (theme) => ({
@@ -407,7 +407,7 @@ class Builder extends Component {
}
+ control={}
label={Blockly.Msg.builder_createNew}
labelPlacement="end"
/>
@@ -417,7 +417,7 @@ class Builder extends Component {
style={{ color: "black" }}
disabled={this.props.index === 0}
value="change"
- control={}
+ control={}
label={Blockly.Msg.builder_changeExisting}
labelPlacement="end"
/>
@@ -425,7 +425,7 @@ class Builder extends Component {
style={{ color: "black" }}
disabled={this.props.index === 0}
value="delete"
- control={}
+ control={}
label={Blockly.Msg.builder_deleteExisting}
labelPlacement="end"
/>
@@ -470,12 +470,12 @@ class Builder extends Component {
Tutorial
{index !== 0 ? (
@@ -100,8 +100,8 @@ class Step extends Component {
className={this.props.classes.button}
style={{ marginBottom: "5px" }}
onClick={() => this.props.changeStepIndex(index, index - 1)}
- >
-
+ size="large">
+
this.props.changeStepIndex(index, index + 1)}
- >
-
+ size="large">
+
@@ -125,8 +125,8 @@ class Step extends Component {
this.props.classes.delete
)}
onClick={() => this.props.removeStep(index)}
- >
-
+ size="large">
+
diff --git a/src/components/Tutorial/Builder/StepType.js b/src/components/Tutorial/Builder/StepType.js
index 971660c..69d5e99 100644
--- a/src/components/Tutorial/Builder/StepType.js
+++ b/src/components/Tutorial/Builder/StepType.js
@@ -3,9 +3,9 @@ import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { changeContent, deleteProperty, deleteError } from '../../../actions/tutorialBuilderActions';
-import Radio from '@material-ui/core/Radio';
-import RadioGroup from '@material-ui/core/RadioGroup';
-import FormControlLabel from '@material-ui/core/FormControlLabel';
+import Radio from '@mui/material/Radio';
+import RadioGroup from '@mui/material/RadioGroup';
+import FormControlLabel from '@mui/material/FormControlLabel';
class StepType extends Component {
@@ -23,14 +23,14 @@ class StepType extends Component {
this.onChange(e.target.value)}>
}
+ control={}
label="Anleitung"
labelPlacement="end"
/>
}
+ control={}
label="Aufgabe"
labelPlacement="end"
/>
diff --git a/src/components/Tutorial/Builder/Textfield.js b/src/components/Tutorial/Builder/Textfield.js
index 80d69ee..f7c8db4 100644
--- a/src/components/Tutorial/Builder/Textfield.js
+++ b/src/components/Tutorial/Builder/Textfield.js
@@ -9,11 +9,11 @@ import {
deleteError,
} from "../../../actions/tutorialBuilderActions";
-import { withStyles } from "@material-ui/core/styles";
-import OutlinedInput from "@material-ui/core/OutlinedInput";
-import InputLabel from "@material-ui/core/InputLabel";
-import FormControl from "@material-ui/core/FormControl";
-import FormHelperText from "@material-ui/core/FormHelperText";
+import withStyles from '@mui/styles/withStyles';
+import OutlinedInput from "@mui/material/OutlinedInput";
+import InputLabel from "@mui/material/InputLabel";
+import FormControl from "@mui/material/FormControl";
+import FormHelperText from "@mui/material/FormHelperText";
const styles = (theme) => ({
multiline: {
diff --git a/src/components/Tutorial/Hardware.js b/src/components/Tutorial/Hardware.js
index 4eb2416..bdbc1f3 100644
--- a/src/components/Tutorial/Hardware.js
+++ b/src/components/Tutorial/Hardware.js
@@ -4,18 +4,22 @@ import Dialog from "../Dialog";
import hardware from "../../data/hardware.json";
-import { withStyles } from "@material-ui/core/styles";
-import withWidth, { isWidthDown } from "@material-ui/core/withWidth";
-import Link from "@material-ui/core/Link";
-import Typography from "@material-ui/core/Typography";
-import IconButton from "@material-ui/core/IconButton";
-import ImageList from "@material-ui/core/ImageList";
-import ImageListItem from "@material-ui/core/ImageListItem";
-import ImageListItemBar from "@material-ui/core/ImageListItemBar";
+import withStyles from '@mui/styles/withStyles';
+import Link from "@mui/material/Link";
+import Typography from "@mui/material/Typography";
+import IconButton from "@mui/material/IconButton";
+import ImageList from "@mui/material/ImageList";
+import ImageListItem from "@mui/material/ImageListItem";
+import ImageListItemBar from "@mui/material/ImageListItemBar";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faExpandAlt } from "@fortawesome/free-solid-svg-icons";
import * as Blockly from "blockly";
+import { isWidthDown } from "../../helpers/handleBreakpoints";
+
+// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth
+const withWidth = () => (WrappedComponent) => (props) => ;
+
const styles = (theme) => ({
expand: {
"&:hover": {
@@ -51,9 +55,9 @@ class Hardware extends Component {
};
render() {
- var cols = isWidthDown("md", this.props.width)
- ? isWidthDown("sm", this.props.width)
- ? isWidthDown("xs", this.props.width)
+ var cols = isWidthDown("md", window.innerWidth)
+ ? isWidthDown("sm", window.innerWidth)
+ ? isWidthDown("xs", window.innerWidth)
? 2
: 3
: 4
@@ -93,8 +97,8 @@ class Hardware extends Component {
className={this.props.classes.expand}
aria-label="Vollbild"
onClick={() => this.handleClickOpen(hardwareInfo)}
- >
-
+ size="large">
+
}
/>
@@ -124,7 +128,7 @@ class Hardware extends Component {
target="_blank"
href={this.state.hardwareInfo.url}
color="primary"
- >
+ underline="hover">
{Blockly.Msg.tutorials_hardware_here}
.
diff --git a/src/components/Tutorial/HintTutorialExists.js b/src/components/Tutorial/HintTutorialExists.js
index ae423b3..302a94c 100644
--- a/src/components/Tutorial/HintTutorialExists.js
+++ b/src/components/Tutorial/HintTutorialExists.js
@@ -3,9 +3,9 @@ import PropTypes from "prop-types";
import { connect } from "react-redux";
import Dialog from "../Dialog";
-import { withStyles } from "@material-ui/core/styles";
-import Checkbox from "@material-ui/core/Checkbox";
-import FormControlLabel from "@material-ui/core/FormControlLabel";
+import withStyles from '@mui/styles/withStyles';
+import Checkbox from "@mui/material/Checkbox";
+import FormControlLabel from "@mui/material/FormControlLabel";
import * as Blockly from "blockly";
import ReactMarkdown from "react-markdown";
@@ -78,7 +78,6 @@ class HintTutorialExists extends Component {
checked={this.state.checked}
onChange={(e) => this.onChange(e)}
name="dialog"
- color="primary"
/>
}
label={Blockly.Msg.labels_donotshowagain}
diff --git a/src/components/Tutorial/Instruction.js b/src/components/Tutorial/Instruction.js
index 869e7e1..d34105f 100644
--- a/src/components/Tutorial/Instruction.js
+++ b/src/components/Tutorial/Instruction.js
@@ -4,8 +4,8 @@ import Hardware from "./Hardware";
import Requirement from "./Requirement";
import BlocklyWindow from "../Blockly/BlocklyWindow";
-import Grid from "@material-ui/core/Grid";
-import Typography from "@material-ui/core/Typography";
+import Grid from "@mui/material/Grid";
+import Typography from "@mui/material/Typography";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import remarkGemoji from "remark-gemoji";
diff --git a/src/components/Tutorial/Requirement.js b/src/components/Tutorial/Requirement.js
index 42e3165..df5988c 100644
--- a/src/components/Tutorial/Requirement.js
+++ b/src/components/Tutorial/Requirement.js
@@ -4,11 +4,11 @@ import { connect } from "react-redux";
import clsx from "clsx";
import { withRouter, Link } from "react-router-dom";
-import { alpha } from "@material-ui/core/styles";
-import { withStyles } from "@material-ui/core/styles";
-import Typography from "@material-ui/core/Typography";
-import List from "@material-ui/core/List";
-import Tooltip from "@material-ui/core/Tooltip";
+import { alpha } from "@mui/material/styles";
+import withStyles from '@mui/styles/withStyles';
+import Typography from "@mui/material/Typography";
+import List from "@mui/material/List";
+import Tooltip from "@mui/material/Tooltip";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCheck, faTimes } from "@fortawesome/free-solid-svg-icons";
@@ -166,6 +166,7 @@ class Requirement extends Component {
icon={
tutorialStatus === "Success" ? faCheck : faTimes
}
+
/>
) : (
this.check()}
- >
-
+ size="large">
+
diff --git a/src/components/Tutorial/StepperHorizontal.js b/src/components/Tutorial/StepperHorizontal.js
index ce4083f..9e5d509 100644
--- a/src/components/Tutorial/StepperHorizontal.js
+++ b/src/components/Tutorial/StepperHorizontal.js
@@ -7,12 +7,12 @@ import { withRouter } from "react-router-dom";
import clsx from "clsx";
// import tutorials from '../../data/tutorials';
-import { alpha } from "@material-ui/core/styles";
+import { alpha } from "@mui/material/styles";
-import { withStyles } from "@material-ui/core/styles";
-import Typography from "@material-ui/core/Typography";
-import Tooltip from "@material-ui/core/Tooltip";
-import Button from "@material-ui/core/Button";
+import withStyles from '@mui/styles/withStyles';
+import Typography from "@mui/material/Typography";
+import Tooltip from "@mui/material/Tooltip";
+import Button from "@mui/material/Button";
import { faCheck, faTimes } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@@ -127,6 +127,7 @@ class StepperHorizontal extends Component {