forked from newthuhole/hole_thu_frontend
可使用T大树洞登陆
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
"react-dom": "^16.13.0",
|
||||
"react-scripts": "^3.4.1",
|
||||
"react-timeago": "^4.4.0",
|
||||
"typescript": "^4.0.2"
|
||||
"typescript": "^4.0.2",
|
||||
"workbox-sw": "^5.1.3"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
|
||||
@@ -175,8 +175,6 @@ export class LoginForm extends Component {
|
||||
举报记录、管理日志等都是公开的
|
||||
</p>
|
||||
<p>
|
||||
<small>{token.value}</small>
|
||||
<br/>
|
||||
<a onClick={this.copy_token.bind(this, token.value)}>
|
||||
复制 User Token
|
||||
</a>
|
||||
|
||||
@@ -223,9 +223,18 @@ a.app-switcher-item, .app-switcher-item a {
|
||||
color: #00c;
|
||||
}
|
||||
.thuhole-login-popup p {
|
||||
margin: .75em 0;
|
||||
margin: 1.25em 0;
|
||||
text-align: center;
|
||||
}
|
||||
.thuhole-login-popup-info p {
|
||||
margin: .25em 1em;
|
||||
text-align: left;
|
||||
}
|
||||
.thuhole-login-popup-info ul {
|
||||
margin: .75em 1em;
|
||||
text-align: left;
|
||||
font-size: 75%;
|
||||
}
|
||||
/* override ant design */
|
||||
.thuhole-login-popup input, .thuhole-login-popup button {
|
||||
font-size: .85em;
|
||||
|
||||
@@ -55,8 +55,16 @@ class LoginPopupSelf extends Component {
|
||||
this.state={
|
||||
loading_status: 'idle',
|
||||
}
|
||||
|
||||
this.input_token_ref=React.createRef();
|
||||
};
|
||||
|
||||
setThuhole(tar, ref) {
|
||||
console.log(tar);
|
||||
tar.href = '/_login?p=thuhole&token=' + ref.current.value;
|
||||
console.log(tar);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
return (
|
||||
@@ -73,11 +81,14 @@ class LoginPopupSelf extends Component {
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" disabled
|
||||
<input ref={this.input_token_ref} placeholder="T大树洞Token" />
|
||||
<br/>
|
||||
<a href="/_login?p=thuhole" target="_blank"
|
||||
onClick={(e) =>{this.setThuhole(e.target, this.input_token_ref)}}
|
||||
>
|
||||
<span className="icon icon-login" />
|
||||
T大树洞
|
||||
</button>
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" disabled
|
||||
@@ -99,6 +110,15 @@ class LoginPopupSelf extends Component {
|
||||
取消
|
||||
</button>
|
||||
</p>
|
||||
<hr/ >
|
||||
<div className="thuhole-login-popup-info">
|
||||
<p>提醒:
|
||||
</p>
|
||||
<ul>
|
||||
<li> 无论采用哪种方式注册,你后台记录的用户名都是本质实名的,因为闭社/T大树洞的管理员可以根据你的闭社id/树洞评论区代号查到邮箱。但是这不影响新T树洞的安全性。新T树洞的匿名性来自隔离用户名与发布的内容,而非试图隔离用户名与真实身份。</li>
|
||||
<li> 由于T大树洞仍未提供授权接口,使用T大树洞方式登陆需要用你的token在特定洞发布一段随机内容以确定身份。这是否违反用户条例由T大树洞管理员决定,需自行承担相关风险。完成登陆后建议立即重置T大树洞token。 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -10944,6 +10944,11 @@ workbox-sw@^4.3.1:
|
||||
resolved "https://registry.npm.taobao.org/workbox-sw/download/workbox-sw-4.3.1.tgz#df69e395c479ef4d14499372bcd84c0f5e246164"
|
||||
integrity sha1-32njlcR5700USZNyvNhMD14kYWQ=
|
||||
|
||||
workbox-sw@^5.1.3:
|
||||
version "5.1.3"
|
||||
resolved "https://registry.npm.taobao.org/workbox-sw/download/workbox-sw-5.1.3.tgz#7bffbf034f2f5b58e1734b5b86d240019a5332bb"
|
||||
integrity sha1-e/+/A08vW1jhc0tbhtJAAZpTMrs=
|
||||
|
||||
workbox-webpack-plugin@4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.npm.taobao.org/workbox-webpack-plugin/download/workbox-webpack-plugin-4.3.1.tgz#47ff5ea1cc074b6c40fb5a86108863a24120d4bd"
|
||||
|
||||
Reference in New Issue
Block a user