20 lines
400 B
JavaScript
20 lines
400 B
JavaScript
import Component from "@ember/component";
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
|
|
export default Component.extend({
|
|
tagName: "span",
|
|
|
|
@discourseComputed("text")
|
|
translatedText(text) {
|
|
if (text) return I18n.t(text);
|
|
},
|
|
|
|
click(event) {
|
|
if (event.target.tagName.toUpperCase() === "A") {
|
|
this.action(this.actionParam);
|
|
}
|
|
|
|
return false;
|
|
}
|
|
});
|