mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
for admins, handle markedbyfilter comments differently, color them yellow
This commit is contained in:
parent
e67ce6c6cb
commit
ec6f4c1715
2 changed files with 18 additions and 1 deletions
|
@ -111,7 +111,10 @@ class Comment extends React.Component {
|
|||
visibility
|
||||
} = this.props;
|
||||
|
||||
const visible = visibility === 'visible';
|
||||
// we allow comments that are fully visible, or markedByFilter (flagged by
|
||||
// our bad words filter, but not at the critical level of offensiveness)
|
||||
const markedByFilter = visibility === 'markedbyfilter';
|
||||
const visible = markedByFilter || visibility === 'visible';
|
||||
|
||||
let commentText = content;
|
||||
if (replyUsername) {
|
||||
|
@ -182,6 +185,7 @@ class Comment extends React.Component {
|
|||
<div
|
||||
className={classNames({
|
||||
'comment-bubble': true,
|
||||
'comment-bubble-markedbyfilter': markedByFilter,
|
||||
'comment-bubble-reported': !visible
|
||||
})}
|
||||
>
|
||||
|
|
|
@ -197,6 +197,19 @@
|
|||
background: $reported-background;
|
||||
}
|
||||
}
|
||||
|
||||
&.comment-bubble-markedbyfilter {
|
||||
$markedbyfilter-outline: $ui-yellow;
|
||||
$markedbyfilter-background: rgb(255, 254, 210);
|
||||
|
||||
border-color: $markedbyfilter-outline;
|
||||
background-color: $markedbyfilter-background;
|
||||
|
||||
&:before {
|
||||
border-color: $markedbyfilter-outline transparent $markedbyfilter-outline $markedbyfilter-outline;
|
||||
background: $markedbyfilter-background;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comment-content {
|
||||
|
|
Loading…
Reference in a new issue