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
Joffrey JAFFEUX b3eb67976d
DEV: Upgrades to Ember 3.10 (#7871)
Co-Authored-By: majakomel <maja.komel@gmail.com>
2019-07-16 12:45:15 +02:00

23 lines
566 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.element.style.display = "block";
},
actions: {
closeMessage() {
this.closeMessage(this.message);
}
}
});