discourse/app/assets/javascripts/discourse/components/reviewable-bundled-action.js.es6
2019-03-28 13:36:30 -04:00

17 lines
373 B
JavaScript

export default Ember.Component.extend({
tagName: "",
multiple: Ember.computed.gt("bundle.actions.length", 1),
first: Ember.computed.alias("bundle.actions.firstObject"),
actions: {
performById(id) {
this.attrs.performAction(this.get("bundle.actions").findBy("id", id));
},
perform(action) {
this.attrs.performAction(action);
}
}
});