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/app/components/featured-topic.js
2022-07-14 08:57:24 +08:00

17 lines
395 B
JavaScript

import Component from "@ember/component";
export default Component.extend({
classNameBindings: [":featured-topic"],
attributeBindings: ["topic.id:data-topic-id"],
click(e) {
if (e.target.closest(".last-posted-at")) {
this.appEvents.trigger("topic-entrance:show", {
topic: this.topic,
position: $(e.target).offset(),
});
return false;
}
},
});