diff --git a/src/Message.js b/src/Message.js index a869a46..0de7b29 100644 --- a/src/Message.js +++ b/src/Message.js @@ -1,5 +1,6 @@ import React, { PureComponent } from 'react'; import { Time } from './Common'; +import { get_json } from './infrastructure/functions'; export class MessageViewer extends PureComponent { constructor(props) { @@ -22,17 +23,17 @@ export class MessageViewer extends PureComponent { }, () => { fetch( - '/_api/v1/system_msg?user_token=' + + '/_api/v1/systemlog?user_token=' + encodeURIComponent(this.props.token) ) .then(get_json) .then((json) => { - if (json.error) throw new Error(json.error); - else - this.setState({ - loading_status: 'done', - msg: json.result, - }); + this.setState({ + loading_status: 'done', + msg: json.data, + start_time: json.start_time, + salt: json.salt + }); }) .catch((err) => { console.error(err); @@ -61,17 +62,32 @@ export class MessageViewer extends PureComponent { ); else if (this.state.loading_status === 'done') - return this.state.msg.map((msg) => ( -
-
-
-
-
{msg.content}
-
-
- )); + return ( + <> +
+

+ 最近一次重置

+

+ 随机盐 {this.state.salt} +

+ {this.state.msg.map((msg) => ( +
+
+
+
+
{msg.detail}
+
+
+ ))} + + ) else return null; } } diff --git a/src/UserAction.js b/src/UserAction.js index fdcbb75..cf79c05 100644 --- a/src/UserAction.js +++ b/src/UserAction.js @@ -160,15 +160,15 @@ export class LoginForm extends Component { { this.props.show_sidebar( - '系统消息', + '系统日志', , ); }} > - 查看系统消息 + 查看系统日志
- 当您发送的内容违规时,我们将用系统消息提示您 + 举报记录、管理日志等都是公开的

{token.value} @@ -177,7 +177,7 @@ export class LoginForm extends Component { 复制 User Token
- User Token仅用于开发bot,切勿告知他人。若怀疑被盗号请刷新Token。 + User Token仅用于开发bot,切勿告知他人。若怀疑被盗号请刷新Token(刷新功能即将上线)。

) : (