hide tour on various pages

This commit is contained in:
Mario 2020-12-15 15:19:06 +01:00
parent 8504dacc38
commit 127c9551a0

View File

@ -25,6 +25,7 @@ import * as steps from './Tour';
import { faBars, faChevronLeft, faLayerGroup, faSignInAlt, faSignOutAlt, faCertificate, faUserCircle, faQuestionCircle, faCog, faChalkboardTeacher, faTools, faLightbulb } from "@fortawesome/free-solid-svg-icons"; import { faBars, faChevronLeft, faLayerGroup, faSignInAlt, faSignOutAlt, faCertificate, faUserCircle, faQuestionCircle, faCog, faChalkboardTeacher, faTools, faLightbulb } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import * as Blockly from 'blockly' import * as Blockly from 'blockly'
import Tooltip from '@material-ui/core/Tooltip';
const styles = (theme) => ({ const styles = (theme) => ({
@ -96,6 +97,8 @@ class Navbar extends Component {
Tutorial Tutorial
</Typography> </Typography>
</Link> : null} </Link> : null}
{/^\/(\/.*$|$)/g.test(this.props.location.pathname) ?
<Tooltip title='Hilfe starten' arrow>
<IconButton <IconButton
color="inherit" color="inherit"
className={`openTour ${this.props.classes.button}`} className={`openTour ${this.props.classes.button}`}
@ -104,6 +107,7 @@ class Navbar extends Component {
> >
<FontAwesomeIcon icon={faQuestionCircle} size="s" /> <FontAwesomeIcon icon={faQuestionCircle} size="s" />
</IconButton> </IconButton>
</Tooltip> : null}
<Tour <Tour
steps={steps.steps} steps={steps.steps}
isOpen={this.state.isTourOpen} isOpen={this.state.isTourOpen}