feat: fix tour button (#3961)

This commit is contained in:
Attack825
2025-07-16 12:02:14 +08:00
committed by GitHub
parent 3ac5aad648
commit 18d639cca2

View File

@@ -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>