add DeviceSelection to CodeEditor,Project+Tutorial

This commit is contained in:
fbruc03 2022-11-15 16:22:29 +01:00
parent 6fcaff9cc3
commit 5974608fd8
3 changed files with 20 additions and 20 deletions

View File

@ -11,6 +11,7 @@ import Sidebar from "./Sidebar";
import Dialog from "../Dialog"; import Dialog from "../Dialog";
import SaveIcon from "./SaveIcon"; import SaveIcon from "./SaveIcon";
import store from "../../store"; import store from "../../store";
import DeviceSelection from "../DeviceSelection";
const CodeEditor = (props) => { const CodeEditor = (props) => {
//const [filehandle, setFileHandle] = useState(); //const [filehandle, setFileHandle] = useState();
@ -192,6 +193,7 @@ void loop() {
}} }}
/> />
</Grid> </Grid>
<DeviceSelection />
<Grid item lg={4} md={4}> <Grid item lg={4} md={4}>
<Button <Button
style={{ padding: "1rem", margin: "1rem" }} style={{ padding: "1rem", margin: "1rem" }}

View File

@ -18,6 +18,7 @@ import Divider from "@material-ui/core/Divider";
import Typography from "@material-ui/core/Typography"; import Typography from "@material-ui/core/Typography";
import Backdrop from "@material-ui/core/Backdrop"; import Backdrop from "@material-ui/core/Backdrop";
import CircularProgress from "@material-ui/core/CircularProgress"; import CircularProgress from "@material-ui/core/CircularProgress";
import DeviceSelection from "../DeviceSelection";
const styles = (theme) => ({ const styles = (theme) => ({
link: { link: {
@ -60,8 +61,7 @@ class ProjectHome extends Component {
this.setState({ this.setState({
snackbar: true, snackbar: true,
key: Date.now(), key: Date.now(),
message: `Dein angefragtes ${ message: `Dein angefragtes ${type === "gallery" ? "Galerie-" : ""
type === "gallery" ? "Galerie-" : ""
}Projekt konnte nicht gefunden werden.`, }Projekt konnte nicht gefunden werden.`,
type: "error", type: "error",
}); });
@ -108,6 +108,7 @@ class ProjectHome extends Component {
/> />
<h1>{data}</h1> <h1>{data}</h1>
<DeviceSelection />
{this.props.progress ? ( {this.props.progress ? (
<Backdrop open invisible> <Backdrop open invisible>
<CircularProgress color="primary" /> <CircularProgress color="primary" />
@ -127,8 +128,7 @@ class ProjectHome extends Component {
}} }}
> >
<Link <Link
to={`/${ to={`/${data === "Projekte" ? "project" : "gallery"
data === "Projekte" ? "project" : "gallery"
}/${project._id}`} }/${project._id}`}
style={{ textDecoration: "none", color: "inherit" }} style={{ textDecoration: "none", color: "inherit" }}
> >

View File

@ -37,6 +37,7 @@ import Tooltip from "@material-ui/core/Tooltip";
import IconButton from "@material-ui/core/IconButton"; import IconButton from "@material-ui/core/IconButton";
import Snackbar from "../Snackbar"; import Snackbar from "../Snackbar";
import Divider from "@material-ui/core/Divider"; import Divider from "@material-ui/core/Divider";
import DeviceSelection from "../DeviceSelection";
const styles = (theme) => ({ const styles = (theme) => ({
outerDiv: { outerDiv: {
@ -243,13 +244,10 @@ class TutorialHome extends Component {
cy="50%" cy="50%"
fill="none" fill="none"
stroke-width="10" stroke-width="10"
stroke-dashoffset={`${ stroke-dashoffset={`${75 * 2 * Math.PI * (1 - (50 / 100 + success / 2))
75 * 2 * Math.PI * (1 - (50 / 100 + success / 2))
}`} }`}
stroke-dasharray={`${ stroke-dasharray={`${75 * 2 * Math.PI * (1 - (50 / 100 - success / 2))
75 * 2 * Math.PI * (1 - (50 / 100 - success / 2)) } ${75 * 2 * Math.PI * (1 - (50 / 100 + success / 2))
} ${
75 * 2 * Math.PI * (1 - (50 / 100 + success / 2))
}`} }`}
></circle> ></circle>
)} )}
@ -265,8 +263,7 @@ class TutorialHome extends Component {
cy="50%" cy="50%"
fill="none" fill="none"
stroke-width="10" stroke-width="10"
stroke-dashoffset={`${ stroke-dashoffset={`${75 * 2 * Math.PI * (1 - (50 / 100 + success / 2))
75 * 2 * Math.PI * (1 - (50 / 100 + success / 2))
}`} }`}
stroke-dasharray={`${75 * 2 * Math.PI}`} stroke-dasharray={`${75 * 2 * Math.PI}`}
></circle> ></circle>
@ -311,6 +308,7 @@ class TutorialHome extends Component {
); );
})} })}
</Grid> </Grid>
<DeviceSelection />
{this.props.user ? ( {this.props.user ? (
<div> <div>
<h2>User Tutorials</h2> <h2>User Tutorials</h2>