0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2025-02-01 02:48:56 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-custom-step.js.es6

35 Zeilen
754 B
Text

2020-04-05 11:37:09 +10:00
import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
2017-10-19 10:17:36 +08:00
2020-04-05 11:37:09 +10:00
export default Component.extend({
classNames: "wizard-custom-step",
@discourseComputed("step.index")
stepConditionOptions(stepIndex) {
const options = {
inputTypes: "validation",
context: "step",
textSelection: "value",
userFieldSelection: true,
groupSelection: true,
};
if (stepIndex > 0) {
options["wizardFieldSelection"] = true;
options["wizardActionSelection"] = true;
}
return options;
},
2020-03-30 10:53:28 +11:00
actions: {
bannerUploadDone(upload) {
this.set("step.banner", upload.url);
},
2020-03-30 10:53:28 +11:00
bannerUploadDeleted() {
this.set("step.banner", null);
},
},
2017-09-23 10:34:07 +08:00
});