Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-14 05:52:52 +01:00
cf50a7deb3
* Apply prettier * applied prettier for similar-topics-validator Co-authored-by: Faizaan Gagan <fzngagan@gmail.com>
25 Zeilen
681 B
JavaScript
25 Zeilen
681 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://thepavilion.io/c/knowledge/discourse/custom-wizard",
|
|
});
|