0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-24 10:20:28 +01:00
discourse-custom-wizard/assets/javascripts/discourse/controllers/admin-wizards-wizard.js

27 Zeilen
703 B
JavaScript

2020-04-13 14:17:22 +02:00
import Controller from "@ember/controller";
import { equal } from "@ember/object/computed";
2024-11-22 17:11:51 +01:00
import { default as discourseComputed } from "discourse-common/utils/decorators";
2020-04-13 14:17:22 +02:00
export default Controller.extend({
creating: equal("wizardId", "create"),
@discourseComputed("creating", "wizardId")
2020-04-13 14:17:22 +02:00
wizardListVal(creating, wizardId) {
return creating ? null : wizardId;
},
@discourseComputed("creating", "wizardId")
2020-04-20 13:40:32 +02:00
messageKey(creating, wizardId) {
let key = "select";
2020-04-13 14:17:22 +02:00
if (creating) {
key = "create";
2020-04-13 14:17:22 +02:00
} else if (wizardId) {
key = "edit";
2020-04-13 14:17:22 +02:00
}
return key;
2020-04-20 13:40:32 +02:00
},
2022-08-29 11:58:42 +02:00
messageUrl:
2023-10-10 09:29:05 +02:00
"https://pavilion.tech/products/discourse-custom-wizard-plugin/documentation/",
});