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/composer-message.js.es6
2019-01-19 10:05:51 +01:00

23 lines
552 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(...arguments);
this.$().show();
},
actions: {
closeMessage() {
this.closeMessage(this.get("message"));
}
}
});