get rid of most errors on Home page for migration
This commit is contained in:
parent
77b338ffb6
commit
d6d2505a4b
@ -81,6 +81,7 @@ export const login =
|
|||||||
axios
|
axios
|
||||||
.post(`${process.env.REACT_APP_BLOCKLY_API}/user`, body, config)
|
.post(`${process.env.REACT_APP_BLOCKLY_API}/user`, body, config)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
dispatch(setLanguage(res.data.user.language));
|
dispatch(setLanguage(res.data.user.language));
|
||||||
dispatch({
|
dispatch({
|
||||||
type: LOGIN_SUCCESS,
|
type: LOGIN_SUCCESS,
|
||||||
|
@ -611,7 +611,6 @@ class Toolbox extends React.Component {
|
|||||||
colour={getColour().procedures}
|
colour={getColour().procedures}
|
||||||
custom="PROCEDURE"
|
custom="PROCEDURE"
|
||||||
></Category>
|
></Category>
|
||||||
<sep></sep>
|
|
||||||
<Category name={Blockly.Msg.toolbox_advanced} colour={getColour().io}>
|
<Category name={Blockly.Msg.toolbox_advanced} colour={getColour().io}>
|
||||||
<Category
|
<Category
|
||||||
name={Blockly.Msg.toolbox_serial}
|
name={Blockly.Msg.toolbox_serial}
|
||||||
|
@ -142,7 +142,7 @@ class Navbar extends Component {
|
|||||||
</Link>
|
</Link>
|
||||||
) : null}
|
) : null}
|
||||||
{isHome ? (
|
{isHome ? (
|
||||||
<Tooltip title={Blockly.Msg.tooltip_start_tour} arrow>
|
<Tooltip title={'Start Tour'} arrow>
|
||||||
<IconButton
|
<IconButton
|
||||||
color="inherit"
|
color="inherit"
|
||||||
className={`openTour ${this.props.classes.button}`}
|
className={`openTour ${this.props.classes.button}`}
|
||||||
@ -156,7 +156,7 @@ class Navbar extends Component {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : null}
|
) : null}
|
||||||
{isAssessment ? (
|
{isAssessment ? (
|
||||||
<Tooltip title={Blockly.Msg.tooltip_start_tour} arrow>
|
<Tooltip title={'Start tour'} arrow>
|
||||||
<IconButton
|
<IconButton
|
||||||
color="inherit"
|
color="inherit"
|
||||||
className={`openTour ${this.props.classes.button}`}
|
className={`openTour ${this.props.classes.button}`}
|
||||||
@ -267,7 +267,7 @@ class Navbar extends Component {
|
|||||||
<FontAwesomeIcon icon={item.icon} />
|
<FontAwesomeIcon icon={item.icon} />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
{item.text === "Code Editor" ? (
|
{item.text === "Code Editor" ? (
|
||||||
<Badge badgeContent={"Experimental"} color="primary">
|
<Badge badgeContent={"Experimental"} color="primary" overlap="rectangular">
|
||||||
<ListItemText primary={item.text} />
|
<ListItemText primary={item.text} />
|
||||||
</Badge>
|
</Badge>
|
||||||
) : (
|
) : (
|
||||||
|
@ -53,7 +53,7 @@ class TooltipViewer extends Component {
|
|||||||
{Blockly.Msg.tooltip_viewer}
|
{Blockly.Msg.tooltip_viewer}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Typography variant="body2" component="p">
|
<Typography variant="body2" component="span">
|
||||||
<ReactMarkdown linkTarget="_blank">
|
<ReactMarkdown linkTarget="_blank">
|
||||||
{this.props.tooltip}
|
{this.props.tooltip}
|
||||||
</ReactMarkdown>
|
</ReactMarkdown>
|
||||||
|
@ -58,8 +58,8 @@ AutoSave.propTypes = {
|
|||||||
xml: PropTypes.string.isRequired,
|
xml: PropTypes.string.isRequired,
|
||||||
name: PropTypes.string,
|
name: PropTypes.string,
|
||||||
workspaceName: PropTypes.func.isRequired,
|
workspaceName: PropTypes.func.isRequired,
|
||||||
setAutosave: PropTypes.func.isRequired,
|
setAutosave: PropTypes.func,
|
||||||
autosave: PropTypes.bool.isRequired,
|
autosave: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state) => ({
|
const mapStateToProps = (state) => ({
|
||||||
|
@ -57,7 +57,7 @@ class DownloadProject extends Component {
|
|||||||
|
|
||||||
DownloadProject.propTypes = {
|
DownloadProject.propTypes = {
|
||||||
xml: PropTypes.string.isRequired,
|
xml: PropTypes.string.isRequired,
|
||||||
name: PropTypes.string.isRequired
|
name: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
|
@ -129,7 +129,7 @@ OpenProject.propTypes = {
|
|||||||
clearStats: PropTypes.func.isRequired,
|
clearStats: PropTypes.func.isRequired,
|
||||||
workspaceName: PropTypes.func.isRequired,
|
workspaceName: PropTypes.func.isRequired,
|
||||||
xml: PropTypes.string.isRequired,
|
xml: PropTypes.string.isRequired,
|
||||||
name: PropTypes.string.isRequired
|
name: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
|
@ -301,7 +301,7 @@ class WorkspaceFunc extends Component {
|
|||||||
WorkspaceFunc.propTypes = {
|
WorkspaceFunc.propTypes = {
|
||||||
shareProject: PropTypes.func.isRequired,
|
shareProject: PropTypes.func.isRequired,
|
||||||
clearMessages: PropTypes.func.isRequired,
|
clearMessages: PropTypes.func.isRequired,
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string,
|
||||||
message: PropTypes.object.isRequired,
|
message: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ class WorkspaceFunc extends Component {
|
|||||||
<ResetWorkspace
|
<ResetWorkspace
|
||||||
style={
|
style={
|
||||||
this.props.projectType === "project" ||
|
this.props.projectType === "project" ||
|
||||||
this.props.projectType === "gallery"
|
this.props.projectType === "gallery"
|
||||||
? { marginRight: "5px" }
|
? { marginRight: "5px" }
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
@ -83,10 +83,10 @@ class WorkspaceFunc extends Component {
|
|||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{!this.props.assessment &&
|
{!this.props.assessment &&
|
||||||
(this.props.projectType === "project" ||
|
(this.props.projectType === "project" ||
|
||||||
this.props.projectType === "gallery") &&
|
this.props.projectType === "gallery") &&
|
||||||
this.props.user &&
|
this.props.user &&
|
||||||
this.props.user.email === this.props.project.creator ? (
|
this.props.user.email === this.props.project.creator ? (
|
||||||
<DeleteProject
|
<DeleteProject
|
||||||
project={this.props.project}
|
project={this.props.project}
|
||||||
projectType={this.props.projectType}
|
projectType={this.props.projectType}
|
||||||
@ -99,7 +99,7 @@ class WorkspaceFunc extends Component {
|
|||||||
|
|
||||||
WorkspaceFunc.propTypes = {
|
WorkspaceFunc.propTypes = {
|
||||||
user: PropTypes.object,
|
user: PropTypes.object,
|
||||||
autosave: PropTypes.bool.isRequired,
|
autosave: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state) => ({
|
const mapStateToProps = (state) => ({
|
||||||
|
@ -105,9 +105,8 @@ class WorkspaceName extends Component {
|
|||||||
return (
|
return (
|
||||||
<div style={this.props.style}>
|
<div style={this.props.style}>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={`${Blockly.Msg.tooltip_project_title} ${
|
title={`${Blockly.Msg.tooltip_project_title} ${this.props.name ? `: ${this.props.name}` : ""
|
||||||
this.props.name ? `: ${this.props.name}` : ""
|
}`}
|
||||||
}`}
|
|
||||||
arrow
|
arrow
|
||||||
style={{ height: "100%" }}
|
style={{ height: "100%" }}
|
||||||
>
|
>
|
||||||
@ -126,8 +125,8 @@ class WorkspaceName extends Component {
|
|||||||
this.props.projectType === "gallery"
|
this.props.projectType === "gallery"
|
||||||
? "Projektdaten ändern"
|
? "Projektdaten ändern"
|
||||||
: this.props.projectType === "project"
|
: this.props.projectType === "project"
|
||||||
? "Projekt umbenennen"
|
? "Projekt umbenennen"
|
||||||
: "Projekt benennen",
|
: "Projekt benennen",
|
||||||
content:
|
content:
|
||||||
this.props.projectType === "gallery"
|
this.props.projectType === "gallery"
|
||||||
? "Bitte gib einen Titel und eine Beschreibung für das Galerie-Projekt ein und bestätige die Angaben mit einem Klick auf 'Eingabe'."
|
? "Bitte gib einen Titel und eine Beschreibung für das Galerie-Projekt ein und bestätige die Angaben mit einem Klick auf 'Eingabe'."
|
||||||
@ -136,13 +135,13 @@ class WorkspaceName extends Component {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{this.props.name &&
|
{this.props.name &&
|
||||||
!isWidthDown(
|
!isWidthDown(
|
||||||
this.props.projectType === "project" ||
|
this.props.projectType === "project" ||
|
||||||
this.props.projectType === "gallery"
|
this.props.projectType === "gallery"
|
||||||
? "xl"
|
? "xl"
|
||||||
: "xs",
|
: "xs",
|
||||||
this.props.width
|
this.props.width
|
||||||
) ? (
|
) ? (
|
||||||
<Typography style={{ margin: "auto -3px auto 12px" }}>
|
<Typography style={{ margin: "auto -3px auto 12px" }}>
|
||||||
{this.props.name}
|
{this.props.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -184,7 +183,7 @@ class WorkspaceName extends Component {
|
|||||||
>
|
>
|
||||||
<div style={{ marginTop: "10px" }}>
|
<div style={{ marginTop: "10px" }}>
|
||||||
{this.props.projectType === "gallery" ||
|
{this.props.projectType === "gallery" ||
|
||||||
this.state.projectType === "gallery" ? (
|
this.state.projectType === "gallery" ? (
|
||||||
<div>
|
<div>
|
||||||
<TextField
|
<TextField
|
||||||
autoFocus
|
autoFocus
|
||||||
|
@ -11,9 +11,7 @@ store.dispatch(fetchSensors());
|
|||||||
fetchSensors();
|
fetchSensors();
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<React.StrictMode>
|
<App />,
|
||||||
<App />
|
|
||||||
</React.StrictMode>,
|
|
||||||
document.getElementById("root")
|
document.getElementById("root")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user