From ad33f96a17f15d2dbaa37425e960094acaa8e353 Mon Sep 17 00:00:00 2001
From: hole-thu
Date: Wed, 9 Sep 2020 16:14:21 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E4=BD=BF=E7=94=A8T=E5=A4=A7=E6=A0=91?=
=?UTF-8?q?=E6=B4=9E=E7=99=BB=E9=99=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 3 ++-
src/UserAction.js | 2 --
src/infrastructure/widgets.css | 11 +++++++++-
src/infrastructure/widgets.js | 40 +++++++++++++++++++++++++---------
yarn.lock | 5 +++++
5 files changed, 47 insertions(+), 14 deletions(-)
diff --git a/package.json b/package.json
index e5bb59b..99baa98 100644
--- a/package.json
+++ b/package.json
@@ -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",
diff --git a/src/UserAction.js b/src/UserAction.js
index 75b54dc..01a2304 100644
--- a/src/UserAction.js
+++ b/src/UserAction.js
@@ -175,8 +175,6 @@ export class LoginForm extends Component {
举报记录、管理日志等都是公开的
- {token.value}
-
复制 User Token
diff --git a/src/infrastructure/widgets.css b/src/infrastructure/widgets.css
index 4808015..4edfcc2 100644
--- a/src/infrastructure/widgets.css
+++ b/src/infrastructure/widgets.css
@@ -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;
diff --git a/src/infrastructure/widgets.js b/src/infrastructure/widgets.js
index 0cc1960..ec93977 100644
--- a/src/infrastructure/widgets.js
+++ b/src/infrastructure/widgets.js
@@ -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 {
通过第三方验证登陆T大树洞
-
+
闭社
-
-
-
-
-
+
+
+
-
-
+
+
+
+
+
提醒:
+
+
+ - 无论采用哪种方式注册,你后台记录的用户名都是本质实名的,因为闭社/T大树洞的管理员可以根据你的闭社id/树洞评论区代号查到邮箱。但是这不影响新T树洞的安全性。新T树洞的匿名性来自隔离用户名与发布的内容,而非试图隔离用户名与真实身份。
+ - 由于T大树洞仍未提供授权接口,使用T大树洞方式登陆需要用你的token在特定洞发布一段随机内容以确定身份。这是否违反用户条例由T大树洞管理员决定,需自行承担相关风险。完成登陆后建议立即重置T大树洞token。
+
+
);
diff --git a/yarn.lock b/yarn.lock
index db75135..1e1cd0b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -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"