mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-07 02:20:28 +08:00
feat: fix tour button (#3961)
This commit is contained in:
@@ -31,11 +31,17 @@ class OpenTour extends React.Component {
|
|||||||
return TourConfig.TourUrlList.indexOf(path) !== -1 || path === "";
|
return TourConfig.TourUrlList.indexOf(path) !== -1 || path === "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleTourClick = () => {
|
||||||
|
TourConfig.setIsTourVisible(true);
|
||||||
|
const event = new Event("storageTourChanged");
|
||||||
|
window.dispatchEvent(event);
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
this.canTour() ?
|
this.canTour() ?
|
||||||
<Tooltip title="Click to open tour">
|
<Tooltip title="Click to open tour">
|
||||||
<div className="select-box" style={{display: Setting.isMobile() ? "none" : null, ...this.props.style}} onClick={() => TourConfig.setIsTourVisible(true)} >
|
<div className="select-box" style={{display: Setting.isMobile() ? "none" : null, ...this.props.style}} onClick={this.handleTourClick}>
|
||||||
<QuestionCircleOutlined style={{fontSize: "24px"}} />
|
<QuestionCircleOutlined style={{fontSize: "24px"}} />
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
Reference in New Issue
Block a user