Browse Source

update config

dev
thuhole 5 years ago
parent
commit
a9e1bb15ac
  1. 5
      src/Config.js
  2. 2
      src/Flows.js

5
src/Config.js

@ -18,6 +18,7 @@ const DEFAULT_CONFIG={
pressure: false,
easter_egg: true,
color_scheme: 'default',
fold: true
};
export function load_config() {
@ -238,6 +239,10 @@ export class ConfigUI extends PureComponent {
description="在某些情况下显示彩蛋"
/>
<hr />
<ConfigSwitch callback={this.save_changes_bound} id="fold" name="折叠树洞"
description="不在timeline中直接展示被用户或管理员标记为['性相关', '政治相关', '性话题', '政治话题', '折叠', 'NSFW', '刷屏', '真实性可疑', '用户举报较多', '重复内容']的树洞"
/>
<hr />
<p>
新功能建议或问题反馈请在&nbsp;
<a href="https://github.com/thuhole/thuhole-go-backend/issues" target="_blank">GitHub <span className="icon icon-github" /></a>

2
src/Flows.js

@ -526,7 +526,7 @@ class FlowItemRow extends PureComponent {
break;
}
}
let needFold = (FOLD_TAGS.indexOf(this.state.info.tag) > -1) && (this.props.search_param === '热榜' || !this.props.search_param)
let needFold = (FOLD_TAGS.indexOf(this.state.info.tag) > -1) && (this.props.search_param === '热榜' || !this.props.search_param) && window.config.fold
let res=(
<div className={'flow-item-row flow-item-row-with-prompt'+(this.props.is_quote ? ' flow-item-row-quote' : '')} onClick={(event)=>{

Loading…
Cancel
Save