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;