1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/controllers/admin-wizards-wizard.js.es6
2022-09-20 11:16:43 +02:00

26 Zeilen
702 B
JavaScript

import Controller from "@ember/controller";
import { default as discourseComputed } from "discourse-common/utils/decorators";
import { equal } from "@ember/object/computed";
export default Controller.extend({
creating: equal("wizardId", "create"),
@discourseComputed("creating", "wizardId")
wizardListVal(creating, wizardId) {
return creating ? null : wizardId;
},
@discourseComputed("creating", "wizardId")
messageKey(creating, wizardId) {
let key = "select";
if (creating) {
key = "create";
} else if (wizardId) {
key = "edit";
}
return key;
},
messageUrl:
"https://discourse.pluginmanager.org/c/discourse-custom-wizard/documentation",
});