mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
fix: fix tour disabled state (#2264)
* fix: distinguish between pages that can tour or not * Update OpenTour.js --------- Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
parent
7e349c1768
commit
7a85b74573
@ -26,13 +26,23 @@ class OpenTour extends React.Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
canTour = () => {
|
||||||
|
const path = window.location.pathname.replace("/", "");
|
||||||
|
return TourConfig.TourUrlList.indexOf(path) !== -1 || path === "";
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Tooltip title="Click to enable the help wizard">
|
this.canTour() ?
|
||||||
<div className="select-box" style={{display: Setting.isMobile() ? "none" : null, ...this.props.style}} onClick={() => TourConfig.setIsTourVisible(true)} >
|
<Tooltip title="Click to enable the help wizard.">
|
||||||
<QuestionCircleOutlined style={{fontSize: "24px", color: "#4d4d4d"}} />
|
<div className="select-box" style={{display: Setting.isMobile() ? "none" : null, ...this.props.style}} onClick={() => TourConfig.setIsTourVisible(true)} >
|
||||||
|
<QuestionCircleOutlined style={{fontSize: "24px", color: "#4d4d4d"}} />
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
:
|
||||||
|
<div className="select-box" style={{display: Setting.isMobile() ? "none" : null, cursor: "not-allowed", ...this.props.style}} >
|
||||||
|
<QuestionCircleOutlined style={{fontSize: "24px", color: "#adadad"}} />
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user