Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Add back message bus subscription
Dieser Commit ist enthalten in:
Ursprung
bf2dcdba86
Commit
6a9f93bccb
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
|
@ -7,12 +7,18 @@ import { dasherize } from "@ember/string";
|
|||
export default {
|
||||
name: "custom-wizard-edits",
|
||||
initialize(container) {
|
||||
const messageBus = container.lookup("service:message-bus");
|
||||
const siteSettings = container.lookup("service:site-settings");
|
||||
|
||||
if (!siteSettings.custom_wizard_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
messageBus.subscribe("/redirect_to_wizard", function (wizardId) {
|
||||
const wizardUrl = window.location.origin + "/w/" + wizardId;
|
||||
window.location.href = wizardUrl;
|
||||
});
|
||||
|
||||
withPluginApi("0.8.36", (api) => {
|
||||
api.onAppEvent("page:changed", (data) => {
|
||||
const currentUser = container.lookup("service:current-user");
|
||||
|
|
Laden …
In neuem Issue referenzieren