mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -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
|
visibility
|
||||||
} = this.props;
|
} = 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;
|
let commentText = content;
|
||||||
if (replyUsername) {
|
if (replyUsername) {
|
||||||
|
@ -182,6 +185,7 @@ class Comment extends React.Component {
|
||||||
<div
|
<div
|
||||||
className={classNames({
|
className={classNames({
|
||||||
'comment-bubble': true,
|
'comment-bubble': true,
|
||||||
|
'comment-bubble-markedbyfilter': markedByFilter,
|
||||||
'comment-bubble-reported': !visible
|
'comment-bubble-reported': !visible
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
|
|
@ -197,6 +197,19 @@
|
||||||
background: $reported-background;
|
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 {
|
.comment-content {
|
||||||
|
|
Loading…
Reference in a new issue