fix(ui): 统一认证页输入框 36px 与视觉样式
This commit is contained in:
+9
-1
@@ -1,6 +1,6 @@
|
|||||||
# 变更记录(CHANGELOG)
|
# 变更记录(CHANGELOG)
|
||||||
|
|
||||||
> 状态:有效(持续追加) · 更新:2026-11-18 · 版本:v3.3
|
> 状态:有效(持续追加) · 更新:2026-11-18 · 版本:v3.4
|
||||||
|
|
||||||
对现状仍有影响的功能与修复记录,按日期倒序。改造、迁移、优化等一次性过程不在此记录。
|
对现状仍有影响的功能与修复记录,按日期倒序。改造、迁移、优化等一次性过程不在此记录。
|
||||||
|
|
||||||
@@ -10,6 +10,14 @@
|
|||||||
|
|
||||||
## 2026-11-18
|
## 2026-11-18
|
||||||
|
|
||||||
|
### 调整 · 认证页输入框 36px 与视觉统一
|
||||||
|
|
||||||
|
- **范围**:`/login`、`/org/login`、`/org/:slug/login`、`/register`、`/org/register`、`/reset`、`/user/reset`,以及两步验证、微信验证码弹窗。
|
||||||
|
- **变更**:输入框、下拉、整行按钮统一 36px / 8px 圆角,字段节奏 24px;隐藏卡片外发光、角落光晕、漂移光斑与 Logo 光环 / 星标;第三方登录与注册提交按钮去掉渐变、扫光和上浮动效;新增 `AuthDivider` 统一分隔线;找回密码两页改用登录页同款背景、卡片与头部;六个认证页统一使用登录顶栏;两步验证链接色改用品牌色。
|
||||||
|
- **影响**:仅视图层,保留请求、载荷、校验规则、提交触发与禁用条件;`OrgCredentialResult` 和 `/client/authorize` 不变。
|
||||||
|
- **回滚**:按文件还原 `src/components/auth/`(含删除新增的 `AuthDivider.jsx`)、`src/pages/OrgLogin/index.jsx`、`src/pages/OrgRegister/index.jsx`、`src/components/layout/PageLayout.jsx`、`src/styles/prototype.css` 中的 `.auth-login-page` 段及 `GLOBAL_UI_BASELINE.md` 第 4.5 节。
|
||||||
|
- **关联**:`docs/ui/GLOBAL_UI_BASELINE.md` 第 4.5 节。
|
||||||
|
|
||||||
### 规范 · 适配层日期契约、标签写法与控制台页头
|
### 规范 · 适配层日期契约、标签写法与控制台页头
|
||||||
|
|
||||||
- **范围**:`src/components/ui/controls.jsx`;`docs/standards/{DEV_STANDARDS,UI_COMPONENT_STANDARDS}.md`、`docs/ui/{ORG_CENTER_SPEC,CONSOLE_SPEC}.md`。
|
- **范围**:`src/components/ui/controls.jsx`;`docs/standards/{DEV_STANDARDS,UI_COMPONENT_STANDARDS}.md`、`docs/ui/{ORG_CENTER_SPEC,CONSOLE_SPEC}.md`。
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# 后台 UI 全局基线
|
# 后台 UI 全局基线
|
||||||
|
|
||||||
> 状态:有效 · 适用:antd 6.7.0 · 更新:2026-11-17 · 版本:v3.6
|
> 状态:有效 · 适用:antd 6.7.0 · 更新:2026-11-18 · 版本:v3.7
|
||||||
|
|
||||||
后台外壳与布局基线:顶栏、侧栏、公告、页头与内容边距、登录页,以及原型未定义场景、登录关卡与验收流程。主题与组件样式见 `UI_COMPONENT_STANDARDS.md`。
|
后台外壳与布局基线:顶栏、侧栏、公告、页头与内容边距、登录页,以及原型未定义场景、登录关卡与验收流程。主题与组件样式见 `UI_COMPONENT_STANDARDS.md`。
|
||||||
|
|
||||||
@@ -80,8 +80,8 @@
|
|||||||
|
|
||||||
### 4.5 登录页与认证顶栏
|
### 4.5 登录页与认证顶栏
|
||||||
|
|
||||||
- `/org/login` 与 `/login` 顶栏采用后台标准样式,无品牌条、玻璃渐变与反光层。登录页局部布局 `.auth-login-page`;其他认证顶栏 `.auth-layout-header` 透出既有背景;登录顶栏 `.login-layout-header`。
|
- 认证页(`/login`、`/org/login`、`/org/:slug/login`、`/register`、`/org/register`、`/reset`、`/user/reset`)统一使用登录顶栏 `.login-layout-header` 与局部布局 `.auth-login-page`,顶栏采用后台标准样式,无品牌条、玻璃渐变与反光层;仅客户端授权页 `/client/authorize` 保留 `.auth-layout-header` 透出背景。
|
||||||
- 登录卡片无顶部装饰线与反光;企业 / 个人切换用 antd `Button`;输入框 34px 高、8px 圆角,必填标识经 `Form.Item` 呈现;凭据字段只预留必要的错误提示高度,正常、报错、修正三态布局稳定。
|
- 登录卡片无顶部装饰线、反光、外发光、角落光晕与 Logo 光环 / 星标;企业 / 个人切换用 antd `Button`;输入框、下拉、整行按钮与认证弹窗(`.auth-login-modal`)控件统一 36px 高、8px 圆角(`--auth-control-height`),必填标识经 `Form.Item` 呈现;字段节奏 24px,凭据字段只预留必要的错误提示高度,正常、报错、修正三态布局稳定。第三方登录用描边整行按钮,无位移与扫光;分隔线用 `AuthDivider`。规则集中在 `src/styles/prototype.css` 的 `.auth-login-page` 段。
|
||||||
- 副标题、“记住登录名”、管理员重置提示与“忘记密码”使用加深 20% 的次文字色,无悬停底色,“忘记密码”悬停再加深;“切换企业”与“登录”同为主按钮样式。个人登录必填校验用 `rules`,通过后调用原登录处理函数。样式调整不得改变登录校验、回调与载荷。
|
- 副标题、“记住登录名”、管理员重置提示与“忘记密码”使用加深 20% 的次文字色,无悬停底色,“忘记密码”悬停再加深;“切换企业”与“登录”同为主按钮样式。个人登录必填校验用 `rules`,通过后调用原登录处理函数。样式调整不得改变登录校验、回调与载荷。
|
||||||
|
|
||||||
### 4.6 导航入口
|
### 4.6 导航入口
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ const AuthCardHeader = ({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<div
|
<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}`}>
|
<div className={`auth-card-logo relative ${logoWrapperClassName}`}>
|
||||||
{/* Logo 光环 */}
|
{/* Logo 光环(.auth-login-page 认证页内隐藏,保持克制) */}
|
||||||
<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='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='relative p-2 bg-white dark:bg-neutral-800 rounded-xl shadow-md'>
|
<div className='auth-card-logo-box relative p-2 bg-white dark:bg-neutral-800 rounded-xl shadow-md'>
|
||||||
{logoNode || (
|
{logoNode || (
|
||||||
<img
|
<img
|
||||||
src={logo}
|
src={logo}
|
||||||
@@ -58,10 +58,10 @@ const AuthCardHeader = ({
|
|||||||
</div>
|
</div>
|
||||||
<Sparkles
|
<Sparkles
|
||||||
size={14}
|
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>
|
</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}
|
{title}
|
||||||
</h4>
|
</h4>
|
||||||
<p className='auth-card-subtitle text-gray-500 dark:text-gray-400 text-xs'>
|
<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 (
|
return (
|
||||||
<div className={`w-full max-w-sm relative login-card-float ${className}`}>
|
<div className={`w-full max-w-sm relative login-card-float ${className}`}>
|
||||||
<GlassCardStyles />
|
<GlassCardStyles />
|
||||||
{/* 外环柔光晕 */}
|
{/* 外环柔光晕(.auth-login-page 认证页内隐藏) */}
|
||||||
<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' />
|
<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 && (
|
{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='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='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 -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 GlassCard from './GlassCard';
|
||||||
import AuthCardHeader from './AuthCardHeader';
|
import AuthCardHeader from './AuthCardHeader';
|
||||||
import AuthLoginTabs from './AuthLoginTabs';
|
import AuthLoginTabs from './AuthLoginTabs';
|
||||||
|
import AuthDivider from './AuthDivider';
|
||||||
import AgreementModal from '../common/DocumentRenderer/AgreementModal';
|
import AgreementModal from '../common/DocumentRenderer/AgreementModal';
|
||||||
import {
|
import {
|
||||||
isMiniProgramWebView,
|
isMiniProgramWebView,
|
||||||
@@ -93,38 +94,26 @@ const IS_MOBILE_DEVICE =
|
|||||||
);
|
);
|
||||||
|
|
||||||
// 提取OAuthButton到组件外部,避免每次渲染都重建
|
// 提取OAuthButton到组件外部,避免每次渲染都重建
|
||||||
|
// 第三方登录按钮:统一为 36px 描边按钮,无位移 / 扫光动效(尺寸见 prototype.css .auth-login-page)
|
||||||
const OAuthButton = React.memo(
|
const OAuthButton = React.memo(
|
||||||
({ icon, children, onClick, loading, disabled, iconColor, t }) => (
|
({ icon, children, onClick, loading, disabled, iconColor }) => (
|
||||||
<button
|
<Button
|
||||||
|
block
|
||||||
|
className='auth-oauth-button'
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
disabled={loading || disabled}
|
loading={loading}
|
||||||
className={`
|
disabled={disabled}
|
||||||
group relative w-full h-10 flex items-center justify-center gap-2
|
icon={
|
||||||
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
|
|
||||||
`}
|
|
||||||
>
|
|
||||||
{/* 悬停光效 */}
|
|
||||||
<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
|
<span
|
||||||
|
className='auth-oauth-icon'
|
||||||
style={iconColor ? { color: iconColor } : undefined}
|
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}
|
{icon}
|
||||||
</span>
|
</span>
|
||||||
<span className='relative z-10 font-medium text-sm text-gray-700 dark:text-gray-200'>
|
}
|
||||||
{loading ? (t ? t('加载中...') : '加载中...') : children}
|
>
|
||||||
</span>
|
{children}
|
||||||
</button>
|
</Button>
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -629,7 +618,7 @@ const LoginForm = () => {
|
|||||||
subtitle={t('请选择登录方式')}
|
subtitle={t('请选择登录方式')}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className='space-y-2'>
|
<div className='auth-option-list'>
|
||||||
{status.wechat_login && (
|
{status.wechat_login && (
|
||||||
<OAuthButton
|
<OAuthButton
|
||||||
icon={<Icon svg={<WeChatIcon />} />}
|
icon={<Icon svg={<WeChatIcon />} />}
|
||||||
@@ -730,39 +719,22 @@ const LoginForm = () => {
|
|||||||
</OAuthButton>
|
</OAuthButton>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* 分隔线 */}
|
<AuthDivider>{t('或')}</AuthDivider>
|
||||||
<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
|
<Button
|
||||||
|
theme='solid'
|
||||||
|
block
|
||||||
|
className='auth-login-submit'
|
||||||
|
icon={<IconMail />}
|
||||||
onClick={handleEmailLoginClick}
|
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('邮箱/用户名 登录')}
|
{t('邮箱/用户名 登录')}
|
||||||
</span>
|
</Button>
|
||||||
<ActionArrowRight
|
|
||||||
size={16}
|
|
||||||
className='relative z-10 group-hover:translate-x-1 transition-transform'
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{(hasUserAgreement || hasPrivacyPolicy) && (
|
{(hasUserAgreement || hasPrivacyPolicy) && (
|
||||||
<div className='mt-4 flex justify-center'>
|
<div className='auth-login-agreement flex justify-center'>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={agreedToTerms}
|
checked={agreedToTerms}
|
||||||
onChange={(e) => setAgreedToTerms(e.target.checked)}
|
onChange={(e) => setAgreedToTerms(e.target.checked)}
|
||||||
@@ -801,7 +773,7 @@ const LoginForm = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{!status.self_use_mode_enabled && (
|
{!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'>
|
<Text className='text-gray-500 dark:text-gray-400 text-xs'>
|
||||||
{t('没有账户?')}{' '}
|
{t('没有账户?')}{' '}
|
||||||
<Link
|
<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} />
|
<Shield size={12} />
|
||||||
<span>{t('安全登录')}</span>
|
<span>{t('安全登录')}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -847,16 +819,7 @@ const LoginForm = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{status.passkey_login && passkeySupported && (
|
{status.passkey_login && passkeySupported && (
|
||||||
<div className='relative py-2'>
|
<AuthDivider>{t('或')}</AuthDivider>
|
||||||
<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>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Form className='auth-login-form' onSubmit={handleSubmit}>
|
<Form className='auth-login-form' onSubmit={handleSubmit}>
|
||||||
@@ -972,24 +935,15 @@ const LoginForm = () => {
|
|||||||
status.wechat_open_oauth ||
|
status.wechat_open_oauth ||
|
||||||
status.linuxdo_oauth ||
|
status.linuxdo_oauth ||
|
||||||
status.telegram_oauth) && (
|
status.telegram_oauth) && (
|
||||||
<div className='mt-1'>
|
<div>
|
||||||
<div className='relative py-2'>
|
<AuthDivider>{t('或')}</AuthDivider>
|
||||||
<div className='absolute inset-0 flex items-center'>
|
<Button
|
||||||
<div className='w-full border-t border-gray-200/80 dark:border-white/[0.08]'></div>
|
block
|
||||||
</div>
|
className='auth-oauth-button'
|
||||||
<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
|
|
||||||
onClick={handleOtherLoginOptionsClick}
|
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('其他登录选项')}
|
{t('其他登录选项')}
|
||||||
</button>
|
</Button>
|
||||||
</div>
|
</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} />
|
<Shield size={12} />
|
||||||
<span>{t('安全登录')}</span>
|
<span>{t('安全登录')}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -1040,7 +994,7 @@ const LoginForm = () => {
|
|||||||
okButtonProps={{
|
okButtonProps={{
|
||||||
loading: wechatCodeSubmitLoading,
|
loading: wechatCodeSubmitLoading,
|
||||||
}}
|
}}
|
||||||
className='wechat-login-modal'
|
className='wechat-login-modal auth-login-modal'
|
||||||
>
|
>
|
||||||
{/* 移动端提示 */}
|
{/* 移动端提示 */}
|
||||||
{isMobileView && !isInWeChat && (
|
{isMobileView && !isInWeChat && (
|
||||||
@@ -1103,7 +1057,6 @@ const LoginForm = () => {
|
|||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
handleChange('wechat_verification_code', value)
|
handleChange('wechat_verification_code', value)
|
||||||
}
|
}
|
||||||
className='!rounded-xl'
|
|
||||||
/>
|
/>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1192,11 +1145,11 @@ const LoginForm = () => {
|
|||||||
<Modal
|
<Modal
|
||||||
title={
|
title={
|
||||||
<div className='flex items-center gap-3'>
|
<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'>
|
<div className='auth-modal-title-icon'>
|
||||||
<Shield size={20} className='text-white' />
|
<Shield size={18} />
|
||||||
</div>
|
</div>
|
||||||
<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'>
|
<div className='text-xs text-gray-500 dark:text-gray-400 font-normal'>
|
||||||
{t('请输入验证码完成登录')}
|
{t('请输入验证码完成登录')}
|
||||||
</div>
|
</div>
|
||||||
@@ -1208,6 +1161,7 @@ const LoginForm = () => {
|
|||||||
footer={null}
|
footer={null}
|
||||||
width={450}
|
width={450}
|
||||||
centered
|
centered
|
||||||
|
className='auth-login-modal'
|
||||||
>
|
>
|
||||||
<TwoFAVerification
|
<TwoFAVerification
|
||||||
onSuccess={handle2FASuccess}
|
onSuccess={handle2FASuccess}
|
||||||
|
|||||||
@@ -27,11 +27,14 @@ import {
|
|||||||
getSystemName,
|
getSystemName,
|
||||||
} from '../../helpers';
|
} from '../../helpers';
|
||||||
import { useSearchParams, Link } from 'react-router-dom';
|
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 { IconMail, IconLock, IconCopy } from '@/components/ui/icons';
|
||||||
import { useTranslation } from 'react-i18next';
|
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 PasswordResetConfirm = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -108,52 +111,35 @@ const PasswordResetConfirm = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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
|
<div
|
||||||
className='blur-ball blur-ball-indigo'
|
className='auth-login-page relative overflow-hidden flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'
|
||||||
style={{ top: '-80px', right: '-80px', transform: 'none' }}
|
// 与登录页一致:抵扣 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('密码重置确认')}
|
||||||
/>
|
/>
|
||||||
<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>
|
|
||||||
|
|
||||||
<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 && (
|
{!isValidResetLink && (
|
||||||
<Banner
|
<Banner
|
||||||
type='danger'
|
type='danger'
|
||||||
description={t('无效的重置链接,请重新发起密码重置请求')}
|
description={t('无效的重置链接,请重新发起密码重置请求')}
|
||||||
className='mb-4 !rounded-lg'
|
className='auth-login-banner'
|
||||||
closeIcon={null}
|
closeIcon={null}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Form
|
<Form
|
||||||
|
className='auth-login-form'
|
||||||
getFormApi={(api) => setFormApi(api)}
|
getFormApi={(api) => setFormApi(api)}
|
||||||
initValues={{
|
initValues={{
|
||||||
email: email || '',
|
email: email || '',
|
||||||
newPassword: newPassword || '',
|
newPassword: newPassword || '',
|
||||||
}}
|
}}
|
||||||
className='space-y-4'
|
|
||||||
>
|
>
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='email'
|
field='email'
|
||||||
@@ -176,6 +162,7 @@ const PasswordResetConfirm = () => {
|
|||||||
icon={<IconCopy />}
|
icon={<IconCopy />}
|
||||||
type='tertiary'
|
type='tertiary'
|
||||||
theme='borderless'
|
theme='borderless'
|
||||||
|
size='small'
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
if (await copy(newPassword)) {
|
if (await copy(newPassword)) {
|
||||||
showNotice(
|
showNotice(
|
||||||
@@ -192,37 +179,32 @@ const PasswordResetConfirm = () => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className='space-y-2 pt-2'>
|
<div className='auth-login-actions'>
|
||||||
<Button
|
<Button
|
||||||
theme='solid'
|
theme='solid'
|
||||||
className='w-full !rounded-full'
|
block
|
||||||
type='primary'
|
className='auth-login-submit'
|
||||||
htmlType='submit'
|
htmlType='submit'
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
disabled={
|
disabled={disableButton || newPassword || !isValidResetLink}
|
||||||
disableButton || newPassword || !isValidResetLink
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{newPassword ? t('密码重置完成') : t('确认重置密码')}
|
{newPassword ? t('密码重置完成') : t('确认重置密码')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<div className='mt-6 text-center text-sm'>
|
<div className='auth-login-register text-center'>
|
||||||
<Text>
|
<Text className='text-xs'>
|
||||||
<Link
|
<Link
|
||||||
to='/login'
|
to='/login'
|
||||||
className='!text-brand-deep dark:!text-brand-from hover:!text-brand dark:hover:!text-brand-from font-medium transition-colors'
|
className='!text-brand-deep dark:!text-brand-from hover:!text-brand dark:hover:!text-brand-from font-semibold transition-colors'
|
||||||
>
|
>
|
||||||
{t('返回登录')}
|
{t('返回登录')}
|
||||||
</Link>
|
</Link>
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</GlassCard>
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -27,12 +27,15 @@ import {
|
|||||||
getSystemName,
|
getSystemName,
|
||||||
} from '../../helpers';
|
} from '../../helpers';
|
||||||
import Turnstile from 'react-turnstile';
|
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 { IconMail } from '@/components/ui/icons';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { useTranslation } from 'react-i18next';
|
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 PasswordResetForm = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -104,38 +107,21 @@ const PasswordResetForm = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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
|
<div
|
||||||
className='blur-ball blur-ball-indigo'
|
className='auth-login-page relative overflow-hidden flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'
|
||||||
style={{ top: '-80px', right: '-80px', transform: 'none' }}
|
// 与登录页一致:抵扣 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('密码重置')}
|
||||||
/>
|
/>
|
||||||
<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>
|
|
||||||
|
|
||||||
<Card className='border-0 !rounded-2xl overflow-hidden'>
|
<Form className='auth-login-form'>
|
||||||
<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
|
<Form.Input
|
||||||
field='email'
|
field='email'
|
||||||
label={t('邮箱')}
|
label={t('邮箱')}
|
||||||
@@ -146,36 +132,33 @@ const PasswordResetForm = () => {
|
|||||||
prefix={<IconMail />}
|
prefix={<IconMail />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className='space-y-2 pt-2'>
|
<div className='auth-login-actions'>
|
||||||
<Button
|
<Button
|
||||||
theme='solid'
|
theme='solid'
|
||||||
className='w-full !rounded-full'
|
block
|
||||||
type='primary'
|
className='auth-login-submit'
|
||||||
htmlType='submit'
|
htmlType='submit'
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
disabled={disableButton}
|
disabled={disableButton}
|
||||||
>
|
>
|
||||||
{disableButton
|
{disableButton ? `${t('重试')} (${countdown})` : t('提交')}
|
||||||
? `${t('重试')} (${countdown})`
|
|
||||||
: t('提交')}
|
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<div className='mt-6 text-center text-sm'>
|
<div className='auth-login-register text-center'>
|
||||||
<Text>
|
<Text className='text-gray-500 dark:text-gray-400 text-xs'>
|
||||||
{t('想起来了?')}{' '}
|
{t('想起来了?')}{' '}
|
||||||
<Link
|
<Link
|
||||||
to='/login'
|
to='/login'
|
||||||
className='!text-brand-deep dark:!text-brand-from hover:!text-brand dark:hover:!text-brand-from font-medium transition-colors'
|
className='!text-brand-deep dark:!text-brand-from hover:!text-brand dark:hover:!text-brand-from font-semibold transition-colors'
|
||||||
>
|
>
|
||||||
{t('登录')}
|
{t('登录')}
|
||||||
</Link>
|
</Link>
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</GlassCard>
|
||||||
</Card>
|
|
||||||
|
|
||||||
{turnstileEnabled && (
|
{turnstileEnabled && (
|
||||||
<div className='flex justify-center mt-6'>
|
<div className='flex justify-center mt-6'>
|
||||||
@@ -189,8 +172,6 @@ const PasswordResetForm = () => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ import AuthBackground from '../common/AuthBackground';
|
|||||||
import GlassCard from './GlassCard';
|
import GlassCard from './GlassCard';
|
||||||
import AuthCardHeader from './AuthCardHeader';
|
import AuthCardHeader from './AuthCardHeader';
|
||||||
import AuthLoginTabs from './AuthLoginTabs';
|
import AuthLoginTabs from './AuthLoginTabs';
|
||||||
|
import AuthDivider from './AuthDivider';
|
||||||
import { Shield, Smartphone, QrCode } from 'lucide-react';
|
import { Shield, Smartphone, QrCode } from 'lucide-react';
|
||||||
import AgreementModal from '../common/DocumentRenderer/AgreementModal';
|
import AgreementModal from '../common/DocumentRenderer/AgreementModal';
|
||||||
import {
|
import {
|
||||||
@@ -459,7 +460,7 @@ const RegisterForm = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 注册按钮样式组件
|
// 第三方注册按钮:与登录页一致的 36px 描边按钮,无位移 / 扫光动效
|
||||||
const OAuthButton = ({
|
const OAuthButton = ({
|
||||||
icon,
|
icon,
|
||||||
children,
|
children,
|
||||||
@@ -468,36 +469,23 @@ const RegisterForm = () => {
|
|||||||
disabled,
|
disabled,
|
||||||
iconColor,
|
iconColor,
|
||||||
}) => (
|
}) => (
|
||||||
<button
|
<Button
|
||||||
|
block
|
||||||
|
className='auth-oauth-button'
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
disabled={loading || disabled}
|
loading={loading}
|
||||||
className={`
|
disabled={disabled}
|
||||||
group relative w-full h-10 flex items-center justify-center gap-2
|
icon={
|
||||||
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
|
|
||||||
`}
|
|
||||||
>
|
|
||||||
{/* 悬停光效 */}
|
|
||||||
<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
|
<span
|
||||||
|
className='auth-oauth-icon'
|
||||||
style={iconColor ? { color: iconColor } : undefined}
|
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}
|
{icon}
|
||||||
</span>
|
</span>
|
||||||
<span className='relative z-10 font-medium text-sm text-gray-700 dark:text-gray-200'>
|
}
|
||||||
{loading ? t('加载中...') : children}
|
>
|
||||||
</span>
|
{children}
|
||||||
</button>
|
</Button>
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderOAuthOptions = () => {
|
const renderOAuthOptions = () => {
|
||||||
@@ -509,7 +497,7 @@ const RegisterForm = () => {
|
|||||||
subtitle={t('创建您的账户')}
|
subtitle={t('创建您的账户')}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className='space-y-2'>
|
<div className='auth-option-list'>
|
||||||
{status.wechat_login && (
|
{status.wechat_login && (
|
||||||
<OAuthButton
|
<OAuthButton
|
||||||
icon={<Icon svg={<WeChatIcon />} />}
|
icon={<Icon svg={<WeChatIcon />} />}
|
||||||
@@ -591,40 +579,23 @@ const RegisterForm = () => {
|
|||||||
</Suspense>
|
</Suspense>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* 分隔线 */}
|
<AuthDivider>{t('或')}</AuthDivider>
|
||||||
<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
|
<Button
|
||||||
|
theme='solid'
|
||||||
|
block
|
||||||
|
className='auth-login-submit'
|
||||||
|
icon={<IconMail />}
|
||||||
onClick={handleEmailRegisterClick}
|
onClick={handleEmailRegisterClick}
|
||||||
disabled={emailRegisterLoading}
|
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('使用 用户名 注册')}
|
{t('使用 用户名 注册')}
|
||||||
</span>
|
</Button>
|
||||||
<ActionArrowRight
|
|
||||||
size={16}
|
|
||||||
className='relative z-10 group-hover:translate-x-1 transition-transform'
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{(hasUserAgreement || hasPrivacyPolicy) && (
|
{(hasUserAgreement || hasPrivacyPolicy) && (
|
||||||
<div className='mt-4 flex justify-center'>
|
<div className='auth-login-agreement flex justify-center'>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={agreedToTerms}
|
checked={agreedToTerms}
|
||||||
onChange={(e) => setAgreedToTerms(e.target.checked)}
|
onChange={(e) => setAgreedToTerms(e.target.checked)}
|
||||||
@@ -662,7 +633,7 @@ const RegisterForm = () => {
|
|||||||
</div>
|
</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'>
|
<Text className='text-gray-500 dark:text-gray-400 text-xs'>
|
||||||
{t('已有账户?')}{' '}
|
{t('已有账户?')}{' '}
|
||||||
<Link
|
<Link
|
||||||
@@ -675,7 +646,7 @@ const RegisterForm = () => {
|
|||||||
</div>
|
</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} />
|
<Shield size={12} />
|
||||||
<span>{t('安全注册')}</span>
|
<span>{t('安全注册')}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -694,8 +665,7 @@ const RegisterForm = () => {
|
|||||||
logoWrapperClassName='mb-2'
|
logoWrapperClassName='mb-2'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Form className='register-compact-form auth-glass-form'>
|
<Form className='auth-login-form'>
|
||||||
{/* 用户名输入框 —— 玻璃观感统一由 .auth-glass-form(GlassCard 内置样式)驱动 */}
|
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='username'
|
field='username'
|
||||||
label={
|
label={
|
||||||
@@ -705,7 +675,6 @@ const RegisterForm = () => {
|
|||||||
}
|
}
|
||||||
placeholder={t('请输入用户名')}
|
placeholder={t('请输入用户名')}
|
||||||
name='username'
|
name='username'
|
||||||
size='large'
|
|
||||||
autoComplete='username'
|
autoComplete='username'
|
||||||
onChange={(value) => handleChange('username', value)}
|
onChange={(value) => handleChange('username', value)}
|
||||||
prefix={<IconUser size='small' />}
|
prefix={<IconUser size='small' />}
|
||||||
@@ -722,7 +691,6 @@ const RegisterForm = () => {
|
|||||||
placeholder={t('输入密码,最短 8 位,最长 20 位')}
|
placeholder={t('输入密码,最短 8 位,最长 20 位')}
|
||||||
name='password'
|
name='password'
|
||||||
mode='password'
|
mode='password'
|
||||||
size='large'
|
|
||||||
autoComplete='new-password'
|
autoComplete='new-password'
|
||||||
onChange={(value) => handleChange('password', value)}
|
onChange={(value) => handleChange('password', value)}
|
||||||
prefix={<IconLock size='small' />}
|
prefix={<IconLock size='small' />}
|
||||||
@@ -739,7 +707,6 @@ const RegisterForm = () => {
|
|||||||
placeholder={t('确认密码')}
|
placeholder={t('确认密码')}
|
||||||
name='password2'
|
name='password2'
|
||||||
mode='password'
|
mode='password'
|
||||||
size='large'
|
|
||||||
autoComplete='new-password'
|
autoComplete='new-password'
|
||||||
onChange={(value) => handleChange('password2', value)}
|
onChange={(value) => handleChange('password2', value)}
|
||||||
prefix={<IconLock size='small' />}
|
prefix={<IconLock size='small' />}
|
||||||
@@ -757,7 +724,6 @@ const RegisterForm = () => {
|
|||||||
placeholder={t('输入邮箱地址')}
|
placeholder={t('输入邮箱地址')}
|
||||||
name='email'
|
name='email'
|
||||||
type='email'
|
type='email'
|
||||||
size='large'
|
|
||||||
autoComplete='email'
|
autoComplete='email'
|
||||||
onChange={(value) => handleChange('email', value)}
|
onChange={(value) => handleChange('email', value)}
|
||||||
prefix={<IconMail size='small' />}
|
prefix={<IconMail size='small' />}
|
||||||
@@ -784,7 +750,6 @@ const RegisterForm = () => {
|
|||||||
}
|
}
|
||||||
placeholder={t('输入验证码')}
|
placeholder={t('输入验证码')}
|
||||||
name='verification_code'
|
name='verification_code'
|
||||||
size='large'
|
|
||||||
onChange={(value) => handleChange('verification_code', value)}
|
onChange={(value) => handleChange('verification_code', value)}
|
||||||
prefix={<IconKey size='small' />}
|
prefix={<IconKey size='small' />}
|
||||||
/>
|
/>
|
||||||
@@ -792,7 +757,7 @@ const RegisterForm = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{(hasUserAgreement || hasPrivacyPolicy) && (
|
{(hasUserAgreement || hasPrivacyPolicy) && (
|
||||||
<div className='flex items-center mt-3'>
|
<div className='flex items-center'>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={agreedToTerms}
|
checked={agreedToTerms}
|
||||||
onChange={(e) => setAgreedToTerms(e.target.checked)}
|
onChange={(e) => setAgreedToTerms(e.target.checked)}
|
||||||
@@ -827,34 +792,23 @@ const RegisterForm = () => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className='space-y-2 mt-3'>
|
<div className='auth-login-actions'>
|
||||||
{/* 注册按钮 */}
|
{/* 注册按钮:与登录按钮同款实心主按钮(36px),保留原提交触发与禁用条件 */}
|
||||||
<button
|
<Button
|
||||||
type='submit'
|
theme='solid'
|
||||||
|
htmlType='submit'
|
||||||
|
block
|
||||||
|
className='auth-login-submit'
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
|
loading={registerLoading}
|
||||||
disabled={
|
disabled={
|
||||||
registerLoading ||
|
registerLoading ||
|
||||||
((hasUserAgreement || hasPrivacyPolicy) && !agreedToTerms)
|
((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'
|
|
||||||
>
|
>
|
||||||
{/* 闪光效果 */}
|
<span className='font-semibold'>{t('注 册')}</span>
|
||||||
<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' />
|
<ActionArrowRight size={16} />
|
||||||
|
</Button>
|
||||||
{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>
|
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
@@ -865,29 +819,20 @@ const RegisterForm = () => {
|
|||||||
status.wechat_open_oauth ||
|
status.wechat_open_oauth ||
|
||||||
status.linuxdo_oauth ||
|
status.linuxdo_oauth ||
|
||||||
status.telegram_oauth) && (
|
status.telegram_oauth) && (
|
||||||
<div className='mt-2'>
|
<div>
|
||||||
<div className='relative py-3'>
|
<AuthDivider>{t('或')}</AuthDivider>
|
||||||
<div className='absolute inset-0 flex items-center'>
|
<Button
|
||||||
<div className='w-full border-t border-gray-200/80 dark:border-white/[0.08]'></div>
|
block
|
||||||
</div>
|
className='auth-oauth-button'
|
||||||
<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
|
|
||||||
onClick={handleOtherRegisterOptionsClick}
|
onClick={handleOtherRegisterOptionsClick}
|
||||||
disabled={otherRegisterOptionsLoading}
|
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('其他注册选项')}
|
{t('其他注册选项')}
|
||||||
</button>
|
</Button>
|
||||||
</div>
|
</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'>
|
<Text className='text-gray-500 dark:text-gray-400 text-xs'>
|
||||||
{t('已有账户?')}{' '}
|
{t('已有账户?')}{' '}
|
||||||
<Link
|
<Link
|
||||||
@@ -900,7 +845,7 @@ const RegisterForm = () => {
|
|||||||
</div>
|
</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} />
|
<Shield size={12} />
|
||||||
<span>{t('安全注册')}</span>
|
<span>{t('安全注册')}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -932,7 +877,7 @@ const RegisterForm = () => {
|
|||||||
okButtonProps={{
|
okButtonProps={{
|
||||||
loading: wechatCodeSubmitLoading,
|
loading: wechatCodeSubmitLoading,
|
||||||
}}
|
}}
|
||||||
className='wechat-login-modal'
|
className='wechat-login-modal auth-login-modal'
|
||||||
>
|
>
|
||||||
{/* 移动端提示 */}
|
{/* 移动端提示 */}
|
||||||
{isMobileView && !isInWeChat && (
|
{isMobileView && !isInWeChat && (
|
||||||
@@ -995,7 +940,6 @@ const RegisterForm = () => {
|
|||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
handleChange('wechat_verification_code', value)
|
handleChange('wechat_verification_code', value)
|
||||||
}
|
}
|
||||||
className='!rounded-xl'
|
|
||||||
/>
|
/>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1089,7 +1033,7 @@ const RegisterForm = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<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 跑马灯占位高度,保证占位+容器恰为一屏,避免幽灵滚动
|
// 抵扣 PageLayout 跑马灯占位高度,保证占位+容器恰为一屏,避免幽灵滚动
|
||||||
style={{ minHeight: 'calc(100vh - var(--content-top-offset, 0px))' }}
|
style={{ minHeight: 'calc(100vh - var(--content-top-offset, 0px))' }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
|||||||
value={verificationCode}
|
value={verificationCode}
|
||||||
onChange={setVerificationCode}
|
onChange={setVerificationCode}
|
||||||
onKeyPress={handleKeyPress}
|
onKeyPress={handleKeyPress}
|
||||||
size='large'
|
|
||||||
style={{ marginBottom: 16 }}
|
style={{ marginBottom: 16 }}
|
||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
@@ -98,7 +97,6 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
|||||||
type='primary'
|
type='primary'
|
||||||
loading={loading}
|
loading={loading}
|
||||||
block
|
block
|
||||||
size='large'
|
|
||||||
style={{ marginBottom: 16 }}
|
style={{ marginBottom: 16 }}
|
||||||
>
|
>
|
||||||
{t('验证并登录')}
|
{t('验证并登录')}
|
||||||
@@ -115,7 +113,8 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
|||||||
setUseBackupCode(!useBackupCode);
|
setUseBackupCode(!useBackupCode);
|
||||||
setVerificationCode('');
|
setVerificationCode('');
|
||||||
}}
|
}}
|
||||||
style={{ marginRight: 16, color: '#1890ff', padding: 0 }}
|
style={{ marginRight: 16, padding: 0 }}
|
||||||
|
className='!text-brand'
|
||||||
>
|
>
|
||||||
{useBackupCode ? t('使用认证器验证码') : t('使用备用码')}
|
{useBackupCode ? t('使用认证器验证码') : t('使用备用码')}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -125,7 +124,8 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
|||||||
theme='borderless'
|
theme='borderless'
|
||||||
type='tertiary'
|
type='tertiary'
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
style={{ color: '#1890ff', padding: 0 }}
|
style={{ padding: 0 }}
|
||||||
|
className='!text-brand'
|
||||||
>
|
>
|
||||||
{t('返回登录')}
|
{t('返回登录')}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -177,7 +177,6 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
|||||||
value={verificationCode}
|
value={verificationCode}
|
||||||
onChange={setVerificationCode}
|
onChange={setVerificationCode}
|
||||||
onKeyPress={handleKeyPress}
|
onKeyPress={handleKeyPress}
|
||||||
size='large'
|
|
||||||
style={{ marginBottom: 16 }}
|
style={{ marginBottom: 16 }}
|
||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
@@ -187,7 +186,6 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
|||||||
type='primary'
|
type='primary'
|
||||||
loading={loading}
|
loading={loading}
|
||||||
block
|
block
|
||||||
size='large'
|
|
||||||
style={{ marginBottom: 16 }}
|
style={{ marginBottom: 16 }}
|
||||||
>
|
>
|
||||||
{t('验证并登录')}
|
{t('验证并登录')}
|
||||||
@@ -204,7 +202,8 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
|||||||
setUseBackupCode(!useBackupCode);
|
setUseBackupCode(!useBackupCode);
|
||||||
setVerificationCode('');
|
setVerificationCode('');
|
||||||
}}
|
}}
|
||||||
style={{ marginRight: 16, color: '#1890ff', padding: 0 }}
|
style={{ marginRight: 16, padding: 0 }}
|
||||||
|
className='!text-brand'
|
||||||
>
|
>
|
||||||
{useBackupCode ? t('使用认证器验证码') : t('使用备用码')}
|
{useBackupCode ? t('使用认证器验证码') : t('使用备用码')}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -214,7 +213,8 @@ const TwoFAVerification = ({ onSuccess, onBack, isModal = false }) => {
|
|||||||
theme='borderless'
|
theme='borderless'
|
||||||
type='tertiary'
|
type='tertiary'
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
style={{ color: '#1890ff', padding: 0 }}
|
style={{ padding: 0 }}
|
||||||
|
className='!text-brand'
|
||||||
>
|
>
|
||||||
{t('返回登录')}
|
{t('返回登录')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -346,9 +346,10 @@ const PageLayout = () => {
|
|||||||
<Header
|
<Header
|
||||||
className={
|
className={
|
||||||
isAuthPage
|
isAuthPage
|
||||||
? ['/org/login', '/login'].includes(location.pathname)
|
? // 登录 / 注册 / 找回密码统一使用登录页同款标准顶栏;仅客户端授权页保留透明顶栏
|
||||||
? 'login-layout-header'
|
location.pathname.toLowerCase() === '/client/authorize'
|
||||||
: 'auth-layout-header'
|
? 'auth-layout-header'
|
||||||
|
: 'login-layout-header'
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ import { StatusContext } from '../../context/Status';
|
|||||||
import GlassCard from '../../components/auth/GlassCard';
|
import GlassCard from '../../components/auth/GlassCard';
|
||||||
import AuthCardHeader from '../../components/auth/AuthCardHeader';
|
import AuthCardHeader from '../../components/auth/AuthCardHeader';
|
||||||
import AuthLoginTabs from '../../components/auth/AuthLoginTabs';
|
import AuthLoginTabs from '../../components/auth/AuthLoginTabs';
|
||||||
|
import AuthDivider from '../../components/auth/AuthDivider';
|
||||||
import AuthBackground from '../../components/common/AuthBackground';
|
import AuthBackground from '../../components/common/AuthBackground';
|
||||||
|
|
||||||
const LAST_ORG_KEY = 'org_login_last';
|
const LAST_ORG_KEY = 'org_login_last';
|
||||||
@@ -626,11 +627,7 @@ const OrgLogin = () => {
|
|||||||
|
|
||||||
{selfRegisterEnabled && (
|
{selfRegisterEnabled && (
|
||||||
<>
|
<>
|
||||||
<div className='mt-1 flex items-center gap-3 text-xs text-gray-400'>
|
<AuthDivider>{t('还没有企业?')}</AuthDivider>
|
||||||
<span className='h-px flex-1 bg-gray-200 dark:bg-white/10' />
|
|
||||||
<span>{t('还没有企业?')}</span>
|
|
||||||
<span className='h-px flex-1 bg-gray-200 dark:bg-white/10' />
|
|
||||||
</div>
|
|
||||||
<Button
|
<Button
|
||||||
theme='borderless'
|
theme='borderless'
|
||||||
size='default'
|
size='default'
|
||||||
@@ -647,6 +644,7 @@ const OrgLogin = () => {
|
|||||||
|
|
||||||
{step === 2 && (
|
{step === 2 && (
|
||||||
<Form
|
<Form
|
||||||
|
className='auth-login-form'
|
||||||
onSubmit={doLogin}
|
onSubmit={doLogin}
|
||||||
initValues={{ login_name: prefilledLoginName }}
|
initValues={{ login_name: prefilledLoginName }}
|
||||||
>
|
>
|
||||||
@@ -719,12 +717,12 @@ const OrgLogin = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{step === 3 && (
|
{step === 3 && (
|
||||||
<Form onSubmit={doChangePassword}>
|
<Form className='auth-login-form' onSubmit={doChangePassword}>
|
||||||
<Banner
|
<Banner
|
||||||
type='warning'
|
type='warning'
|
||||||
closeIcon={null}
|
closeIcon={null}
|
||||||
description={t('首次登录需修改初始密码后方可使用。')}
|
description={t('首次登录需修改初始密码后方可使用。')}
|
||||||
className='mb-3'
|
className='auth-login-banner'
|
||||||
/>
|
/>
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='new_password'
|
field='new_password'
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import OrgCredentialResult from '../../components/auth/OrgCredentialResult';
|
|||||||
import GlassCard from '../../components/auth/GlassCard';
|
import GlassCard from '../../components/auth/GlassCard';
|
||||||
import AuthCardHeader from '../../components/auth/AuthCardHeader';
|
import AuthCardHeader from '../../components/auth/AuthCardHeader';
|
||||||
import AuthLoginTabs from '../../components/auth/AuthLoginTabs';
|
import AuthLoginTabs from '../../components/auth/AuthLoginTabs';
|
||||||
|
import AuthDivider from '../../components/auth/AuthDivider';
|
||||||
import AuthBackground from '../../components/common/AuthBackground';
|
import AuthBackground from '../../components/common/AuthBackground';
|
||||||
import {
|
import {
|
||||||
LOGIN_NAME_PATTERN,
|
LOGIN_NAME_PATTERN,
|
||||||
@@ -171,14 +172,9 @@ const OrgRegister = () => {
|
|||||||
type='info'
|
type='info'
|
||||||
closeIcon={null}
|
closeIcon={null}
|
||||||
description={t('当前未开放企业自助注册,请联系平台管理员开通企业。')}
|
description={t('当前未开放企业自助注册,请联系平台管理员开通企业。')}
|
||||||
className='mb-4'
|
className='auth-login-banner'
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button theme='solid' block onClick={() => navigate('/org/login')}>
|
||||||
theme='solid'
|
|
||||||
size='large'
|
|
||||||
block
|
|
||||||
onClick={() => navigate('/org/login')}
|
|
||||||
>
|
|
||||||
{t('返回企业登录')}
|
{t('返回企业登录')}
|
||||||
</Button>
|
</Button>
|
||||||
</GlassCard>
|
</GlassCard>
|
||||||
@@ -209,30 +205,19 @@ const OrgRegister = () => {
|
|||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<style>{`
|
|
||||||
.org-register-form .ant-form-item {
|
|
||||||
margin-bottom: 14px !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
.org-register-form .ant-form-item-label {
|
|
||||||
margin-bottom: 6px !important;
|
|
||||||
}
|
|
||||||
`}</style>
|
|
||||||
<Form
|
<Form
|
||||||
className='org-register-form auth-glass-form'
|
className='auth-login-form'
|
||||||
getFormApi={(api) => (formApi.current = api)}
|
getFormApi={(api) => (formApi.current = api)}
|
||||||
onValueChange={(v) => setValues(v)}
|
onValueChange={(v) => setValues(v)}
|
||||||
>
|
>
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='name'
|
field='name'
|
||||||
size='large'
|
|
||||||
label={t('企业名称')}
|
label={t('企业名称')}
|
||||||
placeholder={t('请输入企业名称(登录时可用于搜索定位)')}
|
placeholder={t('请输入企业名称(登录时可用于搜索定位)')}
|
||||||
rules={[{ required: true, message: t('请输入企业名称') }]}
|
rules={[{ required: true, message: t('请输入企业名称') }]}
|
||||||
/>
|
/>
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='owner_login_name'
|
field='owner_login_name'
|
||||||
size='large'
|
|
||||||
label={t('管理员登录名')}
|
label={t('管理员登录名')}
|
||||||
placeholder={t('请设置管理员登录名,如 zhang.san')}
|
placeholder={t('请设置管理员登录名,如 zhang.san')}
|
||||||
extraText={t(
|
extraText={t(
|
||||||
@@ -254,19 +239,16 @@ const OrgRegister = () => {
|
|||||||
/>
|
/>
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='owner_display_name'
|
field='owner_display_name'
|
||||||
size='large'
|
|
||||||
label={t('管理员显示名')}
|
label={t('管理员显示名')}
|
||||||
placeholder={t('选填')}
|
placeholder={t('选填')}
|
||||||
/>
|
/>
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='contact_name'
|
field='contact_name'
|
||||||
size='large'
|
|
||||||
label={t('联系人')}
|
label={t('联系人')}
|
||||||
placeholder={t('选填')}
|
placeholder={t('选填')}
|
||||||
/>
|
/>
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='contact_email'
|
field='contact_email'
|
||||||
size='large'
|
|
||||||
label={t('联系邮箱')}
|
label={t('联系邮箱')}
|
||||||
placeholder={t('用于接收通知')}
|
placeholder={t('用于接收通知')}
|
||||||
rules={
|
rules={
|
||||||
@@ -292,7 +274,6 @@ const OrgRegister = () => {
|
|||||||
{emailVerifyEnabled && (
|
{emailVerifyEnabled && (
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='verify_code'
|
field='verify_code'
|
||||||
size='large'
|
|
||||||
label={t('邮箱验证码')}
|
label={t('邮箱验证码')}
|
||||||
placeholder={t('请输入验证码')}
|
placeholder={t('请输入验证码')}
|
||||||
rules={[{ required: true, message: t('请输入验证码') }]}
|
rules={[{ required: true, message: t('请输入验证码') }]}
|
||||||
@@ -300,17 +281,16 @@ const OrgRegister = () => {
|
|||||||
)}
|
)}
|
||||||
<Form.Input
|
<Form.Input
|
||||||
field='contact_phone'
|
field='contact_phone'
|
||||||
size='large'
|
|
||||||
label={t('联系电话')}
|
label={t('联系电话')}
|
||||||
placeholder={t('选填')}
|
placeholder={t('选填')}
|
||||||
/>
|
/>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<div className='mt-5'>
|
<div className='auth-login-actions'>
|
||||||
<Button
|
<Button
|
||||||
theme='solid'
|
theme='solid'
|
||||||
size='large'
|
|
||||||
block
|
block
|
||||||
|
className='auth-login-submit'
|
||||||
loading={submitting}
|
loading={submitting}
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
>
|
>
|
||||||
@@ -318,14 +298,9 @@ const OrgRegister = () => {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='mt-4 flex items-center gap-3 text-xs text-gray-400'>
|
<AuthDivider>{t('已有企业?')}</AuthDivider>
|
||||||
<span className='h-px flex-1 bg-gray-200 dark:bg-white/10' />
|
|
||||||
<span>{t('已有企业?')}</span>
|
|
||||||
<span className='h-px flex-1 bg-gray-200 dark:bg-white/10' />
|
|
||||||
</div>
|
|
||||||
<Button
|
<Button
|
||||||
theme='borderless'
|
theme='borderless'
|
||||||
size='large'
|
|
||||||
block
|
block
|
||||||
className='!text-brand'
|
className='!text-brand'
|
||||||
onClick={() => navigate('/org/login')}
|
onClick={() => navigate('/org/login')}
|
||||||
@@ -340,7 +315,7 @@ const OrgRegister = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<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 跑马灯占位高度,保证占位+容器恰为一屏,避免幽灵滚动
|
// 抵扣 PageLayout 跑马灯占位高度,保证占位+容器恰为一屏,避免幽灵滚动
|
||||||
style={{ minHeight: 'calc(100vh - var(--content-top-offset, 0px))' }}
|
style={{ minHeight: 'calc(100vh - var(--content-top-offset, 0px))' }}
|
||||||
>
|
>
|
||||||
|
|||||||
+134
-5
@@ -340,7 +340,7 @@ html.dark body[data-ui-scope='admin'] {
|
|||||||
.ui-header-navigation .ui-header-nav-item.nav-item-active::after {
|
.ui-header-navigation .ui-header-nav-item.nav-item-active::after {
|
||||||
border-bottom-color: var(--ui-color-primary);
|
border-bottom-color: var(--ui-color-primary);
|
||||||
}
|
}
|
||||||
/* Other auth pages retain their continuous background. Login uses the standard header. */
|
/* 客户端授权页保留透出背景的顶栏;登录 / 注册 / 找回密码统一使用标准登录顶栏。 */
|
||||||
body[data-ui-scope='admin'] .auth-layout-header,
|
body[data-ui-scope='admin'] .auth-layout-header,
|
||||||
body[data-ui-scope='admin'] .auth-layout-header header {
|
body[data-ui-scope='admin'] .auth-layout-header header {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -365,8 +365,9 @@ body[data-ui-scope='admin'] .auth-layout-header header {
|
|||||||
transform: none;
|
transform: none;
|
||||||
transition: none;
|
transition: none;
|
||||||
}
|
}
|
||||||
|
/* 字段节奏统一 24px:与必填字段预留的一行报错高度一致,报错出现时布局不跳动 */
|
||||||
.auth-login-page .ant-form-item {
|
.auth-login-page .ant-form-item {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
/* Zero margin avoids Ant Form's error compensation; control height reserves one error line. */
|
/* Zero margin avoids Ant Form's error compensation; control height reserves one error line. */
|
||||||
.auth-login-page .auth-login-required-field {
|
.auth-login-page .auth-login-required-field {
|
||||||
@@ -374,7 +375,7 @@ body[data-ui-scope='admin'] .auth-layout-header header {
|
|||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
.auth-login-page .auth-login-required-field .ant-form-item-control {
|
.auth-login-page .auth-login-required-field .ant-form-item-control {
|
||||||
min-height: 58px;
|
min-height: calc(var(--auth-control-height) + 24px);
|
||||||
}
|
}
|
||||||
.auth-login-page .ant-form-item-label {
|
.auth-login-page .ant-form-item-label {
|
||||||
padding-bottom: 6px;
|
padding-bottom: 6px;
|
||||||
@@ -390,7 +391,8 @@ body[data-ui-scope='admin'] .auth-layout-header header {
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
.auth-login-fields .ant-form-item {
|
.auth-login-fields .ant-form-item {
|
||||||
margin-bottom: 0;
|
/* 与 gap 12px 叠加后字段节奏同为 24px,和其他认证表单一致 */
|
||||||
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
.auth-login-page .auth-login-actions {
|
.auth-login-page .auth-login-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -428,9 +430,136 @@ body[data-ui-scope='admin'] .auth-layout-header header {
|
|||||||
color: color-mix(in srgb, var(--ui-color-text-1) 50%, black);
|
color: color-mix(in srgb, var(--ui-color-text-1) 50%, black);
|
||||||
}
|
}
|
||||||
.auth-login-page .auth-login-register {
|
.auth-login-page .auth-login-register {
|
||||||
margin-top: 12px;
|
margin-top: 16px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* 认证页统一视觉:/login、/org/login、/org/:slug/login、/register、/org/register、
|
||||||
|
* /reset、/user/reset 及其弹窗(两步验证、微信验证码)。
|
||||||
|
* 控件统一 36px 高、8px 圆角;间距统一 4 的倍数;去掉光晕 / 漂移光斑 / 星标等装饰。
|
||||||
|
*/
|
||||||
|
.auth-login-page,
|
||||||
|
.auth-login-modal {
|
||||||
|
--auth-control-height: 36px;
|
||||||
|
}
|
||||||
|
.auth-login-page .login-card-glow,
|
||||||
|
.auth-login-page .login-card-halo,
|
||||||
|
.auth-login-page .login-glass-aurora,
|
||||||
|
.auth-login-page .auth-card-logo-halo,
|
||||||
|
.auth-login-page .auth-card-sparkle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-card-header {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-card-logo {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-card-logo-box {
|
||||||
|
box-shadow: none;
|
||||||
|
border: 1px solid var(--ui-color-border-light);
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-card-title {
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 28px;
|
||||||
|
font-weight: 650;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-card-subtitle {
|
||||||
|
margin-top: 2px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
/* 输入框 / 密码框 / 下拉(含 AutoComplete)统一 36px */
|
||||||
|
.auth-login-page .ant-input-affix-wrapper,
|
||||||
|
.auth-login-page input.ant-input-outlined,
|
||||||
|
.auth-login-modal .ant-input-affix-wrapper,
|
||||||
|
.auth-login-modal input.ant-input-outlined {
|
||||||
|
height: var(--auth-control-height);
|
||||||
|
padding-block: 0;
|
||||||
|
border-radius: var(--ui-border-radius-medium);
|
||||||
|
}
|
||||||
|
.auth-login-page .ant-select-single,
|
||||||
|
.auth-login-page .ant-select-single .ant-select-selector {
|
||||||
|
height: var(--auth-control-height);
|
||||||
|
border-radius: var(--ui-border-radius-medium);
|
||||||
|
}
|
||||||
|
/* 主按钮 / 整行按钮 / 弹窗底部按钮统一 36px */
|
||||||
|
.auth-login-page .ant-btn-block,
|
||||||
|
.auth-login-modal .ant-btn-block,
|
||||||
|
.auth-login-modal .ant-modal-footer .ant-btn {
|
||||||
|
height: var(--auth-control-height);
|
||||||
|
border-radius: var(--ui-border-radius-medium);
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-login-submit {
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-oauth-button {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-oauth-icon {
|
||||||
|
display: inline-flex;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-oauth-icon svg {
|
||||||
|
max-width: 16px;
|
||||||
|
max-height: 16px;
|
||||||
|
}
|
||||||
|
/* 第三方登录列表:8px 行距,分隔线上下对称 */
|
||||||
|
.auth-login-page .auth-option-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-option-list .auth-divider {
|
||||||
|
margin-block: 4px;
|
||||||
|
}
|
||||||
|
.auth-divider {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
margin-block: 16px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 18px;
|
||||||
|
color: var(--ui-color-text-2);
|
||||||
|
}
|
||||||
|
.auth-divider-line {
|
||||||
|
flex: 1;
|
||||||
|
height: 1px;
|
||||||
|
background: var(--ui-color-border-light);
|
||||||
|
}
|
||||||
|
.auth-login-fields .auth-divider {
|
||||||
|
margin-block: 4px 0;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-login-agreement {
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-login-banner {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
.auth-login-page .auth-login-security {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 6px;
|
||||||
|
margin-top: 12px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 18px;
|
||||||
|
color: var(--ui-color-text-2);
|
||||||
|
}
|
||||||
|
.auth-modal-title-icon {
|
||||||
|
display: inline-flex;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: var(--ui-border-radius-medium);
|
||||||
|
background: var(--ui-color-highlight-bg);
|
||||||
|
color: var(--ui-color-focus-border);
|
||||||
|
}
|
||||||
body[data-ui-scope='admin'] [data-page-background] {
|
body[data-ui-scope='admin'] [data-page-background] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user