From 5974608fd80097c9f1d931fc71489b98dd75d6d5 Mon Sep 17 00:00:00 2001 From: fbruc03 <65135023+fbruc03@users.noreply.github.com> Date: Tue, 15 Nov 2022 16:22:29 +0100 Subject: [PATCH] add DeviceSelection to CodeEditor,Project+Tutorial --- src/components/CodeEditor/CodeEditor.js | 2 ++ src/components/Project/ProjectHome.js | 14 +++++++------- src/components/Tutorial/TutorialHome.js | 24 +++++++++++------------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/CodeEditor/CodeEditor.js b/src/components/CodeEditor/CodeEditor.js index f361aa6..7741b20 100644 --- a/src/components/CodeEditor/CodeEditor.js +++ b/src/components/CodeEditor/CodeEditor.js @@ -11,6 +11,7 @@ import Sidebar from "./Sidebar"; import Dialog from "../Dialog"; import SaveIcon from "./SaveIcon"; import store from "../../store"; +import DeviceSelection from "../DeviceSelection"; const CodeEditor = (props) => { //const [filehandle, setFileHandle] = useState(); @@ -192,6 +193,7 @@ void loop() { }} /> + ({ link: { @@ -60,9 +61,8 @@ class ProjectHome extends Component { this.setState({ snackbar: true, key: Date.now(), - message: `Dein angefragtes ${ - type === "gallery" ? "Galerie-" : "" - }Projekt konnte nicht gefunden werden.`, + message: `Dein angefragtes ${type === "gallery" ? "Galerie-" : "" + }Projekt konnte nicht gefunden werden.`, type: "error", }); } @@ -108,6 +108,7 @@ class ProjectHome extends Component { /> {data} + {this.props.progress ? ( @@ -127,9 +128,8 @@ class ProjectHome extends Component { }} > {project.title} @@ -153,7 +153,7 @@ class ProjectHome extends Component { {this.props.user && - this.props.user.email === project.creator ? ( + this.props.user.email === project.creator ? ( ({ outerDiv: { @@ -243,14 +244,11 @@ class TutorialHome extends Component { cy="50%" fill="none" stroke-width="10" - stroke-dashoffset={`${ - 75 * 2 * Math.PI * (1 - (50 / 100 + success / 2)) - }`} - stroke-dasharray={`${ - 75 * 2 * Math.PI * (1 - (50 / 100 - success / 2)) - } ${ - 75 * 2 * Math.PI * (1 - (50 / 100 + success / 2)) - }`} + stroke-dashoffset={`${75 * 2 * Math.PI * (1 - (50 / 100 + success / 2)) + }`} + stroke-dasharray={`${75 * 2 * Math.PI * (1 - (50 / 100 - success / 2)) + } ${75 * 2 * Math.PI * (1 - (50 / 100 + success / 2)) + }`} > )} {success < 1 && !error ? ( @@ -265,9 +263,8 @@ class TutorialHome extends Component { cy="50%" fill="none" stroke-width="10" - stroke-dashoffset={`${ - 75 * 2 * Math.PI * (1 - (50 / 100 + success / 2)) - }`} + stroke-dashoffset={`${75 * 2 * Math.PI * (1 - (50 / 100 + success / 2)) + }`} stroke-dasharray={`${75 * 2 * Math.PI}`} > ) : null} @@ -279,8 +276,8 @@ class TutorialHome extends Component { tutorialStatus === "Error" ? this.props.classes.outerDivError : tutorialStatus === "Success" - ? this.props.classes.outerDivSuccess - : null + ? this.props.classes.outerDivSuccess + : null )} > @@ -311,6 +308,7 @@ class TutorialHome extends Component { ); })} + {this.props.user ? ( User Tutorials