diff --git a/frontend/src/components/login/SidePanel.tsx b/frontend/src/components/login/SidePanel.tsx index 69fca83..427594a 100644 --- a/frontend/src/components/login/SidePanel.tsx +++ b/frontend/src/components/login/SidePanel.tsx @@ -1,180 +1,69 @@ import { useLogin } from '@/hooks/useLogin'; - -const features = ['SQL审核', '变更审批', '实时监控', '权限管理']; +import { useTheme } from '@/hooks/useTheme'; +import { Sun, Moon, Database } from 'lucide-react'; export default function SidePanel() { const { username, password, loading, error, setUsername, setPassword, handleLogin } = useLogin(); + const { toggleTheme, isDark } = useTheme(); return ( -
- {/* Left Panel — 38% Brand Area */} -
+ - {/* Top brand section */} -
- {/* Logo mark */} -
- - - - - -
+ {/* Left Panel — 40% */} +
+ {/* Decorative circles */} +
+
+
+
+
- {/* Stacked large text — left aligned */} -
-
- SQL审核 -
-
- 平台 -
-
-

- 企业级数据库审核与合规管理解决方案,为团队提供安全可靠的数据管理体验。 +

+ +

SQL审核平台

+

+ 为团队提供智能 SQL 审核、实时合规监控与数据库安全保障。

- - {/* Bottom feature pills */} -
- {features.map((tag) => ( - - {tag} - - ))} -
- {/* Right Panel — 62% Login Form */} -
-
-

- 欢迎回来 -

-

- 登录以继续 -

+ {/* Right Panel — Login Form */} +
+ +

欢迎回来

+

登录以访问控制台

- {error && ( -
- {error} -
- )} + {error &&
{error}
} -
- - setUsername(e.target.value)} - className="w-full" - style={{ - padding: '13px 16px', - borderRadius: 10, - background: 'var(--dg-bg-secondary)', - border: 'none', - color: 'var(--dg-text-primary)', - fontSize: 14, - outline: 'none', - transition: 'background 0.2s', - }} - onFocus={(e) => { e.target.style.background = 'var(--dg-bg-tertiary)'; }} - onBlur={(e) => { e.target.style.background = 'var(--dg-bg-secondary)'; }} - /> -
- -
- - setPassword(e.target.value)} - className="w-full" - style={{ - padding: '13px 16px', - borderRadius: 10, - background: 'var(--dg-bg-secondary)', - border: 'none', - color: 'var(--dg-text-primary)', - fontSize: 14, - outline: 'none', - transition: 'background 0.2s', - }} - onFocus={(e) => { e.target.style.background = 'var(--dg-bg-tertiary)'; }} - onBlur={(e) => { e.target.style.background = 'var(--dg-bg-secondary)'; }} - /> -
+ setUsername(e.target.value)} + style={{ padding: '10px 14px', borderRadius: 8, background: 'var(--dg-bg-tertiary)', border: '1px solid var(--dg-border)', color: 'var(--dg-text-primary)', fontSize: 14, outline: 'none' }} + /> + setPassword(e.target.value)} + style={{ padding: '10px 14px', borderRadius: 8, background: 'var(--dg-bg-tertiary)', border: '1px solid var(--dg-border)', color: 'var(--dg-text-primary)', fontSize: 14, outline: 'none' }} + /> diff --git a/frontend/src/pages/AppearanceSettings.tsx b/frontend/src/pages/AppearanceSettings.tsx index c760703..20a87f8 100644 --- a/frontend/src/pages/AppearanceSettings.tsx +++ b/frontend/src/pages/AppearanceSettings.tsx @@ -9,7 +9,7 @@ import { toast } from '@/hooks/useToast'; const LOGIN_PREVIEW_COLORS: Record = { split: { bg: 'linear-gradient(135deg, #080c14 0%, #0c1420 100%)', accent: '#00d4aa', label: '晶格科技' }, centered: { bg: 'linear-gradient(180deg, #0a0a1a 0%, #1a1035 50%, #2d1810 100%)', accent: '#fbbf24', label: '晨曦微光' }, - sidepanel: { bg: 'linear-gradient(180deg, #111827 0%, #1f2937 100%)', accent: '#6366f1', label: '简洁专业' }, + sidepanel: { bg: 'linear-gradient(180deg, #111827 0%, #1f2937 100%)', accent: '#6366f1', label: '经典侧边' }, fullimage: { bg: '#0d1117', accent: '#6366f1', label: 'GitHub/AWS' }, minimal: { bg: 'linear-gradient(160deg, #0a0a1a 0%, #0f0a2a 40%, #150825 70%, #0a0a1a 100%)', accent: '#ec4899', label: 'Premium Dark' }, aurora: { bg: 'linear-gradient(180deg, #050810 0%, #0a0e1a 30%, #0d1425 60%, #080c14 100%)', accent: '#10b981', label: '极光之境' }, @@ -178,24 +178,19 @@ export default function AppearanceSettings() { )} {opt.id === 'sidepanel' && (
-
- {/* Brand area */} -
-
-
-
-
-
- {/* Feature pills */} -
- {['SQL审核', '变更审批', '监控'].map(t => ( - {t} - ))} -
+
+ {/* Decorative circles */} +
+
+
+ {/* Logo + text */} +
+
+
-
+
diff --git a/frontend/src/pages/LoginPage.tsx b/frontend/src/pages/LoginPage.tsx index 9945e13..64e3390 100644 --- a/frontend/src/pages/LoginPage.tsx +++ b/frontend/src/pages/LoginPage.tsx @@ -28,7 +28,7 @@ const LOGIN_STYLES: Record = { export const LOGIN_STYLE_OPTIONS: { id: LoginStyle; name: string; desc: string }[] = [ { id: 'split', name: '经典分屏', desc: '左黑右白,晶格科技感' }, { id: 'centered', name: '居中卡片', desc: '黎明光柱,金色晨曦氛围' }, - { id: 'sidepanel', name: '侧边面板', desc: '左品牌右登录,简洁专业' }, + { id: 'sidepanel', name: '侧边面板', desc: '左品牌右登录,渐变装饰圆圈' }, { id: 'fullimage', name: '全屏背景', desc: '科技背景,毛玻璃卡片' }, { id: 'minimal', name: '深蓝紫曲线', desc: '优雅暗黑,粉紫流动曲线' }, { id: 'aurora', name: '极光之境', desc: '北极光动态渐变,紫绿流光' },