This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/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);
}
}
});