1
This commit is contained in:
@@ -202,7 +202,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
padding: 32px 16px;
|
||||
padding: 40px 24px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1;
|
||||
padding: 16px 16px 32px;
|
||||
padding: 20px 24px 40px;
|
||||
}
|
||||
|
||||
@media (min-width: 900px) {
|
||||
@@ -238,14 +238,3 @@
|
||||
padding: 40px 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.login-left-section {
|
||||
padding: 24px 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-right-section {
|
||||
padding: 12px 12px 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,21 +505,13 @@ const AppLayout: React.FC = () => {
|
||||
display: 'flex', alignItems: 'center',
|
||||
justifyContent: 'flex-start',
|
||||
gap: 10,
|
||||
padding: depth > 0 ? '8px 12px 8px 32px' : '8px 14px',
|
||||
borderRadius: 12, margin: '2px 4px', cursor: 'pointer',
|
||||
padding: depth > 0 ? '6px 12px 6px 32px' : '6px 14px',
|
||||
borderRadius: 12, margin: '1px 4px', cursor: 'pointer',
|
||||
fontSize: depth > 0 ? 13 : 14, fontWeight: isActive ? 600 : 400,
|
||||
color: isActive ? '#4f46e5' : '#475569',
|
||||
background: isActive ? 'linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)' : 'transparent',
|
||||
transition: 'all 0.2s ease',
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
e.currentTarget.style.background = 'rgba(99, 102, 241, 0.05)';
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
if (!isActive) {
|
||||
e.currentTarget.style.background = 'transparent';
|
||||
}
|
||||
}}
|
||||
>
|
||||
<span style={{
|
||||
fontSize: depth > 0 ? 14 : 16,
|
||||
@@ -554,51 +546,23 @@ const AppLayout: React.FC = () => {
|
||||
|
||||
topLevelItems.forEach(item => {
|
||||
const menuType = item.menu_type ?? item.menuType;
|
||||
const hasChildren = childMap[item.id] && childMap[item.id].length > 0;
|
||||
const isExpanded = collapsedGroups[item.id] !== true;
|
||||
|
||||
|
||||
if (menuType === 'group') {
|
||||
items.push(
|
||||
<div key={item.id}>
|
||||
<div
|
||||
onClick={() => {
|
||||
setCollapsedGroups(prev => ({
|
||||
...prev,
|
||||
[item.id]: !prev[item.id]
|
||||
}));
|
||||
}}
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
color: '#94a3b8', fontSize: 12, fontWeight: 600,
|
||||
padding: '10px 14px 4px', letterSpacing: 0.5, textTransform: 'uppercase',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
>
|
||||
<span>{item.label}</span>
|
||||
<span style={{
|
||||
fontSize: 12,
|
||||
color: '#cbd5e1',
|
||||
transition: 'transform 0.2s ease',
|
||||
transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)',
|
||||
}}>
|
||||
<RightOutlined />
|
||||
</span>
|
||||
<div style={{
|
||||
color: '#94a3b8', fontSize: 12, fontWeight: 600,
|
||||
padding: '10px 14px 4px', letterSpacing: 0.5, textTransform: 'uppercase',
|
||||
}}>
|
||||
{item.label}
|
||||
</div>
|
||||
{isExpanded && (
|
||||
<div style={{ overflow: 'hidden' }}>
|
||||
{(childMap[item.id] || []).sort((a, b) => {
|
||||
const orderA = typeof a.sortOrder === 'number' ? a.sortOrder : Infinity;
|
||||
const orderB = typeof b.sortOrder === 'number' ? b.sortOrder : Infinity;
|
||||
return orderA - orderB;
|
||||
}).map(c => renderMenuItem(c, 1))}
|
||||
</div>
|
||||
)}
|
||||
{(childMap[item.id] || []).sort((a, b) => {
|
||||
const orderA = typeof a.sortOrder === 'number' ? a.sortOrder : Infinity;
|
||||
const orderB = typeof b.sortOrder === 'number' ? b.sortOrder : Infinity;
|
||||
return orderA - orderB;
|
||||
}).map(c => renderMenuItem(c, 1))}
|
||||
</div>
|
||||
);
|
||||
} else if (hasChildren) {
|
||||
items.push(renderMenuItem(item));
|
||||
} else {
|
||||
items.push(renderMenuItem(item));
|
||||
}
|
||||
|
||||
@@ -372,10 +372,10 @@ const LoginPage: React.FC = () => {
|
||||
{/* Right side - login/register form */}
|
||||
<div className="login-right-section">
|
||||
<Card style={{
|
||||
width: '100%', maxWidth: 400, borderRadius: 16,
|
||||
boxShadow: '0 12px 40px rgba(0,0,0,0.08)',
|
||||
width: '100%', maxWidth: 440, borderRadius: 20,
|
||||
boxShadow: '0 20px 60px rgba(0,0,0,0.08)',
|
||||
border: '1px solid #e2e8f0', background: '#fff',
|
||||
}} styles={{ body: { padding: '24px 20px' } }}>
|
||||
}} styles={{ body: { padding: '28px 24px' } }}>
|
||||
<Typography.Title level={3} style={{ textAlign: 'center', marginBottom: 6, color: '#1e293b', fontWeight: 700 }}>
|
||||
{mode === 'register' ? '创建账号' : '欢迎回来'}
|
||||
</Typography.Title>
|
||||
|
||||
Reference in New Issue
Block a user