mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-07-05 05:12:11 +00:00
DEV: Add class to solved topics in list (#159)
This commit is contained in:
parent
f20274f44a
commit
6b6d5978a2
@ -0,0 +1,18 @@
|
|||||||
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
import TopicListItem from "discourse/components/topic-list-item";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "add-topic-list-class",
|
||||||
|
initialize() {
|
||||||
|
TopicListItem.reopen({
|
||||||
|
@discourseComputed()
|
||||||
|
unboundClassNames() {
|
||||||
|
let classList = this._super(...arguments);
|
||||||
|
if (this.topic.has_accepted_answer) {
|
||||||
|
classList += " status-solved";
|
||||||
|
}
|
||||||
|
return classList;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user