fix(style): forgot password layout

This commit is contained in:
jialin
2026-06-16 14:17:43 +08:00
committed by jialin
parent 547b9f617b
commit 47cb3321ab
+19 -27
View File
@@ -29,21 +29,12 @@ const useStyles = createStyles(({ token, css }) => {
} }
} }
`, `,
password: css` passwordWrapper: css`
.ant-input-suffix { position: relative;
display: flex; .forgot-password {
flex-direction: row-reverse; position: absolute;
.reset-link { right: 0;
padding: 0; top: 74px;
font-size: 12px;
color: ${token.colorTextSecondary};
}
.ant-divider {
margin-left: 2px;
}
.reset-link:hover {
color: var(--ant-color-link-hover);
}
} }
` `
}; };
@@ -133,6 +124,7 @@ const LocalUserForm: React.FC<LocalUserFormProps> = (props) => {
})} })}
/> />
</Form.Item> </Form.Item>
<div className={`${styles.passwordWrapper} password-wrapper`}>
<Form.Item <Form.Item
style={{ style={{
marginBottom: 20 marginBottom: 20
@@ -145,16 +137,6 @@ const LocalUserForm: React.FC<LocalUserFormProps> = (props) => {
style={{ width: '100%' }} style={{ width: '100%' }}
> >
<span>{intl.formatMessage({ id: 'common.form.password' })}</span> <span>{intl.formatMessage({ id: 'common.form.password' })}</span>
<Button
type="link"
size="small"
className="reset-link"
style={{ fontSize: 12, padding: 0 }}
href={externalLinks.resetPassword}
target="_blank"
>
{intl.formatMessage({ id: 'common.button.forgotpassword' })}
</Button>
</Flex> </Flex>
} }
rules={[ rules={[
@@ -170,7 +152,6 @@ const LocalUserForm: React.FC<LocalUserFormProps> = (props) => {
]} ]}
> >
<Input.Password <Input.Password
className={styles.password}
autoComplete="current-password" autoComplete="current-password"
prefix={<LockOutlined />} prefix={<LockOutlined />}
style={{ height: 44 }} style={{ height: 44 }}
@@ -179,13 +160,24 @@ const LocalUserForm: React.FC<LocalUserFormProps> = (props) => {
})} })}
/> />
</Form.Item> </Form.Item>
<Button
type="link"
size="small"
className="forgot-password"
style={{ fontSize: 12, padding: 0 }}
href={externalLinks.resetPassword}
target="_blank"
>
{intl.formatMessage({ id: 'common.button.forgotpassword' })}
</Button>
</div>
<Button <Button
htmlType="submit" htmlType="submit"
type="primary" type="primary"
block block
loading={props.loading} loading={props.loading}
icon={<IconFont type="icon-login" />} icon={<IconFont type="icon-login" />}
style={{ height: '44px', fontSize: '14px', marginTop: 8 }} style={{ height: '44px', fontSize: '14px', marginTop: 20 }}
> >
{intl.formatMessage({ id: 'common.button.login' })} {intl.formatMessage({ id: 'common.button.login' })}
</Button> </Button>