Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
fix for anon
Dieser Commit ist enthalten in:
Ursprung
ccb7095b00
Commit
0cec743253
1 geänderte Dateien mit 14 neuen und 12 gelöschten Zeilen
|
@ -24,18 +24,20 @@ export default {
|
||||||
api.onAppEvent("page:changed", (data) => {
|
api.onAppEvent("page:changed", (data) => {
|
||||||
const currentUser = container.lookup("service:current-user");
|
const currentUser = container.lookup("service:current-user");
|
||||||
const settings = container.lookup("service:site-settings");
|
const settings = container.lookup("service:site-settings");
|
||||||
const redirectToWizard = currentUser.redirect_to_wizard;
|
if (currentUser) {
|
||||||
const excludedPaths = settings.wizard_redirect_exclude_paths
|
const redirectToWizard = currentUser.redirect_to_wizard;
|
||||||
.split("|")
|
const excludedPaths = settings.wizard_redirect_exclude_paths
|
||||||
.concat(["loading"]);
|
.split("|")
|
||||||
if (
|
.concat(["loading"]);
|
||||||
redirectToWizard &&
|
if (
|
||||||
data.currentRouteName !== "customWizardStep" &&
|
redirectToWizard &&
|
||||||
!excludedPaths.find((p) => {
|
data.currentRouteName !== "customWizardStep" &&
|
||||||
return data.currentRouteName.indexOf(p) > -1;
|
!excludedPaths.find((p) => {
|
||||||
})
|
return data.currentRouteName.indexOf(p) > -1;
|
||||||
) {
|
})
|
||||||
window.location = "/w/" + redirectToWizard.dasherize();
|
) {
|
||||||
|
window.location = "/w/" + redirectToWizard.dasherize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren