complete MUI migration
This commit is contained in:
parent
8716649be7
commit
ae61d2b11b
@ -53,7 +53,7 @@ td {
|
|||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
background-color: #4eaf47;
|
border-color: #4eaf47;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,11 +9,11 @@ import { loadUser } from "./actions/authActions";
|
|||||||
|
|
||||||
import "./App.css";
|
import "./App.css";
|
||||||
|
|
||||||
import { ThemeProvider, StyledEngineProvider, createTheme, adaptV4Theme } from "@mui/material/styles";
|
import { ThemeProvider, StyledEngineProvider, createTheme } from "@mui/material/styles";
|
||||||
|
|
||||||
import Content from "./components/Content";
|
import Content from "./components/Content";
|
||||||
|
|
||||||
const theme = createTheme(adaptV4Theme({
|
const theme = createTheme({
|
||||||
palette: {
|
palette: {
|
||||||
primary: {
|
primary: {
|
||||||
main: "#4EAF47",
|
main: "#4EAF47",
|
||||||
@ -26,7 +26,7 @@ const theme = createTheme(adaptV4Theme({
|
|||||||
compile: "#e27136",
|
compile: "#e27136",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}));
|
});
|
||||||
|
|
||||||
class App extends Component {
|
class App extends Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
@ -201,6 +201,7 @@ class Compile extends Component {
|
|||||||
>
|
>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={faClipboardCheck}
|
icon={faClipboardCheck}
|
||||||
|
|
||||||
style={{ marginRight: "5px" }}
|
style={{ marginRight: "5px" }}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
Kompilieren
|
Kompilieren
|
||||||
@ -301,6 +302,7 @@ class Compile extends Component {
|
|||||||
>
|
>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={faClipboardCheck}
|
icon={faClipboardCheck}
|
||||||
|
|
||||||
style={{ marginRight: "5px" }}
|
style={{ marginRight: "5px" }}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
Starte Übertragung
|
Starte Übertragung
|
||||||
|
@ -17,6 +17,7 @@ const SaveIcon = ({ loading }) => (
|
|||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
style={{ position: "absolute" }}
|
style={{ position: "absolute" }}
|
||||||
icon={faCircleNotch}
|
icon={faCircleNotch}
|
||||||
|
|
||||||
spin={true}
|
spin={true}
|
||||||
size="2x"
|
size="2x"
|
||||||
color="grey"
|
color="grey"
|
||||||
@ -30,6 +31,7 @@ const SaveIcon = ({ loading }) => (
|
|||||||
transform: "translate(-50%,-50%)",
|
transform: "translate(-50%,-50%)",
|
||||||
}}
|
}}
|
||||||
icon={faSave}
|
icon={faSave}
|
||||||
|
|
||||||
color={loading ? "grey" : "green"}
|
color={loading ? "grey" : "green"}
|
||||||
size={loading ? "1x" : "lg"}
|
size={loading ? "1x" : "lg"}
|
||||||
/>
|
/>
|
||||||
|
@ -70,7 +70,7 @@ class Snackbar extends Component {
|
|||||||
className={this.props.type === 'error' ? this.props.classes.error : this.props.classes.success}
|
className={this.props.type === 'error' ? this.props.classes.error : this.props.classes.success}
|
||||||
action={
|
action={
|
||||||
<IconButton onClick={this.onClose} style={{color: 'inherit'}} size="large">
|
<IconButton onClick={this.onClose} style={{color: 'inherit'}} size="large">
|
||||||
<FontAwesomeIcon icon={faTimes} size="xs"/>
|
<FontAwesomeIcon icon={faTimes} size="xs" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
}
|
}
|
||||||
message={this.props.message}
|
message={this.props.message}
|
||||||
|
@ -139,7 +139,6 @@ class BlocklyExample extends Component {
|
|||||||
<Switch
|
<Switch
|
||||||
checked={this.state.checked}
|
checked={this.state.checked}
|
||||||
onChange={(e) => this.onChange(e.target.checked)}
|
onChange={(e) => this.onChange(e.target.checked)}
|
||||||
color="primary"
|
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -407,7 +407,7 @@ class Builder extends Component {
|
|||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
style={{ color: "black" }}
|
style={{ color: "black" }}
|
||||||
value="new"
|
value="new"
|
||||||
control={<Radio color="primary" />}
|
control={<Radio />}
|
||||||
label={Blockly.Msg.builder_createNew}
|
label={Blockly.Msg.builder_createNew}
|
||||||
labelPlacement="end"
|
labelPlacement="end"
|
||||||
/>
|
/>
|
||||||
@ -417,7 +417,7 @@ class Builder extends Component {
|
|||||||
style={{ color: "black" }}
|
style={{ color: "black" }}
|
||||||
disabled={this.props.index === 0}
|
disabled={this.props.index === 0}
|
||||||
value="change"
|
value="change"
|
||||||
control={<Radio color="primary" />}
|
control={<Radio />}
|
||||||
label={Blockly.Msg.builder_changeExisting}
|
label={Blockly.Msg.builder_changeExisting}
|
||||||
labelPlacement="end"
|
labelPlacement="end"
|
||||||
/>
|
/>
|
||||||
@ -425,7 +425,7 @@ class Builder extends Component {
|
|||||||
style={{ color: "black" }}
|
style={{ color: "black" }}
|
||||||
disabled={this.props.index === 0}
|
disabled={this.props.index === 0}
|
||||||
value="delete"
|
value="delete"
|
||||||
control={<Radio color="primary" />}
|
control={<Radio />}
|
||||||
label={Blockly.Msg.builder_deleteExisting}
|
label={Blockly.Msg.builder_deleteExisting}
|
||||||
labelPlacement="end"
|
labelPlacement="end"
|
||||||
/>
|
/>
|
||||||
|
@ -97,7 +97,6 @@ class Media extends Component {
|
|||||||
<Switch
|
<Switch
|
||||||
checked={this.state.checked}
|
checked={this.state.checked}
|
||||||
onChange={(e) => this.onChangeSwitch(e.target.checked)}
|
onChange={(e) => this.onChangeSwitch(e.target.checked)}
|
||||||
color="primary"
|
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -106,13 +105,13 @@ class Media extends Component {
|
|||||||
<RadioGroup row value={this.state.radioValue} onChange={(e) => {this.onChangeRadio(e.target.value);}}>
|
<RadioGroup row value={this.state.radioValue} onChange={(e) => {this.onChangeRadio(e.target.value);}}>
|
||||||
<FormControlLabel style={{color: 'black'}}
|
<FormControlLabel style={{color: 'black'}}
|
||||||
value="picture"
|
value="picture"
|
||||||
control={<Radio color="primary" />}
|
control={<Radio />}
|
||||||
label="Bild"
|
label="Bild"
|
||||||
labelPlacement="end"
|
labelPlacement="end"
|
||||||
/>
|
/>
|
||||||
<FormControlLabel style={{color: 'black'}}
|
<FormControlLabel style={{color: 'black'}}
|
||||||
value="youtube"
|
value="youtube"
|
||||||
control={<Radio color="primary" />}
|
control={<Radio />}
|
||||||
label="Youtube-Video"
|
label="Youtube-Video"
|
||||||
labelPlacement="end"
|
labelPlacement="end"
|
||||||
/>
|
/>
|
||||||
|
@ -63,7 +63,6 @@ class Public extends Component {
|
|||||||
<Checkbox
|
<Checkbox
|
||||||
checked={this.props.value}
|
checked={this.props.value}
|
||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
color="primary"
|
|
||||||
name="checkedA"
|
name="checkedA"
|
||||||
inputProps={{ "aria-label": "secondary checkbox" }}
|
inputProps={{ "aria-label": "secondary checkbox" }}
|
||||||
/>
|
/>
|
||||||
|
@ -41,7 +41,6 @@ class Requirements extends Component {
|
|||||||
checked={this.props.value.filter(id => id === tutorial._id).length > 0}
|
checked={this.props.value.filter(id => id === tutorial._id).length > 0}
|
||||||
onChange={(e) => this.onChange(e)}
|
onChange={(e) => this.onChange(e)}
|
||||||
name="requirements"
|
name="requirements"
|
||||||
color="primary"
|
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
label={tutorial.title}
|
label={tutorial.title}
|
||||||
|
@ -64,7 +64,6 @@ class Review extends Component {
|
|||||||
<Checkbox
|
<Checkbox
|
||||||
checked={this.props.value}
|
checked={this.props.value}
|
||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
color="primary"
|
|
||||||
name="checkedA"
|
name="checkedA"
|
||||||
inputProps={{ "aria-label": "secondary checkbox" }}
|
inputProps={{ "aria-label": "secondary checkbox" }}
|
||||||
/>
|
/>
|
||||||
|
@ -23,14 +23,14 @@ class StepType extends Component {
|
|||||||
<RadioGroup row value={this.props.value === 'task' ? 'task' : 'instruction'} onChange={(e) => this.onChange(e.target.value)}>
|
<RadioGroup row value={this.props.value === 'task' ? 'task' : 'instruction'} onChange={(e) => this.onChange(e.target.value)}>
|
||||||
<FormControlLabel style={{color: 'black'}}
|
<FormControlLabel style={{color: 'black'}}
|
||||||
value="instruction"
|
value="instruction"
|
||||||
control={<Radio color="primary" />}
|
control={<Radio />}
|
||||||
label="Anleitung"
|
label="Anleitung"
|
||||||
labelPlacement="end"
|
labelPlacement="end"
|
||||||
/>
|
/>
|
||||||
<FormControlLabel style={{color: 'black'}}
|
<FormControlLabel style={{color: 'black'}}
|
||||||
disabled={this.props.index === 0}
|
disabled={this.props.index === 0}
|
||||||
value="task"
|
value="task"
|
||||||
control={<Radio color="primary" />}
|
control={<Radio />}
|
||||||
label="Aufgabe"
|
label="Aufgabe"
|
||||||
labelPlacement="end"
|
labelPlacement="end"
|
||||||
/>
|
/>
|
||||||
|
@ -78,7 +78,6 @@ class HintTutorialExists extends Component {
|
|||||||
checked={this.state.checked}
|
checked={this.state.checked}
|
||||||
onChange={(e) => this.onChange(e)}
|
onChange={(e) => this.onChange(e)}
|
||||||
name="dialog"
|
name="dialog"
|
||||||
color="primary"
|
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
label={Blockly.Msg.labels_donotshowagain}
|
label={Blockly.Msg.labels_donotshowagain}
|
||||||
|
@ -166,6 +166,7 @@ class Requirement extends Component {
|
|||||||
icon={
|
icon={
|
||||||
tutorialStatus === "Success" ? faCheck : faTimes
|
tutorialStatus === "Success" ? faCheck : faTimes
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Typography
|
<Typography
|
||||||
|
@ -127,6 +127,7 @@ class StepperHorizontal extends Component {
|
|||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
className={this.props.classes.icon}
|
className={this.props.classes.icon}
|
||||||
icon={tutorialStatus === "Success" ? faCheck : faTimes}
|
icon={tutorialStatus === "Success" ? faCheck : faTimes}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
@ -287,6 +287,7 @@ class TutorialHome extends Component {
|
|||||||
icon={
|
icon={
|
||||||
tutorialStatus === "Success" ? faCheck : faTimes
|
tutorialStatus === "Success" ? faCheck : faTimes
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Typography
|
<Typography
|
||||||
|
@ -165,6 +165,7 @@ export class Login extends Component {
|
|||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
size="xs"
|
size="xs"
|
||||||
icon={this.state.showPassword ? faEyeSlash : faEye}
|
icon={this.state.showPassword ? faEyeSlash : faEye}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</InputAdornment>
|
</InputAdornment>
|
||||||
|
@ -202,6 +202,7 @@ class Compile extends Component {
|
|||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={faClipboardCheck}
|
icon={faClipboardCheck}
|
||||||
style={{ marginRight: "5px" }}
|
style={{ marginRight: "5px" }}
|
||||||
|
|
||||||
/>{" "}
|
/>{" "}
|
||||||
Kompilieren
|
Kompilieren
|
||||||
</Button>
|
</Button>
|
||||||
@ -302,6 +303,7 @@ class Compile extends Component {
|
|||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={faClipboardCheck}
|
icon={faClipboardCheck}
|
||||||
style={{ marginRight: "5px" }}
|
style={{ marginRight: "5px" }}
|
||||||
|
|
||||||
/>{" "}
|
/>{" "}
|
||||||
Starte Übertragung
|
Starte Übertragung
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -49,11 +49,11 @@ class ResetWorkspace extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toggleDialog = () => {
|
toggleDialog = () => {
|
||||||
this.setState({ open: !this.state});
|
this.setState({ open: !this.state });
|
||||||
}
|
}
|
||||||
|
|
||||||
openDialog = () => {
|
openDialog = () => {
|
||||||
this.setState({open: true});
|
this.setState({ open: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
resetWorkspace = () => {
|
resetWorkspace = () => {
|
||||||
|
@ -152,6 +152,7 @@ class WorkspaceName extends Component {
|
|||||||
<div style={{ width: "40px", display: "flex" }}>
|
<div style={{ width: "40px", display: "flex" }}>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={faPen}
|
icon={faPen}
|
||||||
|
|
||||||
style={{ height: "18px", width: "18px", margin: "auto" }}
|
style={{ height: "18px", width: "18px", margin: "auto" }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user