mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
Merge pull request #2965 from benjiwheeler/admin-markedbyfilter
for admins, handle markedbyfilter comments differently, color them ye…
This commit is contained in:
commit
4ec21913dc
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