mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-16 06:23:50 +08:00
feat: fix the problem of abnormal tour when refreshing (#3054)
* fix: fix the problem of abnormal tour when refreshing * fix: change the way enableTour configuration is stored
This commit is contained in:
@ -203,9 +203,14 @@ export function getNextUrl(pathName = window.location.pathname) {
|
||||
return TourUrlList[TourUrlList.indexOf(pathName.replace("/", "")) + 1] || "";
|
||||
}
|
||||
|
||||
let orgIsTourVisible = true;
|
||||
|
||||
export function setOrgIsTourVisible(visible) {
|
||||
orgIsTourVisible = visible;
|
||||
}
|
||||
|
||||
export function setIsTourVisible(visible) {
|
||||
localStorage.setItem("isTourVisible", visible);
|
||||
window.dispatchEvent(new Event("storageTourChanged"));
|
||||
}
|
||||
|
||||
export function setTourLogo(tourLogoSrc) {
|
||||
@ -215,7 +220,7 @@ export function setTourLogo(tourLogoSrc) {
|
||||
}
|
||||
|
||||
export function getTourVisible() {
|
||||
return localStorage.getItem("isTourVisible") !== "false";
|
||||
return localStorage.getItem("isTourVisible") !== "false" && orgIsTourVisible;
|
||||
}
|
||||
|
||||
export function getNextButtonChild(nextPathName) {
|
||||
|
Reference in New Issue
Block a user