0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-27 03:20:27 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-custom-step.js.es6

23 Zeilen
577 B
Text

2020-04-05 03:37:09 +02:00
import Component from "@ember/component";
2020-04-14 07:46:06 +02:00
import { default as discourseComputed } from 'discourse-common/utils/decorators';
import { wizardFieldList } from '../lib/wizard';
2017-10-19 04:17:36 +02:00
2020-04-05 03:37:09 +02:00
export default Component.extend({
2017-09-23 04:34:07 +02:00
classNames: 'wizard-custom-step',
2020-03-30 01:53:28 +02:00
2020-04-14 07:46:06 +02:00
@discourseComputed('wizard.steps', 'step.id')
descriptionWizardFields(steps, stepId) {
return wizardFieldList(steps, { upTo: stepId });
},
2020-03-30 01:53:28 +02:00
actions: {
bannerUploadDone(upload) {
this.set("step.banner", upload.url);
},
bannerUploadDeleted() {
this.set("step.banner", null);
}
}
2017-09-23 04:34:07 +02:00
});