From 9de2d21e1a13111276873ccf132f84eb9d275e09 Mon Sep 17 00:00:00 2001 From: "1808837298@qq.com" <1808837298@qq.com> Date: Wed, 6 Mar 2024 16:53:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=81=A2=E5=A4=8D=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=85=AC=E4=BC=97=E5=8F=B7=E6=89=AB=E7=A0=81=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=20(close=20#7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/LoginForm.js | 85 +++++++++++++++----------------- web/src/components/WeChatIcon.js | 24 +++++++++ 2 files changed, 64 insertions(+), 45 deletions(-) create mode 100644 web/src/components/WeChatIcon.js diff --git a/web/src/components/LoginForm.js b/web/src/components/LoginForm.js index eb94784..c8f0536 100644 --- a/web/src/components/LoginForm.js +++ b/web/src/components/LoginForm.js @@ -4,12 +4,13 @@ import { UserContext } from '../context/User'; import { API, getLogo, isMobile, showError, showInfo, showSuccess, showWarning } from '../helpers'; import { onGitHubOAuthClicked } from './utils'; import Turnstile from "react-turnstile"; -import { Layout, Card, Image, Form, Button, Divider, Modal } from "@douyinfe/semi-ui"; +import { Layout, Card, Image, Form, Button, Divider, Modal, Icon } from '@douyinfe/semi-ui'; import Title from "@douyinfe/semi-ui/lib/es/typography/title"; import Text from "@douyinfe/semi-ui/lib/es/typography/text"; import TelegramLoginButton from 'react-telegram-login'; import { IconGithubLogo } from '@douyinfe/semi-icons'; +import WeChatIcon from './WeChatIcon'; const LoginForm = () => { const [inputs, setInputs] = useState({ @@ -179,16 +180,16 @@ const LoginForm = () => { ) : ( <> )} - {/*{status.wechat_login ? (*/} - {/* */} - {/*) : (*/} - {/* <>*/} - {/*)}*/} + {status.wechat_login ? ( + */} - {/* */} - {/* */} - {/* */} - {/**/} + setShowWeChatLoginModal(false)} + okText={'登录'} + size={'small'} + centered={true} + > +
+ +
+
+

+ 微信扫码关注公众号,输入「验证码」获取验证码(三分钟内有效) +

+
+
+ handleChange('wechat_verification_code', value)} + /> + +
{turnstileEnabled ? (
diff --git a/web/src/components/WeChatIcon.js b/web/src/components/WeChatIcon.js new file mode 100644 index 0000000..8d7f6dd --- /dev/null +++ b/web/src/components/WeChatIcon.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { Icon } from '@douyinfe/semi-ui'; + +const WeChatIcon = () => { + function CustomIcon() { + return + + + ; + } + + return ( +
+ } /> +
+ ); +}; + +export default WeChatIcon;