mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Highlight the OP of a warning
This commit is contained in:
parent
7af723c0ed
commit
d36916ccf5
@ -3,7 +3,7 @@ const DAY = 60 * 50 * 1000;
|
|||||||
const PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
const PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
||||||
classNames: ['topic-post', 'clearfix'],
|
classNames: ['topic-post', 'clearfix'],
|
||||||
templateName: 'post',
|
templateName: 'post',
|
||||||
classNameBindings: ['postTypeClass',
|
classNameBindings: ['needsModeratorClass:moderator:regular',
|
||||||
'selected',
|
'selected',
|
||||||
'post.hidden:post-hidden',
|
'post.hidden:post-hidden',
|
||||||
'post.deleted:deleted',
|
'post.deleted:deleted',
|
||||||
@ -26,8 +26,9 @@ const PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
|||||||
if (updatedAtDate > (rightNow - DAY * Discourse.SiteSettings.history_hours_high)) return 'heatmap-low';
|
if (updatedAtDate > (rightNow - DAY * Discourse.SiteSettings.history_hours_high)) return 'heatmap-low';
|
||||||
}.property('post.updated_at'),
|
}.property('post.updated_at'),
|
||||||
|
|
||||||
postTypeClass: function() {
|
needsModeratorClass: function() {
|
||||||
return this.get('post.post_type') === Discourse.Site.currentProp('post_types.moderator_action') ? 'moderator' : 'regular';
|
return (this.get('post.post_type') === this.site.get('post_types.moderator_action')) ||
|
||||||
|
(this.get('post.topic.is_warning') && this.get('post.firstPost'));
|
||||||
}.property('post.post_type'),
|
}.property('post.post_type'),
|
||||||
|
|
||||||
groupNameClass: function() {
|
groupNameClass: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user