From 6e7b86416ba938e7f46f99e8a0ed3081f322da06 Mon Sep 17 00:00:00 2001 From: hole-thu Date: Wed, 22 Dec 2021 23:03:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=81=E4=B9=85=E5=8C=96=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=85=81=E8=AE=B8=E6=90=9C=E7=B4=A2=20?= =?UTF-8?q?=E7=AD=89=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 1 + src/Flows.js | 19 ++++++++++++------- src/Title.js | 2 +- src/UserAction.js | 1 + src/fonts_7/icomoon.css | 7 ------- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/App.js b/src/App.js index 34694673..6f7c8801 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 d0aab43e..9249305e 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 bba77b15..90f48656 100644 --- a/src/Title.js +++ b/src/Title.js @@ -121,7 +121,7 @@ class ControlBar extends PureComponent { onClick={this.do_refresh_bound} > - 最新 + 刷新 {!!token && (