0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00
Dieser Commit ist enthalten in:
merefield 2023-07-11 08:48:20 +01:00
Ursprung ccb7095b00
Commit 0cec743253

Datei anzeigen

@ -24,18 +24,20 @@ export default {
api.onAppEvent("page:changed", (data) => {
const currentUser = container.lookup("service:current-user");
const settings = container.lookup("service:site-settings");
const redirectToWizard = currentUser.redirect_to_wizard;
const excludedPaths = settings.wizard_redirect_exclude_paths
.split("|")
.concat(["loading"]);
if (
redirectToWizard &&
data.currentRouteName !== "customWizardStep" &&
!excludedPaths.find((p) => {
return data.currentRouteName.indexOf(p) > -1;
})
) {
window.location = "/w/" + redirectToWizard.dasherize();
if (currentUser) {
const redirectToWizard = currentUser.redirect_to_wizard;
const excludedPaths = settings.wizard_redirect_exclude_paths
.split("|")
.concat(["loading"]);
if (
redirectToWizard &&
data.currentRouteName !== "customWizardStep" &&
!excludedPaths.find((p) => {
return data.currentRouteName.indexOf(p) > -1;
})
) {
window.location = "/w/" + redirectToWizard.dasherize();
}
}
});