This repository has been archived on 2023-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
osr-discourse-src/app/assets/javascripts/discourse/components/composer-message.js.es6
T
Robin Ward a8a76198b1 REFACTOR: Remove Ember.Component global variable
Use imports instead.
2019-10-23 12:30:52 -04:00

24 lines
602 B
JavaScript

import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
import { getOwner } from "discourse-common/lib/get-owner";
export default 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);
}
}
});