update config

This commit is contained in:
thuhole
2020-07-01 16:55:19 +08:00
parent 48d375be76
commit a9e1bb15ac
2 changed files with 6 additions and 1 deletions

View File

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

View File

@@ -526,7 +526,7 @@ class FlowItemRow extends PureComponent {
break; 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=( let res=(
<div className={'flow-item-row flow-item-row-with-prompt'+(this.props.is_quote ? ' flow-item-row-quote' : '')} onClick={(event)=>{ <div className={'flow-item-row flow-item-row-with-prompt'+(this.props.is_quote ? ' flow-item-row-quote' : '')} onClick={(event)=>{