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
2020-03-12 13:29:55 -04:00

24 lines
615 B
JavaScript

import discourseComputed from "discourse-common/utils/decorators";
import Component from "@ember/component";
import { getOwner } from "discourse-common/lib/get-owner";
export default Component.extend({
classNameBindings: [":composer-popup", ":hidden", "message.extraClass"],
@discourseComputed("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);
}
}
});