fix(ui): 统一认证页输入框 36px 与视觉样式
This commit is contained in:
@@ -42,12 +42,12 @@ const AuthCardHeader = ({
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div
|
||||
className={`flex flex-col items-center justify-center ${wrapperClassName}`}
|
||||
className={`auth-card-header flex flex-col items-center justify-center ${wrapperClassName}`}
|
||||
>
|
||||
<div className={`relative ${logoWrapperClassName}`}>
|
||||
{/* Logo 光环 */}
|
||||
<div className='absolute -inset-1.5 bg-gradient-to-r from-brand-from/30 to-brand-to/30 rounded-xl blur-md opacity-60' />
|
||||
<div className='relative p-2 bg-white dark:bg-neutral-800 rounded-xl shadow-md'>
|
||||
<div className={`auth-card-logo relative ${logoWrapperClassName}`}>
|
||||
{/* Logo 光环(.auth-login-page 认证页内隐藏,保持克制) */}
|
||||
<div className='auth-card-logo-halo absolute -inset-1.5 bg-gradient-to-r from-brand-from/30 to-brand-to/30 rounded-xl blur-md opacity-60' />
|
||||
<div className='auth-card-logo-box relative p-2 bg-white dark:bg-neutral-800 rounded-xl shadow-md'>
|
||||
{logoNode || (
|
||||
<img
|
||||
src={logo}
|
||||
@@ -58,10 +58,10 @@ const AuthCardHeader = ({
|
||||
</div>
|
||||
<Sparkles
|
||||
size={14}
|
||||
className='absolute -top-0.5 -right-0.5 text-amber-400 motion-safe:animate-pulse'
|
||||
className='auth-card-sparkle absolute -top-0.5 -right-0.5 text-amber-400 motion-safe:animate-pulse'
|
||||
/>
|
||||
</div>
|
||||
<h4 className='text-xl font-bold text-gray-800 dark:text-white tracking-tight mb-0.5'>
|
||||
<h4 className='auth-card-title text-xl font-bold text-gray-800 dark:text-white tracking-tight mb-0.5'>
|
||||
{title}
|
||||
</h4>
|
||||
<p className='auth-card-subtitle text-gray-500 dark:text-gray-400 text-xs'>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
Copyright (C) 2025 QuantumNous
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
/**
|
||||
* 认证页统一的「— 文案 —」分隔线(如「或」「还没有企业?」)。
|
||||
* 两侧细线 + 居中弱化文字,不依赖底色遮挡,玻璃卡片与深色模式下都干净。
|
||||
* 样式见 src/styles/prototype.css 的 .auth-divider。
|
||||
*/
|
||||
const AuthDivider = ({ children, className = '' }) => (
|
||||
<div className={`auth-divider ${className}`} role='separator'>
|
||||
<span className='auth-divider-line' aria-hidden='true' />
|
||||
<span className='auth-divider-text'>{children}</span>
|
||||
<span className='auth-divider-line' aria-hidden='true' />
|
||||
</div>
|
||||
);
|
||||
|
||||
export default AuthDivider;
|
||||
@@ -201,14 +201,14 @@ const GlassCard = ({
|
||||
return (
|
||||
<div className={`w-full max-w-sm relative login-card-float ${className}`}>
|
||||
<GlassCardStyles />
|
||||
{/* 外环柔光晕 */}
|
||||
<div className='absolute -inset-6 bg-gradient-to-br from-brand-from/15 via-brand-via/10 to-brand-to/15 rounded-[2rem] blur-2xl opacity-80 pointer-events-none' />
|
||||
{/* 外环柔光晕(.auth-login-page 认证页内隐藏) */}
|
||||
<div className='login-card-glow absolute -inset-6 bg-gradient-to-br from-brand-from/15 via-brand-via/10 to-brand-to/15 rounded-[2rem] blur-2xl opacity-80 pointer-events-none' />
|
||||
|
||||
{/* 左上 / 右下脉动光晕 */}
|
||||
{withCornerHalos && (
|
||||
<>
|
||||
<div className='absolute -top-20 -left-20 w-44 h-44 bg-brand-from/25 dark:bg-brand-from/20 rounded-full blur-3xl pointer-events-none login-halo-pulse' />
|
||||
<div className='absolute -bottom-20 -right-20 w-44 h-44 bg-brand-to/25 dark:bg-brand-to/15 rounded-full blur-3xl pointer-events-none login-halo-pulse-delayed' />
|
||||
<div className='login-card-halo absolute -top-20 -left-20 w-44 h-44 bg-brand-from/25 dark:bg-brand-from/20 rounded-full blur-3xl pointer-events-none login-halo-pulse' />
|
||||
<div className='login-card-halo absolute -bottom-20 -right-20 w-44 h-44 bg-brand-to/25 dark:bg-brand-to/15 rounded-full blur-3xl pointer-events-none login-halo-pulse-delayed' />
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ import { Shield, Smartphone, QrCode } from 'lucide-react';
|
||||
import GlassCard from './GlassCard';
|
||||
import AuthCardHeader from './AuthCardHeader';
|
||||
import AuthLoginTabs from './AuthLoginTabs';
|
||||
import AuthDivider from './AuthDivider';
|
||||
import AgreementModal from '../common/DocumentRenderer/AgreementModal';
|
||||
import {
|
||||
isMiniProgramWebView,
|
||||
@@ -93,38 +94,26 @@ const IS_MOBILE_DEVICE =
|
||||
);
|
||||
|
||||
// 提取OAuthButton到组件外部,避免每次渲染都重建
|
||||
// 第三方登录按钮:统一为 36px 描边按钮,无位移 / 扫光动效(尺寸见 prototype.css .auth-login-page)
|
||||
const OAuthButton = React.memo(
|
||||
({ icon, children, onClick, loading, disabled, iconColor, t }) => (
|
||||
<button
|
||||
({ icon, children, onClick, loading, disabled, iconColor }) => (
|
||||
<Button
|
||||
block
|
||||
className='auth-oauth-button'
|
||||
onClick={onClick}
|
||||
disabled={loading || disabled}
|
||||
className={`
|
||||
group relative w-full h-10 flex items-center justify-center gap-2
|
||||
bg-white/80 dark:bg-white/[0.08] backdrop-blur-sm
|
||||
border border-gray-200/80 dark:border-white/[0.12]
|
||||
rounded-xl shadow-sm
|
||||
hover:bg-white dark:hover:bg-white/[0.12]
|
||||
hover:shadow-md hover:shadow-gray-200/50 dark:hover:shadow-black/30
|
||||
hover:-translate-y-0.5 hover:border-gray-300 dark:hover:border-white/20
|
||||
active:translate-y-0
|
||||
transition-all duration-200 ease-out
|
||||
disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:translate-y-0
|
||||
overflow-hidden
|
||||
`}
|
||||
loading={loading}
|
||||
disabled={disabled}
|
||||
icon={
|
||||
<span
|
||||
className='auth-oauth-icon'
|
||||
style={iconColor ? { color: iconColor } : undefined}
|
||||
>
|
||||
{icon}
|
||||
</span>
|
||||
}
|
||||
>
|
||||
{/* 悬停光效 */}
|
||||
<div className='absolute inset-0 bg-gradient-to-r from-transparent via-white/30 dark:via-white/10 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-500' />
|
||||
|
||||
<span
|
||||
style={iconColor ? { color: iconColor } : undefined}
|
||||
className='relative z-10 flex items-center justify-center w-4 h-4 text-gray-700 dark:text-gray-200'
|
||||
>
|
||||
{icon}
|
||||
</span>
|
||||
<span className='relative z-10 font-medium text-sm text-gray-700 dark:text-gray-200'>
|
||||
{loading ? (t ? t('加载中...') : '加载中...') : children}
|
||||
</span>
|
||||
</button>
|
||||
{children}
|
||||
</Button>
|
||||
),
|
||||
);
|
||||
|
||||
@@ -629,7 +618,7 @@ const LoginForm = () => {
|
||||
subtitle={t('请选择登录方式')}
|
||||
/>
|
||||
|
||||
<div className='space-y-2'>
|
||||
<div className='auth-option-list'>
|
||||
{status.wechat_login && (
|
||||
<OAuthButton
|
||||
icon={<Icon svg={<WeChatIcon />} />}
|
||||
@@ -730,39 +719,22 @@ const LoginForm = () => {
|
||||
</OAuthButton>
|
||||
)}
|
||||
|
||||
{/* 分隔线 */}
|
||||
<div className='relative py-3'>
|
||||
<div className='absolute inset-0 flex items-center'>
|
||||
<div className='w-full border-t border-gray-200/80 dark:border-white/[0.08]'></div>
|
||||
</div>
|
||||
<div className='relative flex justify-center'>
|
||||
<span className='px-3 text-xs text-gray-400 dark:text-gray-500 bg-white/60 dark:bg-neutral-900/70 backdrop-blur-md rounded-full'>
|
||||
{t('或')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<AuthDivider>{t('或')}</AuthDivider>
|
||||
|
||||
{/* 邮箱登录按钮 */}
|
||||
<button
|
||||
<Button
|
||||
theme='solid'
|
||||
block
|
||||
className='auth-login-submit'
|
||||
icon={<IconMail />}
|
||||
onClick={handleEmailLoginClick}
|
||||
className='app-action-button 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 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 overflow-hidden'
|
||||
>
|
||||
{/* 闪光效果 */}
|
||||
<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' />
|
||||
|
||||
<IconMail className='relative z-10' />
|
||||
<span className='relative z-10 font-medium text-sm'>
|
||||
{t('邮箱/用户名 登录')}
|
||||
</span>
|
||||
<ActionArrowRight
|
||||
size={16}
|
||||
className='relative z-10 group-hover:translate-x-1 transition-transform'
|
||||
/>
|
||||
</button>
|
||||
{t('邮箱/用户名 登录')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{(hasUserAgreement || hasPrivacyPolicy) && (
|
||||
<div className='mt-4 flex justify-center'>
|
||||
<div className='auth-login-agreement flex justify-center'>
|
||||
<Checkbox
|
||||
checked={agreedToTerms}
|
||||
onChange={(e) => setAgreedToTerms(e.target.checked)}
|
||||
@@ -801,7 +773,7 @@ const LoginForm = () => {
|
||||
)}
|
||||
|
||||
{!status.self_use_mode_enabled && (
|
||||
<div className='mt-4 text-center'>
|
||||
<div className='auth-login-register text-center'>
|
||||
<Text className='text-gray-500 dark:text-gray-400 text-xs'>
|
||||
{t('没有账户?')}{' '}
|
||||
<Link
|
||||
@@ -815,7 +787,7 @@ const LoginForm = () => {
|
||||
)}
|
||||
|
||||
{/* 安全提示 */}
|
||||
<div className='mt-4 flex items-center justify-center gap-1.5 text-[10px] text-gray-400 dark:text-gray-500'>
|
||||
<div className='auth-login-security'>
|
||||
<Shield size={12} />
|
||||
<span>{t('安全登录')}</span>
|
||||
</div>
|
||||
@@ -847,16 +819,7 @@ const LoginForm = () => {
|
||||
)}
|
||||
|
||||
{status.passkey_login && passkeySupported && (
|
||||
<div className='relative py-2'>
|
||||
<div className='absolute inset-0 flex items-center'>
|
||||
<div className='w-full border-t border-gray-200/80 dark:border-white/[0.08]'></div>
|
||||
</div>
|
||||
<div className='relative flex justify-center'>
|
||||
<span className='px-3 text-xs text-gray-400 dark:text-gray-500 bg-white/60 dark:bg-neutral-900/70 backdrop-blur-md rounded-full'>
|
||||
{t('或')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<AuthDivider>{t('或')}</AuthDivider>
|
||||
)}
|
||||
|
||||
<Form className='auth-login-form' onSubmit={handleSubmit}>
|
||||
@@ -972,24 +935,15 @@ const LoginForm = () => {
|
||||
status.wechat_open_oauth ||
|
||||
status.linuxdo_oauth ||
|
||||
status.telegram_oauth) && (
|
||||
<div className='mt-1'>
|
||||
<div className='relative py-2'>
|
||||
<div className='absolute inset-0 flex items-center'>
|
||||
<div className='w-full border-t border-gray-200/80 dark:border-white/[0.08]'></div>
|
||||
</div>
|
||||
<div className='relative flex justify-center'>
|
||||
<span className='px-3 text-xs text-gray-400 dark:text-gray-500 bg-white/60 dark:bg-neutral-900/70 backdrop-blur-md rounded-full'>
|
||||
{t('或')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
<div>
|
||||
<AuthDivider>{t('或')}</AuthDivider>
|
||||
<Button
|
||||
block
|
||||
className='auth-oauth-button'
|
||||
onClick={handleOtherLoginOptionsClick}
|
||||
className='w-full h-9 flex items-center justify-center gap-2 text-sm text-gray-600 dark:text-gray-300 border border-gray-200/80 dark:border-white/[0.12] rounded-lg hover:bg-gray-50 dark:hover:bg-white/[0.06] hover:border-gray-300 dark:hover:border-white/20 transition-all'
|
||||
>
|
||||
{t('其他登录选项')}
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1008,7 +962,7 @@ const LoginForm = () => {
|
||||
)}
|
||||
|
||||
{/* 安全提示 */}
|
||||
<div className='mt-3 flex items-center justify-center gap-1.5 text-[10px] text-gray-400 dark:text-gray-500'>
|
||||
<div className='auth-login-security'>
|
||||
<Shield size={12} />
|
||||
<span>{t('安全登录')}</span>
|
||||
</div>
|
||||
@@ -1040,7 +994,7 @@ const LoginForm = () => {
|
||||
okButtonProps={{
|
||||
loading: wechatCodeSubmitLoading,
|
||||
}}
|
||||
className='wechat-login-modal'
|
||||
className='wechat-login-modal auth-login-modal'
|
||||
>
|
||||
{/* 移动端提示 */}
|
||||
{isMobileView && !isInWeChat && (
|
||||
@@ -1103,7 +1057,6 @@ const LoginForm = () => {
|
||||
onChange={(value) =>
|
||||
handleChange('wechat_verification_code', value)
|
||||
}
|
||||
className='!rounded-xl'
|
||||
/>
|
||||
</Form>
|
||||
</Modal>
|
||||
@@ -1192,11 +1145,11 @@ const LoginForm = () => {
|
||||
<Modal
|
||||
title={
|
||||
<div className='flex items-center gap-3'>
|
||||
<div className='w-10 h-10 rounded-xl bg-gradient-to-br from-green-400 to-emerald-500 flex items-center justify-center shadow-lg shadow-green-500/30'>
|
||||
<Shield size={20} className='text-white' />
|
||||
<div className='auth-modal-title-icon'>
|
||||
<Shield size={18} />
|
||||
</div>
|
||||
<div>
|
||||
<div className='font-bold'>{t('两步验证')}</div>
|
||||
<div className='font-semibold'>{t('两步验证')}</div>
|
||||
<div className='text-xs text-gray-500 dark:text-gray-400 font-normal'>
|
||||
{t('请输入验证码完成登录')}
|
||||
</div>
|
||||
@@ -1208,6 +1161,7 @@ const LoginForm = () => {
|
||||
footer={null}
|
||||
width={450}
|
||||
centered
|
||||
className='auth-login-modal'
|
||||
>
|
||||
<TwoFAVerification
|
||||
onSuccess={handle2FASuccess}
|
||||
|
||||
@@ -27,11 +27,14 @@ import {
|
||||
getSystemName,
|
||||
} from '../../helpers';
|
||||
import { useSearchParams, Link } from 'react-router-dom';
|
||||
import { Button, Card, Form, Typography, Banner } from '@/components/ui';
|
||||
import { Button, Form, Typography, Banner } from '@/components/ui';
|
||||
import { IconMail, IconLock, IconCopy } from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import AuthBackground from '../common/AuthBackground';
|
||||
import GlassCard from './GlassCard';
|
||||
import AuthCardHeader from './AuthCardHeader';
|
||||
|
||||
const { Text, Title } = Typography;
|
||||
const { Text } = Typography;
|
||||
|
||||
const PasswordResetConfirm = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -108,121 +111,100 @@ const PasswordResetConfirm = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='relative overflow-hidden bg-gray-100 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'>
|
||||
{/* 背景模糊晕染球 */}
|
||||
<div
|
||||
className='blur-ball blur-ball-indigo'
|
||||
style={{ top: '-80px', right: '-80px', transform: 'none' }}
|
||||
/>
|
||||
<div
|
||||
className='blur-ball blur-ball-teal'
|
||||
style={{ top: '50%', left: '-120px' }}
|
||||
/>
|
||||
<div className='w-full max-w-sm mt-[60px]'>
|
||||
<div className='flex flex-col items-center'>
|
||||
<div className='w-full max-w-md'>
|
||||
<div className='flex items-center justify-center mb-6 gap-2'>
|
||||
<img
|
||||
src={logo}
|
||||
alt={t('网站标志')}
|
||||
className='h-10 rounded-full'
|
||||
<div
|
||||
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))' }}
|
||||
>
|
||||
<AuthBackground />
|
||||
<div className='w-full max-w-md z-10 flex flex-col items-center'>
|
||||
<GlassCard>
|
||||
<AuthCardHeader
|
||||
logo={logo}
|
||||
title={systemName}
|
||||
subtitle={t('密码重置确认')}
|
||||
/>
|
||||
|
||||
{!isValidResetLink && (
|
||||
<Banner
|
||||
type='danger'
|
||||
description={t('无效的重置链接,请重新发起密码重置请求')}
|
||||
className='auth-login-banner'
|
||||
closeIcon={null}
|
||||
/>
|
||||
)}
|
||||
<Form
|
||||
className='auth-login-form'
|
||||
getFormApi={(api) => setFormApi(api)}
|
||||
initValues={{
|
||||
email: email || '',
|
||||
newPassword: newPassword || '',
|
||||
}}
|
||||
>
|
||||
<Form.Input
|
||||
field='email'
|
||||
label={t('邮箱')}
|
||||
name='email'
|
||||
disabled={true}
|
||||
prefix={<IconMail />}
|
||||
placeholder={email ? '' : t('等待获取邮箱信息...')}
|
||||
/>
|
||||
|
||||
{newPassword && (
|
||||
<Form.Input
|
||||
field='newPassword'
|
||||
label={t('新密码')}
|
||||
name='newPassword'
|
||||
disabled={true}
|
||||
prefix={<IconLock />}
|
||||
suffix={
|
||||
<Button
|
||||
icon={<IconCopy />}
|
||||
type='tertiary'
|
||||
theme='borderless'
|
||||
size='small'
|
||||
onClick={async () => {
|
||||
if (await copy(newPassword)) {
|
||||
showNotice(
|
||||
`${t('密码已复制到剪贴板:')} ${newPassword}`,
|
||||
);
|
||||
} else {
|
||||
showError(t('复制失败,请手动复制'));
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t('复制')}
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
<Title heading={3} className='!text-gray-800'>
|
||||
{systemName}
|
||||
</Title>
|
||||
)}
|
||||
|
||||
<div className='auth-login-actions'>
|
||||
<Button
|
||||
theme='solid'
|
||||
block
|
||||
className='auth-login-submit'
|
||||
htmlType='submit'
|
||||
onClick={handleSubmit}
|
||||
loading={loading}
|
||||
disabled={disableButton || newPassword || !isValidResetLink}
|
||||
>
|
||||
{newPassword ? t('密码重置完成') : t('确认重置密码')}
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
|
||||
<Card className='border-0 !rounded-2xl overflow-hidden'>
|
||||
<div className='flex justify-center pt-6 pb-2'>
|
||||
<Title heading={3} className='text-gray-800 dark:text-gray-200'>
|
||||
{t('密码重置确认')}
|
||||
</Title>
|
||||
</div>
|
||||
<div className='px-2 py-8'>
|
||||
{!isValidResetLink && (
|
||||
<Banner
|
||||
type='danger'
|
||||
description={t('无效的重置链接,请重新发起密码重置请求')}
|
||||
className='mb-4 !rounded-lg'
|
||||
closeIcon={null}
|
||||
/>
|
||||
)}
|
||||
<Form
|
||||
getFormApi={(api) => setFormApi(api)}
|
||||
initValues={{
|
||||
email: email || '',
|
||||
newPassword: newPassword || '',
|
||||
}}
|
||||
className='space-y-4'
|
||||
>
|
||||
<Form.Input
|
||||
field='email'
|
||||
label={t('邮箱')}
|
||||
name='email'
|
||||
disabled={true}
|
||||
prefix={<IconMail />}
|
||||
placeholder={email ? '' : t('等待获取邮箱信息...')}
|
||||
/>
|
||||
|
||||
{newPassword && (
|
||||
<Form.Input
|
||||
field='newPassword'
|
||||
label={t('新密码')}
|
||||
name='newPassword'
|
||||
disabled={true}
|
||||
prefix={<IconLock />}
|
||||
suffix={
|
||||
<Button
|
||||
icon={<IconCopy />}
|
||||
type='tertiary'
|
||||
theme='borderless'
|
||||
onClick={async () => {
|
||||
if (await copy(newPassword)) {
|
||||
showNotice(
|
||||
`${t('密码已复制到剪贴板:')} ${newPassword}`,
|
||||
);
|
||||
} else {
|
||||
showError(t('复制失败,请手动复制'));
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t('复制')}
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className='space-y-2 pt-2'>
|
||||
<Button
|
||||
theme='solid'
|
||||
className='w-full !rounded-full'
|
||||
type='primary'
|
||||
htmlType='submit'
|
||||
onClick={handleSubmit}
|
||||
loading={loading}
|
||||
disabled={
|
||||
disableButton || newPassword || !isValidResetLink
|
||||
}
|
||||
>
|
||||
{newPassword ? t('密码重置完成') : t('确认重置密码')}
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
|
||||
<div className='mt-6 text-center text-sm'>
|
||||
<Text>
|
||||
<Link
|
||||
to='/login'
|
||||
className='!text-brand-deep dark:!text-brand-from hover:!text-brand dark:hover:!text-brand-from font-medium transition-colors'
|
||||
>
|
||||
{t('返回登录')}
|
||||
</Link>
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<div className='auth-login-register text-center'>
|
||||
<Text className='text-xs'>
|
||||
<Link
|
||||
to='/login'
|
||||
className='!text-brand-deep dark:!text-brand-from hover:!text-brand dark:hover:!text-brand-from font-semibold transition-colors'
|
||||
>
|
||||
{t('返回登录')}
|
||||
</Link>
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
</GlassCard>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -27,12 +27,15 @@ import {
|
||||
getSystemName,
|
||||
} from '../../helpers';
|
||||
import Turnstile from 'react-turnstile';
|
||||
import { Button, Card, Form, Typography } from '@/components/ui';
|
||||
import { Button, Form, Typography } from '@/components/ui';
|
||||
import { IconMail } from '@/components/ui/icons';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import AuthBackground from '../common/AuthBackground';
|
||||
import GlassCard from './GlassCard';
|
||||
import AuthCardHeader from './AuthCardHeader';
|
||||
|
||||
const { Text, Title } = Typography;
|
||||
const { Text } = Typography;
|
||||
|
||||
const PasswordResetForm = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -104,91 +107,69 @@ const PasswordResetForm = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='relative overflow-hidden bg-gray-100 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'>
|
||||
{/* 背景模糊晕染球 */}
|
||||
<div
|
||||
className='blur-ball blur-ball-indigo'
|
||||
style={{ top: '-80px', right: '-80px', transform: 'none' }}
|
||||
/>
|
||||
<div
|
||||
className='blur-ball blur-ball-teal'
|
||||
style={{ top: '50%', left: '-120px' }}
|
||||
/>
|
||||
<div className='w-full max-w-sm mt-[60px]'>
|
||||
<div className='flex flex-col items-center'>
|
||||
<div className='w-full max-w-md'>
|
||||
<div className='flex items-center justify-center mb-6 gap-2'>
|
||||
<img
|
||||
src={logo}
|
||||
alt={t('网站标志')}
|
||||
className='h-10 rounded-full'
|
||||
/>
|
||||
<Title heading={3} className='!text-gray-800'>
|
||||
{systemName}
|
||||
</Title>
|
||||
<div
|
||||
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))' }}
|
||||
>
|
||||
<AuthBackground />
|
||||
<div className='w-full max-w-md z-10 flex flex-col items-center'>
|
||||
<GlassCard>
|
||||
<AuthCardHeader
|
||||
logo={logo}
|
||||
title={systemName}
|
||||
subtitle={t('密码重置')}
|
||||
/>
|
||||
|
||||
<Form className='auth-login-form'>
|
||||
<Form.Input
|
||||
field='email'
|
||||
label={t('邮箱')}
|
||||
placeholder={t('请输入您的邮箱地址')}
|
||||
name='email'
|
||||
value={email}
|
||||
onChange={handleChange}
|
||||
prefix={<IconMail />}
|
||||
/>
|
||||
|
||||
<div className='auth-login-actions'>
|
||||
<Button
|
||||
theme='solid'
|
||||
block
|
||||
className='auth-login-submit'
|
||||
htmlType='submit'
|
||||
onClick={handleSubmit}
|
||||
loading={loading}
|
||||
disabled={disableButton}
|
||||
>
|
||||
{disableButton ? `${t('重试')} (${countdown})` : t('提交')}
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
|
||||
<Card className='border-0 !rounded-2xl overflow-hidden'>
|
||||
<div className='flex justify-center pt-6 pb-2'>
|
||||
<Title heading={3} className='text-gray-800 dark:text-gray-200'>
|
||||
{t('密码重置')}
|
||||
</Title>
|
||||
</div>
|
||||
<div className='px-2 py-8'>
|
||||
<Form className='space-y-3'>
|
||||
<Form.Input
|
||||
field='email'
|
||||
label={t('邮箱')}
|
||||
placeholder={t('请输入您的邮箱地址')}
|
||||
name='email'
|
||||
value={email}
|
||||
onChange={handleChange}
|
||||
prefix={<IconMail />}
|
||||
/>
|
||||
|
||||
<div className='space-y-2 pt-2'>
|
||||
<Button
|
||||
theme='solid'
|
||||
className='w-full !rounded-full'
|
||||
type='primary'
|
||||
htmlType='submit'
|
||||
onClick={handleSubmit}
|
||||
loading={loading}
|
||||
disabled={disableButton}
|
||||
>
|
||||
{disableButton
|
||||
? `${t('重试')} (${countdown})`
|
||||
: t('提交')}
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
|
||||
<div className='mt-6 text-center text-sm'>
|
||||
<Text>
|
||||
{t('想起来了?')}{' '}
|
||||
<Link
|
||||
to='/login'
|
||||
className='!text-brand-deep dark:!text-brand-from hover:!text-brand dark:hover:!text-brand-from font-medium transition-colors'
|
||||
>
|
||||
{t('登录')}
|
||||
</Link>
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
{turnstileEnabled && (
|
||||
<div className='flex justify-center mt-6'>
|
||||
<Turnstile
|
||||
sitekey={turnstileSiteKey}
|
||||
onVerify={(token) => {
|
||||
setTurnstileToken(token);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div className='auth-login-register text-center'>
|
||||
<Text className='text-gray-500 dark:text-gray-400 text-xs'>
|
||||
{t('想起来了?')}{' '}
|
||||
<Link
|
||||
to='/login'
|
||||
className='!text-brand-deep dark:!text-brand-from hover:!text-brand dark:hover:!text-brand-from font-semibold transition-colors'
|
||||
>
|
||||
{t('登录')}
|
||||
</Link>
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
</GlassCard>
|
||||
|
||||
{turnstileEnabled && (
|
||||
<div className='flex justify-center mt-6'>
|
||||
<Turnstile
|
||||
sitekey={turnstileSiteKey}
|
||||
onVerify={(token) => {
|
||||
setTurnstileToken(token);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -65,6 +65,7 @@ import AuthBackground from '../common/AuthBackground';
|
||||
import GlassCard from './GlassCard';
|
||||
import AuthCardHeader from './AuthCardHeader';
|
||||
import AuthLoginTabs from './AuthLoginTabs';
|
||||
import AuthDivider from './AuthDivider';
|
||||
import { Shield, Smartphone, QrCode } from 'lucide-react';
|
||||
import AgreementModal from '../common/DocumentRenderer/AgreementModal';
|
||||
import {
|
||||
@@ -459,7 +460,7 @@ const RegisterForm = () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 注册按钮样式组件
|
||||
// 第三方注册按钮:与登录页一致的 36px 描边按钮,无位移 / 扫光动效
|
||||
const OAuthButton = ({
|
||||
icon,
|
||||
children,
|
||||
@@ -468,36 +469,23 @@ const RegisterForm = () => {
|
||||
disabled,
|
||||
iconColor,
|
||||
}) => (
|
||||
<button
|
||||
<Button
|
||||
block
|
||||
className='auth-oauth-button'
|
||||
onClick={onClick}
|
||||
disabled={loading || disabled}
|
||||
className={`
|
||||
group relative w-full h-10 flex items-center justify-center gap-2
|
||||
bg-white/80 dark:bg-white/[0.08] backdrop-blur-sm
|
||||
border border-gray-200/80 dark:border-white/[0.12]
|
||||
rounded-xl shadow-sm
|
||||
hover:bg-white dark:hover:bg-white/[0.12]
|
||||
hover:shadow-md hover:shadow-gray-200/50 dark:hover:shadow-black/30
|
||||
hover:-translate-y-0.5 hover:border-gray-300 dark:hover:border-white/20
|
||||
active:translate-y-0
|
||||
transition-all duration-200 ease-out
|
||||
disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:translate-y-0
|
||||
overflow-hidden
|
||||
`}
|
||||
loading={loading}
|
||||
disabled={disabled}
|
||||
icon={
|
||||
<span
|
||||
className='auth-oauth-icon'
|
||||
style={iconColor ? { color: iconColor } : undefined}
|
||||
>
|
||||
{icon}
|
||||
</span>
|
||||
}
|
||||
>
|
||||
{/* 悬停光效 */}
|
||||
<div className='absolute inset-0 bg-gradient-to-r from-transparent via-white/30 dark:via-white/10 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-500' />
|
||||
|
||||
<span
|
||||
style={iconColor ? { color: iconColor } : undefined}
|
||||
className='relative z-10 flex items-center justify-center w-4 h-4 text-gray-700 dark:text-gray-200'
|
||||
>
|
||||
{icon}
|
||||
</span>
|
||||
<span className='relative z-10 font-medium text-sm text-gray-700 dark:text-gray-200'>
|
||||
{loading ? t('加载中...') : children}
|
||||
</span>
|
||||
</button>
|
||||
{children}
|
||||
</Button>
|
||||
);
|
||||
|
||||
const renderOAuthOptions = () => {
|
||||
@@ -509,7 +497,7 @@ const RegisterForm = () => {
|
||||
subtitle={t('创建您的账户')}
|
||||
/>
|
||||
|
||||
<div className='space-y-2'>
|
||||
<div className='auth-option-list'>
|
||||
{status.wechat_login && (
|
||||
<OAuthButton
|
||||
icon={<Icon svg={<WeChatIcon />} />}
|
||||
@@ -591,40 +579,23 @@ const RegisterForm = () => {
|
||||
</Suspense>
|
||||
)}
|
||||
|
||||
{/* 分隔线 */}
|
||||
<div className='relative py-3'>
|
||||
<div className='absolute inset-0 flex items-center'>
|
||||
<div className='w-full border-t border-gray-200/80 dark:border-white/[0.08]'></div>
|
||||
</div>
|
||||
<div className='relative flex justify-center'>
|
||||
<span className='px-3 text-xs text-gray-400 dark:text-gray-500 bg-white/60 dark:bg-neutral-900/70 backdrop-blur-md rounded-full'>
|
||||
{t('或')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<AuthDivider>{t('或')}</AuthDivider>
|
||||
|
||||
{/* 用户名注册按钮 */}
|
||||
<button
|
||||
<Button
|
||||
theme='solid'
|
||||
block
|
||||
className='auth-login-submit'
|
||||
icon={<IconMail />}
|
||||
onClick={handleEmailRegisterClick}
|
||||
disabled={emailRegisterLoading}
|
||||
className='app-action-button 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 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 overflow-hidden'
|
||||
>
|
||||
{/* 闪光效果 */}
|
||||
<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' />
|
||||
|
||||
<IconMail className='relative z-10' />
|
||||
<span className='relative z-10 font-medium text-sm'>
|
||||
{t('使用 用户名 注册')}
|
||||
</span>
|
||||
<ActionArrowRight
|
||||
size={16}
|
||||
className='relative z-10 group-hover:translate-x-1 transition-transform'
|
||||
/>
|
||||
</button>
|
||||
{t('使用 用户名 注册')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{(hasUserAgreement || hasPrivacyPolicy) && (
|
||||
<div className='mt-4 flex justify-center'>
|
||||
<div className='auth-login-agreement flex justify-center'>
|
||||
<Checkbox
|
||||
checked={agreedToTerms}
|
||||
onChange={(e) => setAgreedToTerms(e.target.checked)}
|
||||
@@ -662,7 +633,7 @@ const RegisterForm = () => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className='mt-4 text-center'>
|
||||
<div className='auth-login-register text-center'>
|
||||
<Text className='text-gray-500 dark:text-gray-400 text-xs'>
|
||||
{t('已有账户?')}{' '}
|
||||
<Link
|
||||
@@ -675,7 +646,7 @@ const RegisterForm = () => {
|
||||
</div>
|
||||
|
||||
{/* 安全提示 */}
|
||||
<div className='mt-4 flex items-center justify-center gap-1.5 text-[10px] text-gray-400 dark:text-gray-500'>
|
||||
<div className='auth-login-security'>
|
||||
<Shield size={12} />
|
||||
<span>{t('安全注册')}</span>
|
||||
</div>
|
||||
@@ -694,8 +665,7 @@ const RegisterForm = () => {
|
||||
logoWrapperClassName='mb-2'
|
||||
/>
|
||||
|
||||
<Form className='register-compact-form auth-glass-form'>
|
||||
{/* 用户名输入框 —— 玻璃观感统一由 .auth-glass-form(GlassCard 内置样式)驱动 */}
|
||||
<Form className='auth-login-form'>
|
||||
<Form.Input
|
||||
field='username'
|
||||
label={
|
||||
@@ -705,7 +675,6 @@ const RegisterForm = () => {
|
||||
}
|
||||
placeholder={t('请输入用户名')}
|
||||
name='username'
|
||||
size='large'
|
||||
autoComplete='username'
|
||||
onChange={(value) => handleChange('username', value)}
|
||||
prefix={<IconUser size='small' />}
|
||||
@@ -722,7 +691,6 @@ const RegisterForm = () => {
|
||||
placeholder={t('输入密码,最短 8 位,最长 20 位')}
|
||||
name='password'
|
||||
mode='password'
|
||||
size='large'
|
||||
autoComplete='new-password'
|
||||
onChange={(value) => handleChange('password', value)}
|
||||
prefix={<IconLock size='small' />}
|
||||
@@ -739,7 +707,6 @@ const RegisterForm = () => {
|
||||
placeholder={t('确认密码')}
|
||||
name='password2'
|
||||
mode='password'
|
||||
size='large'
|
||||
autoComplete='new-password'
|
||||
onChange={(value) => handleChange('password2', value)}
|
||||
prefix={<IconLock size='small' />}
|
||||
@@ -757,7 +724,6 @@ const RegisterForm = () => {
|
||||
placeholder={t('输入邮箱地址')}
|
||||
name='email'
|
||||
type='email'
|
||||
size='large'
|
||||
autoComplete='email'
|
||||
onChange={(value) => handleChange('email', value)}
|
||||
prefix={<IconMail size='small' />}
|
||||
@@ -784,7 +750,6 @@ const RegisterForm = () => {
|
||||
}
|
||||
placeholder={t('输入验证码')}
|
||||
name='verification_code'
|
||||
size='large'
|
||||
onChange={(value) => handleChange('verification_code', value)}
|
||||
prefix={<IconKey size='small' />}
|
||||
/>
|
||||
@@ -792,7 +757,7 @@ const RegisterForm = () => {
|
||||
)}
|
||||
|
||||
{(hasUserAgreement || hasPrivacyPolicy) && (
|
||||
<div className='flex items-center mt-3'>
|
||||
<div className='flex items-center'>
|
||||
<Checkbox
|
||||
checked={agreedToTerms}
|
||||
onChange={(e) => setAgreedToTerms(e.target.checked)}
|
||||
@@ -827,34 +792,23 @@ const RegisterForm = () => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className='space-y-2 mt-3'>
|
||||
{/* 注册按钮 */}
|
||||
<button
|
||||
type='submit'
|
||||
<div className='auth-login-actions'>
|
||||
{/* 注册按钮:与登录按钮同款实心主按钮(36px),保留原提交触发与禁用条件 */}
|
||||
<Button
|
||||
theme='solid'
|
||||
htmlType='submit'
|
||||
block
|
||||
className='auth-login-submit'
|
||||
onClick={handleSubmit}
|
||||
loading={registerLoading}
|
||||
disabled={
|
||||
registerLoading ||
|
||||
((hasUserAgreement || hasPrivacyPolicy) && !agreedToTerms)
|
||||
}
|
||||
className='app-action-button 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'
|
||||
>
|
||||
{/* 闪光效果 */}
|
||||
<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' />
|
||||
|
||||
{registerLoading ? (
|
||||
<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>
|
||||
<ActionArrowRight
|
||||
size={16}
|
||||
className='relative z-10 group-hover:translate-x-1 transition-transform'
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</button>
|
||||
<span className='font-semibold'>{t('注 册')}</span>
|
||||
<ActionArrowRight size={16} />
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
|
||||
@@ -865,29 +819,20 @@ const RegisterForm = () => {
|
||||
status.wechat_open_oauth ||
|
||||
status.linuxdo_oauth ||
|
||||
status.telegram_oauth) && (
|
||||
<div className='mt-2'>
|
||||
<div className='relative py-3'>
|
||||
<div className='absolute inset-0 flex items-center'>
|
||||
<div className='w-full border-t border-gray-200/80 dark:border-white/[0.08]'></div>
|
||||
</div>
|
||||
<div className='relative flex justify-center'>
|
||||
<span className='px-3 text-xs text-gray-400 dark:text-gray-500 bg-white/60 dark:bg-neutral-900/70 backdrop-blur-md rounded-full'>
|
||||
{t('或')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
<div>
|
||||
<AuthDivider>{t('或')}</AuthDivider>
|
||||
<Button
|
||||
block
|
||||
className='auth-oauth-button'
|
||||
onClick={handleOtherRegisterOptionsClick}
|
||||
disabled={otherRegisterOptionsLoading}
|
||||
className='w-full h-9 flex items-center justify-center gap-2 text-sm text-gray-600 dark:text-gray-300 border border-gray-200/80 dark:border-white/[0.12] rounded-lg hover:bg-gray-50 dark:hover:bg-white/[0.06] hover:border-gray-300 dark:hover:border-white/20 transition-all'
|
||||
>
|
||||
{t('其他注册选项')}
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className='mt-4 text-center'>
|
||||
<div className='auth-login-register text-center'>
|
||||
<Text className='text-gray-500 dark:text-gray-400 text-xs'>
|
||||
{t('已有账户?')}{' '}
|
||||
<Link
|
||||
@@ -900,7 +845,7 @@ const RegisterForm = () => {
|
||||
</div>
|
||||
|
||||
{/* 安全提示 */}
|
||||
<div className='mt-4 flex items-center justify-center gap-1.5 text-[10px] text-gray-400 dark:text-gray-500'>
|
||||
<div className='auth-login-security'>
|
||||
<Shield size={12} />
|
||||
<span>{t('安全注册')}</span>
|
||||
</div>
|
||||
@@ -932,7 +877,7 @@ const RegisterForm = () => {
|
||||
okButtonProps={{
|
||||
loading: wechatCodeSubmitLoading,
|
||||
}}
|
||||
className='wechat-login-modal'
|
||||
className='wechat-login-modal auth-login-modal'
|
||||
>
|
||||
{/* 移动端提示 */}
|
||||
{isMobileView && !isInWeChat && (
|
||||
@@ -995,7 +940,6 @@ const RegisterForm = () => {
|
||||
onChange={(value) =>
|
||||
handleChange('wechat_verification_code', value)
|
||||
}
|
||||
className='!rounded-xl'
|
||||
/>
|
||||
</Form>
|
||||
</Modal>
|
||||
@@ -1089,7 +1033,7 @@ const RegisterForm = () => {
|
||||
|
||||
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))' }}
|
||||
>
|
||||
|
||||
@@ -88,7 +88,6 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
||||
value={verificationCode}
|
||||
onChange={setVerificationCode}
|
||||
onKeyPress={handleKeyPress}
|
||||
size='large'
|
||||
style={{ marginBottom: 16 }}
|
||||
autoFocus
|
||||
/>
|
||||
@@ -98,7 +97,6 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
||||
type='primary'
|
||||
loading={loading}
|
||||
block
|
||||
size='large'
|
||||
style={{ marginBottom: 16 }}
|
||||
>
|
||||
{t('验证并登录')}
|
||||
@@ -115,7 +113,8 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
||||
setUseBackupCode(!useBackupCode);
|
||||
setVerificationCode('');
|
||||
}}
|
||||
style={{ marginRight: 16, color: '#1890ff', padding: 0 }}
|
||||
style={{ marginRight: 16, padding: 0 }}
|
||||
className='!text-brand'
|
||||
>
|
||||
{useBackupCode ? t('使用认证器验证码') : t('使用备用码')}
|
||||
</Button>
|
||||
@@ -125,7 +124,8 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
onClick={onBack}
|
||||
style={{ color: '#1890ff', padding: 0 }}
|
||||
style={{ padding: 0 }}
|
||||
className='!text-brand'
|
||||
>
|
||||
{t('返回登录')}
|
||||
</Button>
|
||||
@@ -177,7 +177,6 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
||||
value={verificationCode}
|
||||
onChange={setVerificationCode}
|
||||
onKeyPress={handleKeyPress}
|
||||
size='large'
|
||||
style={{ marginBottom: 16 }}
|
||||
autoFocus
|
||||
/>
|
||||
@@ -187,7 +186,6 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
||||
type='primary'
|
||||
loading={loading}
|
||||
block
|
||||
size='large'
|
||||
style={{ marginBottom: 16 }}
|
||||
>
|
||||
{t('验证并登录')}
|
||||
@@ -204,7 +202,8 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
||||
setUseBackupCode(!useBackupCode);
|
||||
setVerificationCode('');
|
||||
}}
|
||||
style={{ marginRight: 16, color: '#1890ff', padding: 0 }}
|
||||
style={{ marginRight: 16, padding: 0 }}
|
||||
className='!text-brand'
|
||||
>
|
||||
{useBackupCode ? t('使用认证器验证码') : t('使用备用码')}
|
||||
</Button>
|
||||
@@ -214,7 +213,8 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
onClick={onBack}
|
||||
style={{ color: '#1890ff', padding: 0 }}
|
||||
style={{ padding: 0 }}
|
||||
className='!text-brand'
|
||||
>
|
||||
{t('返回登录')}
|
||||
</Button>
|
||||
|
||||
@@ -346,9 +346,10 @@ const PageLayout = () => {
|
||||
<Header
|
||||
className={
|
||||
isAuthPage
|
||||
? ['/org/login', '/login'].includes(location.pathname)
|
||||
? 'login-layout-header'
|
||||
: 'auth-layout-header'
|
||||
? // 登录 / 注册 / 找回密码统一使用登录页同款标准顶栏;仅客户端授权页保留透明顶栏
|
||||
location.pathname.toLowerCase() === '/client/authorize'
|
||||
? 'auth-layout-header'
|
||||
: 'login-layout-header'
|
||||
: undefined
|
||||
}
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user