fix: 功能展示风格提到第一位+比例优化 — 右侧400px更紧凑,左侧间距缩减,默认登录页改为sidepanel

This commit is contained in:
logan committed 2026-05-27 18:21:22 +08:00
1 parent f8b2266542
commit 492bf7f8e3
3 files changed
+21 -21

No files matched your search

+1 -1
View File
@@ -193,7 +193,7 @@ export default function AppearanceSettings() {
</div>
</div>
{/* Right: login form */}
<div className="w-[35%] p-1 flex flex-col justify-center gap-0.5" style={{ background: 'var(--dg-bg-secondary, rgba(255,255,255,0.03))' }}>
<div className="w-[30%] p-1 flex flex-col justify-center gap-0.5" style={{ background: 'var(--dg-bg-secondary, rgba(255,255,255,0.03))' }}>
<div className="w-3 h-0.5 rounded-sm" style={{ background: 'rgba(255,255,255,0.3)' }} />
<div className="w-full h-0.5 rounded-sm" style={{ background: 'var(--dg-bg-tertiary, rgba(255,255,255,0.08))' }} />
<div className="w-full h-0.5 rounded-sm" style={{ background: 'var(--dg-bg-tertiary, rgba(255,255,255,0.08))' }} />
+6 -6
View File
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import SidePanel from '@/components/login/SidePanel';
import SplitView from '@/components/login/SplitView';
import CenteredCard from '@/components/login/CenteredCard';
import SidePanel from '@/components/login/SidePanel';
import FullImage from '@/components/login/FullImage';
import MinimalDark from '@/components/login/MinimalDark';
import AuroraView from '@/components/login/AuroraView';
@@ -10,12 +10,12 @@ import InkWashView from '@/components/login/InkWashView';
import NeonCityView from '@/components/login/NeonCityView';
import GradientMeshView from '@/components/login/GradientMeshView';
export type LoginStyle = 'split' | 'centered' | 'sidepanel' | 'fullimage' | 'minimal' | 'aurora' | 'cosmos' | 'inkwash' | 'neoncity' | 'gradientmesh';
export type LoginStyle = 'sidepanel' | 'split' | 'centered' | 'fullimage' | 'minimal' | 'aurora' | 'cosmos' | 'inkwash' | 'neoncity' | 'gradientmesh';
const LOGIN_STYLES: Record<LoginStyle, React.ComponentType> = {
sidepanel: SidePanel,
split: SplitView,
centered: CenteredCard,
sidepanel: SidePanel,
fullimage: FullImage,
minimal: MinimalDark,
aurora: AuroraView,
@@ -26,9 +26,9 @@ const LOGIN_STYLES: Record<LoginStyle, React.ComponentType> = {
};
export const LOGIN_STYLE_OPTIONS: { id: LoginStyle; name: string; desc: string }[] = [
{ id: 'sidepanel', name: '功能展示', desc: '左品牌+功能卡片,右登录表单' },
{ id: 'split', name: '经典分屏', desc: '左黑右白,晶格科技感' },
{ id: 'centered', name: '居中卡片', desc: '黎明光柱,金色晨曦氛围' },
{ id: 'sidepanel', name: '侧边面板', desc: '左品牌+功能卡片,右登录表单' },
{ id: 'fullimage', name: '全屏背景', desc: '科技背景,毛玻璃卡片' },
{ id: 'minimal', name: '深蓝紫曲线', desc: '优雅暗黑,粉紫流动曲线' },
{ id: 'aurora', name: '极光之境', desc: '北极光动态渐变,紫绿流光' },
@@ -39,7 +39,7 @@ export const LOGIN_STYLE_OPTIONS: { id: LoginStyle; name: string; desc: string }
];
export default function LoginPage() {
const [style, setStyle] = useState<LoginStyle>('split');
const [style, setStyle] = useState<LoginStyle>('sidepanel');
const [ready, setReady] = useState(false);
useEffect(() => {
@@ -64,6 +64,6 @@ export default function LoginPage() {
if (!ready) return null; // avoid flash
const Component = LOGIN_STYLES[style] || SplitView;
const Component = LOGIN_STYLES[style] || SidePanel;
return <Component />;
}