Fixed auto redirect for welcome pages

This commit is contained in:
frikky
2022-07-25 03:16:43 +02:00
parent d3e02de38f
commit 14c41faa78
6 changed files with 36 additions and 16 deletions
+2
View File
@@ -2748,6 +2748,8 @@ const AngularWorkflow = (defaultprops) => {
left: 0,
selected: "",
});
console.log("DOne in the node update")
})
}
+12 -3
View File
@@ -184,13 +184,22 @@ const LoginDialog = (props) => {
);
}
setIsLoggedIn(true);
if (!responseJson.tutorials.includes("welcome")) {
if (responseJson.tutorials === undefined || responseJson.tutorials === null || !responseJson.tutorials.includes("welcome")) {
console.log("RUN Welcome!!")
window.location.pathname = "/welcome"
return
}
window.location.href = "/workflows"
const tmpView = new URLSearchParams(window.location.search).get("view")
if (tmpView !== undefined && tmpView !== null) {
//const newUrl = `/${tmpView}${decodeURIComponent(window.location.search)}`
const newUrl = `/${tmpView}`
window.location.pathname = newUrl
} else {
window.location.pathname = "/workflows"
}
setIsLoggedIn(true);
}
})
)