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`
.ant-input-suffix {
display: flex;
flex-direction: row-reverse;
.reset-link {
padding: 0;
font-size: 12px;
color: ${token.colorTextSecondary};
}
.ant-divider {
margin-left: 2px;
}
.reset-link:hover {
color: var(--ant-color-link-hover);
}
passwordWrapper: css`
position: relative;
.forgot-password {
position: absolute;
right: 0;
top: 74px;
}
`
};
@@ -133,6 +124,7 @@ const LocalUserForm: React.FC<LocalUserFormProps> = (props) => {
})}
/>
</Form.Item>
<div className={`${styles.passwordWrapper} password-wrapper`}>
<Form.Item
style={{
marginBottom: 20
@@ -145,16 +137,6 @@ const LocalUserForm: React.FC<LocalUserFormProps> = (props) => {
style={{ width: '100%' }}
>
<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>
}
rules={[
@@ -170,7 +152,6 @@ const LocalUserForm: React.FC<LocalUserFormProps> = (props) => {
]}
>
<Input.Password
className={styles.password}
autoComplete="current-password"
prefix={<LockOutlined />}
style={{ height: 44 }}
@@ -179,13 +160,24 @@ const LocalUserForm: React.FC<LocalUserFormProps> = (props) => {
})}
/>
</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
htmlType="submit"
type="primary"
block
loading={props.loading}
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' })}
</Button>