feat: 彻底不显示已屏蔽的评论
This commit is contained in:
138
src/Flows.js
138
src/Flows.js
@@ -112,77 +112,75 @@ class Reply extends PureComponent {
|
|||||||
search_param,
|
search_param,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const author = info.name,
|
const author = info.name,
|
||||||
replyText = info.text,
|
replyText = info.text;
|
||||||
has_block_words = check_block(info);
|
|
||||||
this.color_picker = new ColorPicker();
|
this.color_picker = new ColorPicker();
|
||||||
return (
|
return (
|
||||||
<div
|
!check_block(info) && (
|
||||||
className={'flow-reply box'}
|
<div
|
||||||
style={
|
className={'flow-reply box'}
|
||||||
info._display_color
|
style={
|
||||||
? {
|
info._display_color
|
||||||
'--box-bgcolor-light': info._display_color[0],
|
? {
|
||||||
'--box-bgcolor-dark': info._display_color[1],
|
'--box-bgcolor-light': info._display_color[0],
|
||||||
}
|
'--box-bgcolor-dark': info._display_color[1],
|
||||||
: null
|
}
|
||||||
}
|
: null
|
||||||
>
|
}
|
||||||
<div className="box-header">
|
>
|
||||||
{!!do_filter_name && (
|
<div className="box-header">
|
||||||
<span
|
{!!do_filter_name && (
|
||||||
className="reply-header-badge clickable"
|
<span
|
||||||
onClick={() => {
|
className="reply-header-badge clickable"
|
||||||
do_filter_name(info.name);
|
onClick={() => {
|
||||||
}}
|
do_filter_name(info.name);
|
||||||
>
|
}}
|
||||||
<span className="icon icon-locate" />
|
>
|
||||||
</span>
|
<span className="icon icon-locate" />
|
||||||
)}
|
|
||||||
|
|
||||||
{<span className="box-header-name">{info.name}</span>}
|
|
||||||
{info.author_title && (
|
|
||||||
<span className="box-header-name author-title">{`"${info.author_title}"`}</span>
|
|
||||||
)}
|
|
||||||
{info.is_tmp && (
|
|
||||||
<span className="box-header-name tmp-title">临时账号</span>
|
|
||||||
)}
|
|
||||||
{!!do_delete && !!info.can_del && (
|
|
||||||
<span
|
|
||||||
className="clickable"
|
|
||||||
onClick={() => {
|
|
||||||
do_delete('cid', info.cid);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{' '}
|
|
||||||
🗑️{' '}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{!!do_block && (
|
|
||||||
<span className="clickable" onClick={do_block}>
|
|
||||||
{' '}
|
|
||||||
🚫{' '}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{!!do_report && (
|
|
||||||
<>
|
|
||||||
|
|
||||||
<span className="clickable" onClick={do_report}>
|
|
||||||
<span className="icon icon-flag" />
|
|
||||||
</span>
|
</span>
|
||||||
|
)}
|
||||||
</>
|
|
||||||
)}
|
{<span className="box-header-name">{info.name}</span>}
|
||||||
{info.dangerous_user && (
|
{info.author_title && (
|
||||||
<span className="danger-info"> {info.dangerous_user} </span>
|
<span className="box-header-name author-title">{`"${info.author_title}"`}</span>
|
||||||
)}
|
)}
|
||||||
{info.blocked_count && (
|
{info.is_tmp && (
|
||||||
<span className="danger-info"> {info.blocked_count} </span>
|
<span className="box-header-name tmp-title">临时账号</span>
|
||||||
)}
|
)}
|
||||||
<Time stamp={info.timestamp} short={!do_report} />
|
{!!do_delete && !!info.can_del && (
|
||||||
|
<span
|
||||||
{has_block_words && <span className="box-header-badge">已屏蔽</span>}
|
className="clickable"
|
||||||
</div>
|
onClick={() => {
|
||||||
{!has_block_words && (
|
do_delete('cid', info.cid);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{' '}
|
||||||
|
🗑️{' '}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
{!!do_block && (
|
||||||
|
<span className="clickable" onClick={do_block}>
|
||||||
|
{' '}
|
||||||
|
🚫{' '}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
{!!do_report && (
|
||||||
|
<>
|
||||||
|
|
||||||
|
<span className="clickable" onClick={do_report}>
|
||||||
|
<span className="icon icon-flag" />
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{info.dangerous_user && (
|
||||||
|
<span className="danger-info"> {info.dangerous_user} </span>
|
||||||
|
)}
|
||||||
|
{info.blocked_count && (
|
||||||
|
<span className="danger-info"> {info.blocked_count} </span>
|
||||||
|
)}
|
||||||
|
<Time stamp={info.timestamp} short={!do_report} />
|
||||||
|
|
||||||
|
</div>
|
||||||
<div className="box-content">
|
<div className="box-content">
|
||||||
<HighlightedMarkdown
|
<HighlightedMarkdown
|
||||||
author={author}
|
author={author}
|
||||||
@@ -192,8 +190,8 @@ class Reply extends PureComponent {
|
|||||||
search_param={search_param}
|
search_param={search_param}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
</div>
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user