Add unseen-topic and new-posts classnames to topic lists

Adds classname descriptions for new, unread posts, and closed statuses on topic-list-items.

Allows for new/unread/closed topic-list-items to be targeted with css directly.
This commit is contained in:
Jeff Wong 2018-03-30 18:49:13 -07:00
parent 31ce955487
commit 03b2590036
1 changed files with 8 additions and 1 deletions

View File

@ -63,8 +63,15 @@ export default Ember.Component.extend(bufferedRender({
classes.push('has-excerpt');
}
if (topic.get('unseen')) {
classes.push("unseen-topic");
}
['liked', 'archived', 'bookmarked', 'pinned'].forEach(name => {
if (topic.get('displayNewPosts')) {
classes.push("new-posts");
}
['liked', 'archived', 'bookmarked', 'pinned', 'closed'].forEach(name => {
if (topic.get(name)) {
classes.push(name);
}