0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 12:22:54 +01:00
discourse-custom-wizard/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);
}
}
});