Update LoginForm.js
This commit is contained in:
parent
e56c4abd3a
commit
b02e06ea3d
@ -31,7 +31,7 @@ const LoginForm = () => {
|
||||
|
||||
useEffect(() => {
|
||||
if (searchParams.get("expired")) {
|
||||
showError('未登录或登录已过期,请重新登录!');
|
||||
showError('Not logged in or session has expired, please log in again!');
|
||||
}
|
||||
let status = localStorage.getItem('status');
|
||||
if (status) {
|
||||
@ -61,7 +61,7 @@ const LoginForm = () => {
|
||||
userDispatch({ type: 'login', payload: data });
|
||||
localStorage.setItem('user', JSON.stringify(data));
|
||||
navigate('/');
|
||||
showSuccess('登录成功!');
|
||||
showSuccess('Login successful!');
|
||||
setShowWeChatLoginModal(false);
|
||||
} else {
|
||||
showError(message);
|
||||
@ -85,7 +85,7 @@ const LoginForm = () => {
|
||||
userDispatch({ type: 'login', payload: data });
|
||||
localStorage.setItem('user', JSON.stringify(data));
|
||||
navigate('/');
|
||||
showSuccess('登录成功!');
|
||||
showSuccess('Login successful!');
|
||||
} else {
|
||||
showError(message);
|
||||
}
|
||||
@ -104,7 +104,7 @@ const LoginForm = () => {
|
||||
fluid
|
||||
icon="user"
|
||||
iconPosition="left"
|
||||
placeholder="用户名"
|
||||
placeholder="Username"
|
||||
name="username"
|
||||
value={username}
|
||||
onChange={handleChange}
|
||||
@ -113,25 +113,25 @@ const LoginForm = () => {
|
||||
fluid
|
||||
icon="lock"
|
||||
iconPosition="left"
|
||||
placeholder="密码"
|
||||
placeholder="Password"
|
||||
name="password"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<Button color="" fluid size="large" onClick={handleSubmit}>
|
||||
登录
|
||||
Login
|
||||
</Button>
|
||||
</Segment>
|
||||
</Form>
|
||||
<Message>
|
||||
忘记密码?
|
||||
Forgot Password
|
||||
<Link to="/reset" className="btn btn-link">
|
||||
点击重置
|
||||
Reset Password
|
||||
</Link>
|
||||
; 没有账户?
|
||||
; No account ?
|
||||
<Link to="/register" className="btn btn-link">
|
||||
点击注册
|
||||
Click to Register
|
||||
</Link>
|
||||
</Message>
|
||||
{status.github_oauth || status.wechat_login ? (
|
||||
@ -172,13 +172,13 @@ const LoginForm = () => {
|
||||
<Image src={status.wechat_qrcode} fluid />
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<p>
|
||||
微信扫码关注公众号,输入「验证码」获取验证码(三分钟内有效)
|
||||
Scan the QR code to follow our official WeChat account and enter the "verification code" to obtain a verification code (valid for three minutes).
|
||||
</p>
|
||||
</div>
|
||||
<Form size="large">
|
||||
<Form.Input
|
||||
fluid
|
||||
placeholder="验证码"
|
||||
placeholder="Verification code"
|
||||
name="wechat_verification_code"
|
||||
value={inputs.wechat_verification_code}
|
||||
onChange={handleChange}
|
||||
@ -189,7 +189,7 @@ const LoginForm = () => {
|
||||
size="large"
|
||||
onClick={onSubmitWeChatVerificationCode}
|
||||
>
|
||||
登录
|
||||
Login
|
||||
</Button>
|
||||
</Form>
|
||||
</Modal.Description>
|
||||
|
Loading…
Reference in New Issue
Block a user