Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-29 20:20:29 +01:00
18 Zeilen
431 B
JavaScript
18 Zeilen
431 B
JavaScript
export default Ember.Route.extend({
|
|
beforeModel() {
|
|
const appModel = this.modelFor('custom');
|
|
|
|
if (appModel) {
|
|
if (appModel.completed) {
|
|
this.set('completed', true);
|
|
} else if (appModel.start) {
|
|
this.replaceWith('custom.step', appModel.start);
|
|
}
|
|
}
|
|
},
|
|
|
|
setupController(controller) {
|
|
const completed = this.get('completed');
|
|
controller.set('completed', completed);
|
|
}
|
|
});
|