Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-26 02:50:28 +01:00
22 Zeilen
577 B
JavaScript
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);
|
|
}
|
|
}
|
|
});
|