mirror of
https://github.com/discourse/discourse.git
synced 2025-02-27 03:24:09 +08:00
23 lines
554 B
JavaScript
23 lines
554 B
JavaScript
import computed from 'ember-addons/ember-computed-decorators';
|
|
import { getOwner } from 'discourse-common/lib/get-owner';
|
|
|
|
export default Ember.Component.extend({
|
|
classNameBindings: [':composer-popup', ':hidden', 'message.extraClass'],
|
|
|
|
@computed('message.templateName')
|
|
layout(templateName) {
|
|
return getOwner(this).lookup(`template:composer/${templateName}`);
|
|
},
|
|
|
|
didInsertElement() {
|
|
this._super();
|
|
this.$().show();
|
|
},
|
|
|
|
actions: {
|
|
closeMessage() {
|
|
this.sendAction('closeMessage', this.get('message'));
|
|
}
|
|
}
|
|
});
|