mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 20:26:41 +08:00
17 lines
373 B
JavaScript
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);
|
|
}
|
|
}
|
|
});
|