diff --git a/src/App.js b/src/App.js index 3469467..6f7c880 100644 --- a/src/App.js +++ b/src/App.js @@ -20,6 +20,7 @@ class App extends Component { super(props); load_config(); load_attentions(); + window.AS_BACKUP = localStorage['DEFAULT_ALLOW_SEARCH'] ? true : false; listen_darkmode( { default: undefined, light: false, dark: true }[ window.config.color_scheme diff --git a/src/Flows.js b/src/Flows.js index d0aab43..9249305 100644 --- a/src/Flows.js +++ b/src/Flows.js @@ -572,7 +572,8 @@ class FlowSidebar extends PureComponent { }); } - report(text = '') { + report(event, text = '') { + console.log(text); let reason = prompt(`举报 #${this.state.info.pid} 的理由:`, text); if (reason !== null) { API.report(this.state.info.pid, reason, this.props.token) @@ -842,7 +843,7 @@ class FlowSidebar extends PureComponent { do_block={() => {this.block( reply.name, 'comment', reply.cid, this.load_replies.bind(this) )}} - do_report={() => {this.report(`评论区${reply.name},评论id ${reply.cid}`)}} + do_report={(e) => {this.report(e, `评论区${reply.name},评论id ${reply.cid}`)}} /> @@ -1257,8 +1258,11 @@ export class Flow extends PureComponent { constructor(props) { super(props); this.state = { - submode: this.props.mode == 'list' ? (window.config.by_c ? 1 : 0) : 0, - subflow_render_key: +new Date(), + submode: this.props.mode == 'list' ? ( + window.LIST_SUBMOD_BACKUP !== undefined ? window.LIST_SUBMOD_BACKUP : ( + (window.config.by_c ? 1 : 0) + ) + ) : 0, } } @@ -1273,9 +1277,10 @@ export class Flow extends PureComponent { } set_submode(submode) { + if (this.props.mode == 'list') + window.LIST_SUBMOD_BACKUP = submode; this.setState({ submode: submode, - subflow_render_key: +new Date(), }); } @@ -1297,10 +1302,10 @@ export class Flow extends PureComponent { diff --git a/src/Title.js b/src/Title.js index bba77b1..90f4865 100644 --- a/src/Title.js +++ b/src/Title.js @@ -121,7 +121,7 @@ class ControlBar extends PureComponent { onClick={this.do_refresh_bound} > - 最新 + 刷新 {!!token && (