|
|
@ -12,9 +12,6 @@ import {API, PKUHELPER_ROOT} from './flows_api'; |
|
|
|
|
|
|
|
|
|
|
|
const IMAGE_BASE=PKUHELPER_ROOT+'services/pkuhole/images/'; |
|
|
|
const IMAGE_BASE=PKUHELPER_ROOT+'services/pkuhole/images/'; |
|
|
|
const AUDIO_BASE=PKUHELPER_ROOT+'services/pkuhole/audios/'; |
|
|
|
const AUDIO_BASE=PKUHELPER_ROOT+'services/pkuhole/audios/'; |
|
|
|
// troubleshotting performance problem with http2
|
|
|
|
|
|
|
|
//const IMAGE_BASE='http://pkuhelper.pku.edu.cn/services/pkuhole/images/';
|
|
|
|
|
|
|
|
//const AUDIO_BASE='http://pkuhelper.pku.edu.cn/services/pkuhole/audios/';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const SEARCH_PAGESIZE=50; |
|
|
|
const SEARCH_PAGESIZE=50; |
|
|
|
const CLICKABLE_TAGS={a: true, audio: true}; |
|
|
|
const CLICKABLE_TAGS={a: true, audio: true}; |
|
|
@ -85,11 +82,11 @@ class Reply extends PureComponent { |
|
|
|
'--box-bgcolor-dark': this.props.info._display_color[1], |
|
|
|
'--box-bgcolor-dark': this.props.info._display_color[1], |
|
|
|
} : null}> |
|
|
|
} : null}> |
|
|
|
<div className="box-header"> |
|
|
|
<div className="box-header"> |
|
|
|
{this.props.do_filter_name ? |
|
|
|
<code className="box-id">#{this.props.info.cid}</code> |
|
|
|
<span className="clickable box-id" onClick={()=>{this.props.do_filter_name(this.props.info.name);}}> |
|
|
|
{!!this.props.do_filter_name && |
|
|
|
<span className="icon icon-locate" /> <code>#{this.props.info.cid}</code> |
|
|
|
<span className="reply-header-badge clickable" onClick={()=>{this.props.do_filter_name(this.props.info.name);}}> |
|
|
|
</span> : |
|
|
|
<span className="icon icon-locate" /> |
|
|
|
<code className="box-id">#{this.props.info.cid}</code> |
|
|
|
</span> |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{this.props.info.tag!==null && |
|
|
|
{this.props.info.tag!==null && |
|
|
@ -338,6 +335,13 @@ class FlowSidebar extends PureComponent { |
|
|
|
// key for lazyload elem
|
|
|
|
// key for lazyload elem
|
|
|
|
let view_mode_key=(this.state.rev ? 'y-' : 'n-')+(this.state.filter_name||'null'); |
|
|
|
let view_mode_key=(this.state.rev ? 'y-' : 'n-')+(this.state.filter_name||'null'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let replies_cnt={}; |
|
|
|
|
|
|
|
replies_to_show.forEach((r)=>{ |
|
|
|
|
|
|
|
if(replies_cnt[r.name]===undefined) |
|
|
|
|
|
|
|
replies_cnt[r.name]=0; |
|
|
|
|
|
|
|
replies_cnt[r.name]++; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="flow-item-row sidebar-flow-item"> |
|
|
|
<div className="flow-item-row sidebar-flow-item"> |
|
|
|
<div className="box box-tip"> |
|
|
|
<div className="box box-tip"> |
|
|
@ -402,7 +406,7 @@ class FlowSidebar extends PureComponent { |
|
|
|
<Reply |
|
|
|
<Reply |
|
|
|
info={reply} color_picker={this.color_picker} show_pid={show_pid} |
|
|
|
info={reply} color_picker={this.color_picker} show_pid={show_pid} |
|
|
|
set_variant={(variant)=>{this.set_variant(reply.cid,variant);}} |
|
|
|
set_variant={(variant)=>{this.set_variant(reply.cid,variant);}} |
|
|
|
do_filter_name={this.set_filter_name.bind(this)} |
|
|
|
do_filter_name={replies_cnt[reply.name]>1 ? this.set_filter_name.bind(this) : null} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</ClickHandler> |
|
|
|
</ClickHandler> |
|
|
|
</LazyLoad> |
|
|
|
</LazyLoad> |
|
|
|