可使用T大树洞登陆

This commit is contained in:
2020-09-09 16:14:21 +08:00
parent 8ee3bca212
commit ad33f96a17
5 changed files with 47 additions and 14 deletions

View File

@@ -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>

View File

@@ -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;

View File

@@ -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 (
@@ -66,27 +74,30 @@ class LoginPopupSelf extends Component {
<p>
<b>通过第三方验证登陆T大树洞</b>
</p>
<p>
<p>
<a href="/_login?p=cs" target="_blank">
<span className="icon icon-login" />
&nbsp;闭社
</a>
</p>
<p>
<button type="button" disabled
</p>
<p>
<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" />
&nbsp;T大树洞
</button>
</p>
<p>
</a>
</p>
<p>
<button type="button" disabled
>
<span className="icon icon-login" />
&nbsp;未名bbs
</button>
</p>
<p>
</p>
<p>
<button type="button" disabled
>
<span className="icon icon-login" />
@@ -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>
);