mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
feat: use Input.OTP to input totp code (#3922)
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
import {CopyOutlined, UserOutlined} from "@ant-design/icons";
|
import {CopyOutlined} from "@ant-design/icons";
|
||||||
import {Button, Col, Form, Input, QRCode, Space} from "antd";
|
import {Button, Col, Form, Input, QRCode, Space} from "antd";
|
||||||
import copy from "copy-to-clipboard";
|
import copy from "copy-to-clipboard";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
@ -47,11 +47,11 @@ export const MfaVerifyTotpForm = ({mfaProps, onFinish}) => {
|
|||||||
name="passcode"
|
name="passcode"
|
||||||
rules={[{required: true, message: "Please input your passcode"}]}
|
rules={[{required: true, message: "Please input your passcode"}]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input.OTP
|
||||||
style={{marginTop: 24}}
|
style={{marginTop: 24}}
|
||||||
prefix={<UserOutlined />}
|
onChange={() => {
|
||||||
placeholder={i18next.t("mfa:Passcode")}
|
form.submit();
|
||||||
autoComplete="off"
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
|
Reference in New Issue
Block a user