1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/wizard-custom-step.js.es6
Angus McLeod d128565979 various
2020-04-14 15:46:06 +10:00

22 Zeilen
577 B
JavaScript

import Component from "@ember/component";
import { default as discourseComputed } from 'discourse-common/utils/decorators';
import { wizardFieldList } from '../lib/wizard';
export default Component.extend({
classNames: 'wizard-custom-step',
@discourseComputed('wizard.steps', 'step.id')
descriptionWizardFields(steps, stepId) {
return wizardFieldList(steps, { upTo: stepId });
},
actions: {
bannerUploadDone(upload) {
this.set("step.banner", upload.url);
},
bannerUploadDeleted() {
this.set("step.banner", null);
}
}
});