feat: 参考原型图 ui优化提交 个人端-用户中心 相关的页面

This commit is contained in:
zhanjunhao
2026-11-04 19:59:06 +08:00
parent f1aa0399aa
commit 78fe73d0db
576 changed files with 18075 additions and 18912 deletions
+27 -37
View File
@@ -48,16 +48,16 @@ import {
isPasskeySupported,
} from '../../helpers';
import Turnstile from 'react-turnstile';
import { Button, Checkbox, Form, Icon, Modal } from '@douyinfe/semi-ui';
import { Button, Checkbox, Form, Icon, Modal } from '@/components/ui';
import Text from '@douyinfe/semi-ui/lib/es/typography/text';
import { Text } from '@/components/ui';
import {
IconGithubLogo,
IconMail,
IconLock,
IconKey,
} from '@douyinfe/semi-icons';
} from '@/components/ui/icons';
import OIDCIcon from '../common/logo/OIDCIcon';
import WeChatIcon from '../common/logo/WeChatIcon';
import LinuxDoIcon from '../common/logo/LinuxDoIcon';
@@ -846,15 +846,13 @@ const LoginForm = () => {
</div>
)}
<style>{`
.login-compact-form .semi-form-field { margin-bottom: 0; }
.login-compact-form .semi-form-field-username { padding-bottom: 4px; }
.login-compact-form .semi-form-field-password { padding-top: 4px; }
`}</style>
<Form className='login-compact-form auth-glass-form'>
{/* 用户名输入框 —— 玻璃观感统一由 .auth-glass-form(GlassCard 内置样式)驱动 */}
<Form className='auth-login-form' onSubmit={handleSubmit}>
<Form.Input
field='username'
className='auth-login-required-field'
rules={[{ required: true, message: t('请输入用户名或邮箱') }]}
required
aria-required='true'
label={
<span className='text-xs font-medium text-gray-600 dark:text-gray-300'>
{t('用户名/邮箱')}
@@ -862,7 +860,7 @@ const LoginForm = () => {
}
placeholder={t('请输入用户名或邮箱')}
name='username'
size='large'
size='default'
autoComplete='username'
onChange={(value) => handleChange('username', value)}
prefix={<IconMail size='small' />}
@@ -871,6 +869,10 @@ const LoginForm = () => {
{/* 密码输入框 */}
<Form.Input
field='password'
className='auth-login-required-field'
rules={[{ required: true, message: t('请输入密码') }]}
required
aria-required='true'
label={
<span className='text-xs font-medium text-gray-600 dark:text-gray-300'>
{t('密码')}
@@ -879,7 +881,7 @@ const LoginForm = () => {
placeholder={t('请输入密码')}
name='password'
mode='password'
size='large'
size='default'
autoComplete='current-password'
onChange={(value) => handleChange('password', value)}
prefix={<IconLock size='small' />}
@@ -921,40 +923,28 @@ const LoginForm = () => {
</div>
)}
<div className='space-y-1.5 pt-3'>
<div className='auth-login-actions'>
{/* 登录按钮 */}
<button
type='submit'
onClick={handleSubmit}
<Button
theme='solid'
htmlType='submit'
loading={loginLoading}
block
disabled={
loginLoading ||
((hasUserAgreement || hasPrivacyPolicy) && !agreedToTerms)
}
className='group relative w-full h-10 flex items-center justify-center gap-2 bg-gradient-to-r from-brand-from to-brand-to hover:from-brand-from hover:to-brand-to disabled:from-gray-400 disabled:to-gray-500 text-white rounded-xl shadow-md shadow-brand/25 dark:shadow-brand/15 hover:shadow-lg hover:shadow-brand/30 hover:-translate-y-0.5 active:translate-y-0 transition-all duration-200 disabled:cursor-not-allowed disabled:hover:translate-y-0 overflow-hidden'
className='auth-login-submit'
>
{/* 闪光效果 */}
<div className='absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-500' />
{loginLoading ? (
<div className='w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin' />
) : (
<>
<span className='relative z-10 font-semibold'>
{t('登 录')}
</span>
<ArrowRight
size={16}
className='relative z-10 group-hover:translate-x-1 transition-transform'
/>
</>
)}
</button>
<span className='font-semibold'>{t('登 录')}</span>
<ArrowRight size={16} />
</Button>
<Button
theme='borderless'
type='tertiary'
size='small'
className='w-full !text-gray-500 hover:!text-brand-deep dark:!text-gray-500 dark:hover:!text-brand-from !text-xs'
className='auth-login-forgot'
onClick={handleResetPasswordClick}
>
{t('忘记密码?')}
@@ -991,7 +981,7 @@ const LoginForm = () => {
)}
{!status.self_use_mode_enabled && (
<div className='mt-3 text-center'>
<div className='auth-login-register text-center'>
<Text className='text-gray-500 dark:text-gray-400 text-xs'>
{t('没有账户?')}{' '}
<Link
@@ -1234,7 +1224,7 @@ const LoginForm = () => {
return (
<div
className='relative overflow-hidden flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'
className='auth-login-page relative overflow-hidden flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'
// 抵扣 PageLayout 跑马灯占位高度,保证占位+容器恰为一屏,避免幽灵滚动
style={{ minHeight: 'calc(100vh - var(--content-top-offset, 0px))' }}
>