fix: garbled text, nav grouping, CSS improvements, dashboard demo data
This commit is contained in:
1 parent
9ed9961b50
commit
84c3d25c54
2 files changed
+651
-156
No files matched your search
@@ -3,29 +3,71 @@ import { Outlet, NavLink, useNavigate } from 'react-router-dom';
|
|||||||
import { useAuth } from '@/contexts/AuthContext';
|
import { useAuth } from '@/contexts/AuthContext';
|
||||||
import './AdminLayout.css';
|
import './AdminLayout.css';
|
||||||
|
|
||||||
const adminNavItems = [
|
interface NavItem {
|
||||||
{ path: '/admin', icon: 'dashboard', label: '平台驾驶舱', exact: true },
|
path: string;
|
||||||
{ path: '/admin/users', icon: 'users', label: '用户管理' },
|
icon: string;
|
||||||
{ path: '/admin/models', icon: 'models', label: '大模型库管理' },
|
label: string;
|
||||||
{ path: '/admin/settings', icon: 'settings', label: '网站基础设置' },
|
exact?: boolean;
|
||||||
{ path: '/admin/payment', icon: 'payment', label: '支付渠道配置' },
|
}
|
||||||
{ path: '/admin/services', icon: 'services', label: '增值服务管理' },
|
|
||||||
{ path: '/admin/membership', icon: 'membership', label: '会员订阅体系' },
|
|
||||||
{ path: '/admin/ads', icon: 'ads', label: '广告位管理' },
|
|
||||||
{ path: '/admin/market', icon: 'market', label: '应用市场审核' },
|
|
||||||
{ path: '/admin/logs', icon: 'logs', label: '日志与风控' },
|
|
||||||
|
|
||||||
|
interface NavGroup {
|
||||||
|
title: string;
|
||||||
|
icon: string;
|
||||||
|
items: NavItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const adminNavGroups: NavGroup[] = [
|
||||||
|
{
|
||||||
|
title: '驾驶舱',
|
||||||
|
icon: 'dashboard',
|
||||||
|
items: [
|
||||||
|
{ path: '/admin', icon: 'dashboard', label: '平台驾驶舱', exact: true },
|
||||||
|
{ path: '/admin/analytics', icon: 'analytics', label: '数据分析' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'AI 能力',
|
||||||
|
icon: 'agents',
|
||||||
|
items: [
|
||||||
{ path: '/admin/agents', icon: 'agents', label: 'Agent 管理' },
|
{ path: '/admin/agents', icon: 'agents', label: 'Agent 管理' },
|
||||||
{ path: '/admin/skills', icon: 'skills', label: '技能管理' },
|
{ path: '/admin/skills', icon: 'skills', label: '技能管理' },
|
||||||
|
{ path: '/admin/models', icon: 'models', label: '大模型库' },
|
||||||
{ path: '/admin/code-exec', icon: 'code', label: '代码执行沙箱' },
|
{ path: '/admin/code-exec', icon: 'code', label: '代码执行沙箱' },
|
||||||
{ path: '/admin/distributions', icon: 'distro', label: '发行版构建' },
|
{ path: '/admin/market', icon: 'market', label: '应用市场审核' },
|
||||||
{ path: '/admin/privacy', icon: 'privacy', label: '隐私与本地代理' },
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '用户运营',
|
||||||
|
icon: 'users',
|
||||||
|
items: [
|
||||||
|
{ path: '/admin/users', icon: 'users', label: '用户管理' },
|
||||||
|
{ path: '/admin/membership', icon: 'membership', label: '会员订阅' },
|
||||||
{ path: '/admin/promotion', icon: 'promotion', label: '推广系统' },
|
{ path: '/admin/promotion', icon: 'promotion', label: '推广系统' },
|
||||||
{ path: '/admin/achievement', icon: 'achievement', label: '成就系统' },
|
{ path: '/admin/achievement', icon: 'achievement', label: '成就系统' },
|
||||||
{ path: '/admin/tenant', icon: 'tenant', label: '多租户管理' },
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商业变现',
|
||||||
|
icon: 'billing',
|
||||||
|
items: [
|
||||||
{ path: '/admin/billing', icon: 'billing', label: '计费与支付' },
|
{ path: '/admin/billing', icon: 'billing', label: '计费与支付' },
|
||||||
{ path: '/admin/analytics', icon: 'analytics', label: '数据分析' },
|
{ path: '/admin/payment', icon: 'payment', label: '支付渠道配置' },
|
||||||
|
{ path: '/admin/services', icon: 'services', label: '增值服务' },
|
||||||
|
{ path: '/admin/ads', icon: 'ads', label: '广告位管理' },
|
||||||
|
{ path: '/admin/tenant', icon: 'tenant', label: '多租户管理' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '系统管理',
|
||||||
|
icon: 'settings',
|
||||||
|
items: [
|
||||||
|
{ path: '/admin/settings', icon: 'settings', label: '网站设置' },
|
||||||
|
{ path: '/admin/logs', icon: 'logs', label: '日志与风控' },
|
||||||
{ path: '/admin/im-bots', icon: 'imbot', label: 'IM 机器人' },
|
{ path: '/admin/im-bots', icon: 'imbot', label: 'IM 机器人' },
|
||||||
|
{ path: '/admin/privacy', icon: 'privacy', label: '隐私与本地代理' },
|
||||||
|
{ path: '/admin/distributions', icon: 'distro', label: '发行版构建' },
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const adminIconPaths: Record<string, JSX.Element> = {
|
const adminIconPaths: Record<string, JSX.Element> = {
|
||||||
@@ -39,128 +81,97 @@ const adminIconPaths: Record<string, JSX.Element> = {
|
|||||||
ads: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>,
|
ads: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>,
|
||||||
market: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.2"/><rect x="14" y="3" width="7" height="7" rx="1.2"/><rect x="3" y="14" width="7" height="7" rx="1.2"/><rect x="14" y="14" width="7" height="7" rx="1.2"/></svg>,
|
market: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.2"/><rect x="14" y="3" width="7" height="7" rx="1.2"/><rect x="3" y="14" width="7" height="7" rx="1.2"/><rect x="14" y="14" width="7" height="7" rx="1.2"/></svg>,
|
||||||
logs: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>,
|
logs: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>,
|
||||||
|
agents: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="11" width="18" height="10" rx="2"/><circle cx="12" cy="5" r="2"/><path d="M12 7v4"/><line x1="8" y1="16" x2="8" y2="16"/><line x1="16" y1="16" x2="16" y2="16"/></svg>,
|
||||||
skills: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>,
|
skills: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>,
|
||||||
code: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>,
|
code: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>,
|
||||||
distro: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>,
|
distro: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>,
|
||||||
privacy: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
privacy: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/><circle cx="12" cy="16" r="1"/></svg>,
|
||||||
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/>
|
promotion: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="8" r="7"/><path d="M8.5 12.5L6 21l6-2 6 2-2.5-8.5"/><circle cx="12" cy="8" r="3"/></svg>,
|
||||||
<path d="M7 11V7a5 5 0 0 1 10 0v4"/>
|
achievement: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 7.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z"/></svg>,
|
||||||
<circle cx="12" cy="16" r="1"/>
|
tenant: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M3 21V8l9-5 9 5v13"/><path d="M9 21v-6h6v6"/><path d="M3 13h18"/></svg>,
|
||||||
</svg>,
|
billing: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><rect x="2" y="5" width="20" height="14" rx="2"/><line x1="2" y1="10" x2="22" y2="10"/><line x1="6" y1="15" x2="10" y2="15"/></svg>,
|
||||||
promotion: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
analytics: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/><line x1="3" y1="20" x2="21" y2="20"/></svg>,
|
||||||
<circle cx="12" cy="8" r="7"/>
|
imbot: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></svg>,
|
||||||
<path d="M8.5 12.5L6 21l6-2 6 2-2.5-8.5"/>
|
chevron: <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polyline points="6 9 12 15 18 9"/></svg>,
|
||||||
<circle cx="12" cy="8" r="3"/>
|
|
||||||
</svg>,
|
|
||||||
achievement: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
|
||||||
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 7.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z"/>
|
|
||||||
</svg>,
|
|
||||||
tenant: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
|
||||||
<path d="M3 21V8l9-5 9 5v13"/>
|
|
||||||
<path d="M9 21v-6h6v6"/>
|
|
||||||
<path d="M3 13h18"/>
|
|
||||||
</svg>,
|
|
||||||
billing: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
|
||||||
<rect x="2" y="5" width="20" height="14" rx="2"/>
|
|
||||||
<line x1="2" y1="10" x2="22" y2="10"/>
|
|
||||||
<line x1="6" y1="15" x2="10" y2="15"/>
|
|
||||||
</svg>,
|
|
||||||
analytics: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
|
||||||
<line x1="18" y1="20" x2="18" y2="10"/>
|
|
||||||
<line x1="12" y1="20" x2="12" y2="4"/>
|
|
||||||
<line x1="6" y1="20" x2="6" y2="14"/>
|
|
||||||
<line x1="3" y1="20" x2="21" y2="20"/>
|
|
||||||
</svg>,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const AdminLayout: React.FC = () => {
|
const AdminLayout: React.FC = () => {
|
||||||
const { user, logout } = useAuth();
|
const { user, logout } = useAuth();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [collapsed, setCollapsed] = useState(false);
|
const [collapsedGroups, setCollapsedGroups] = useState<Set<string>>(new Set());
|
||||||
|
|
||||||
if (!user || user.role !== 'admin') {
|
const toggleGroup = (title: string) => {
|
||||||
navigate('/login');
|
setCollapsedGroups(prev => {
|
||||||
return null;
|
const next = new Set(prev);
|
||||||
}
|
if (next.has(title)) next.delete(title);
|
||||||
|
else next.add(title);
|
||||||
|
return next;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleLogout = () => {
|
||||||
|
logout();
|
||||||
|
navigate('/');
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="admin-layout">
|
<div className="admin-layout">
|
||||||
{/* Admin Sidebar */}
|
<aside className="admin-sidebar">
|
||||||
<aside className={`admin-sidebar ${collapsed ? 'collapsed' : ''}`}>
|
|
||||||
<div className="admin-sidebar-header">
|
<div className="admin-sidebar-header">
|
||||||
<div className="sidebar-logo">
|
<h1 className="admin-logo">AIFlow</h1>
|
||||||
<svg width="28" height="28" viewBox="0 0 32 32" fill="none">
|
<span className="admin-subtitle">管理控制台</span>
|
||||||
<rect width="32" height="32" rx="8" fill="#1A1A2E"/>
|
|
||||||
<path d="M8 20V12l4 4 4-4v8" stroke="#6C63FF" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" fill="none"/>
|
|
||||||
<path d="M6 22h20" stroke="#6C63FF" strokeWidth="1.5" strokeLinecap="round" opacity="0.5"/>
|
|
||||||
</svg>
|
|
||||||
{!collapsed && <span className="sidebar-brand admin-brand">Qihu-AIFlow 管理后台</span>}
|
|
||||||
</div>
|
</div>
|
||||||
<button className="collapse-btn" onClick={() => setCollapsed(!collapsed)}>
|
<nav className="sidebar-nav">
|
||||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
{adminNavGroups.map((group) => {
|
||||||
<line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/>
|
const isCollapsed = collapsedGroups.has(group.title);
|
||||||
</svg>
|
const hasActiveChild = group.items.some(item =>
|
||||||
</button>
|
item.exact ? window.location.hash === `#${item.path}` : window.location.hash.startsWith(`#${item.path}`)
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<div key={group.title} className={`nav-group ${hasActiveChild ? 'nav-group-active' : ''}`}>
|
||||||
|
<div
|
||||||
|
className="nav-group-header"
|
||||||
|
onClick={() => toggleGroup(group.title)}
|
||||||
|
>
|
||||||
|
<span className="nav-group-icon">{adminIconPaths[group.icon]}</span>
|
||||||
|
<span className="nav-group-title">{group.title}</span>
|
||||||
|
<span className={`nav-group-chevron ${isCollapsed ? 'chevron-collapsed' : ''}`}>
|
||||||
|
{adminIconPaths.chevron}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
{!isCollapsed && (
|
||||||
<nav className="admin-nav">
|
<div className="nav-group-items">
|
||||||
{adminNavItems.map(item => (
|
{group.items.map((item) => (
|
||||||
<NavLink
|
<NavLink
|
||||||
key={item.path}
|
key={item.path}
|
||||||
to={item.path}
|
to={item.path}
|
||||||
end={item.exact}
|
end={item.exact}
|
||||||
className={({ isActive }) => `admin-nav-item ${isActive ? 'active' : ''}`}
|
className={({ isActive }) =>
|
||||||
|
`nav-item ${isActive ? 'nav-item-active' : ''}`
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<span className="nav-icon">{adminIconPaths[item.icon]}</span>
|
<span className="nav-item-icon">{adminIconPaths[item.icon]}</span>
|
||||||
{!collapsed && <span className="nav-label">{item.label}</span>}
|
<span className="nav-item-label">{item.label}</span>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
))}
|
))}
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div className="admin-sidebar-footer">
|
|
||||||
<NavLink to="/chat" className="admin-nav-item">
|
|
||||||
<span className="nav-icon">
|
|
||||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
|
|
||||||
</span>
|
|
||||||
{!collapsed && <span className="nav-label">返回前台</span>}
|
|
||||||
</NavLink>
|
|
||||||
<button className="admin-nav-item logout-btn" onClick={() => { logout(); navigate('/login'); }}>
|
|
||||||
<span className="nav-icon">
|
|
||||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>
|
|
||||||
</span>
|
|
||||||
{!collapsed && <span className="nav-label">退出登录</span>}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
{!collapsed && (
|
|
||||||
<div className="admin-version-info">
|
|
||||||
Qihu-AIFlow v2.0.0
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</nav>
|
||||||
|
<div className="admin-sidebar-footer">
|
||||||
|
<div className="admin-user-info">
|
||||||
|
<div className="admin-user-avatar">{user?.username?.[0]?.toUpperCase() || 'A'}</div>
|
||||||
|
<div className="admin-user-detail">
|
||||||
|
<div className="admin-user-name">{user?.username || 'admin'}</div>
|
||||||
|
<button className="admin-logout-btn" onClick={handleLogout}>退出登录</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
<main className="admin-content">
|
||||||
{/* Admin Main Content */}
|
|
||||||
<main className="admin-main">
|
|
||||||
<header className="admin-topbar">
|
|
||||||
<div className="admin-topbar-left">
|
|
||||||
<span className="admin-welcome">欢迎,{user.username}</span>
|
|
||||||
</div>
|
|
||||||
<div className="admin-topbar-right">
|
|
||||||
<a href="#/chat" className="admin-topbar-action">
|
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
|
|
||||||
<span>返回前台</span>
|
|
||||||
</a>
|
|
||||||
<div className="admin-user-tag">
|
|
||||||
<div className="user-avatar-sm admin-avatar">
|
|
||||||
{user.username.charAt(0).toUpperCase()}
|
|
||||||
</div>
|
|
||||||
<span>{user.username}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<div className="admin-content">
|
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+529
-45
@@ -1,52 +1,56 @@
|
|||||||
/* ===== AIFlow Design System ===== */
|
/* ===== AIFlow Design System v2 - Dark Theme Default ===== */
|
||||||
/* 设计方向:融合QwenPaw温暖科技感 + 极简主义 */
|
/* 设计方向:融合暗黑科技感 + 极简主义 */
|
||||||
|
|
||||||
/* Google Fonts */
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');
|
||||||
|
|
||||||
/* CSS Custom Properties - Design Tokens */
|
/* CSS Custom Properties - Dark Theme */
|
||||||
:root {
|
:root {
|
||||||
/* Colors - Light Theme */
|
/* Colors - Dark Theme */
|
||||||
--color-bg-primary: #F8F9FB;
|
--color-bg-primary: #0A0E1A;
|
||||||
--color-bg-secondary: #FFFFFF;
|
--color-bg-secondary: #111627;
|
||||||
--color-bg-tertiary: #F1F3F7;
|
--color-bg-tertiary: #161B2E;
|
||||||
--color-bg-hover: #EBEEF3;
|
--color-bg-hover: #1C2240;
|
||||||
--color-bg-active: #E3E7F0;
|
--color-bg-active: #22284A;
|
||||||
|
|
||||||
--color-text-primary: #101214;
|
--color-text-primary: #E8ECF4;
|
||||||
--color-text-secondary: #545A65;
|
--color-text-secondary: #8892B0;
|
||||||
--color-text-tertiary: #8B919E;
|
--color-text-tertiary: #5A6480;
|
||||||
--color-text-disabled: #BFC4CE;
|
--color-text-disabled: #3A4460;
|
||||||
--color-text-inverse: #FFFFFF;
|
--color-text-inverse: #0A0E1A;
|
||||||
|
|
||||||
--color-accent: #5B5FED;
|
--color-accent: #6C63FF;
|
||||||
--color-accent-hover: #4A4ECC;
|
--color-accent-hover: #8B85FF;
|
||||||
--color-accent-light: #EEEDFF;
|
--color-accent-light: rgba(108, 99, 255, 0.15);
|
||||||
--color-accent-subtle: #F6F5FF;
|
--color-accent-subtle: rgba(108, 99, 255, 0.08);
|
||||||
|
|
||||||
--color-success: #219B5E;
|
--color-success: #10B981;
|
||||||
--color-success-light: #E6F7EE;
|
--color-success-light: rgba(16, 185, 129, 0.12);
|
||||||
--color-warning: #E8922C;
|
--color-warning: #F59E0B;
|
||||||
--color-warning-light: #FEF4E8;
|
--color-warning-light: rgba(245, 158, 11, 0.12);
|
||||||
--color-error: #D9383A;
|
--color-error: #EF4444;
|
||||||
--color-error-light: #FDEBEB;
|
--color-error-light: rgba(239, 68, 68, 0.12);
|
||||||
--color-info: #3B82F6;
|
--color-info: #3B82F6;
|
||||||
--color-info-light: #EBF2FE;
|
--color-info-light: rgba(59, 130, 246, 0.12);
|
||||||
|
|
||||||
--color-border: #E3E6EB;
|
--color-border: rgba(255, 255, 255, 0.08);
|
||||||
--color-border-light: #EEF0F4;
|
--color-border-light: rgba(255, 255, 255, 0.05);
|
||||||
--color-border-hover: #CDD2DA;
|
--color-border-hover: rgba(255, 255, 255, 0.14);
|
||||||
|
|
||||||
--color-sidebar-bg: #F5F6F9;
|
--color-sidebar-bg: #0E1225;
|
||||||
--color-sidebar-hover: #EAECF2;
|
--color-sidebar-hover: rgba(255, 255, 255, 0.05);
|
||||||
--color-sidebar-active: #E1E3F0;
|
--color-sidebar-active: rgba(108, 99, 255, 0.12);
|
||||||
|
|
||||||
/* Shadows */
|
/* Surface/card colors */
|
||||||
--shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
|
--color-surface: #111627;
|
||||||
--shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
|
--color-surface-hover: #161B2E;
|
||||||
--shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
|
--color-surface-elevated: #1C2240;
|
||||||
--shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
|
|
||||||
--shadow-xl: 0 20px 48px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
|
/* Shadows - Dark theme */
|
||||||
|
--shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
|
||||||
|
--shadow-sm: 0 1px 3px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
|
||||||
|
--shadow-md: 0 4px 12px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.2);
|
||||||
|
--shadow-lg: 0 12px 32px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
|
||||||
|
--shadow-xl: 0 20px 48px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.25);
|
||||||
|
|
||||||
/* Spacing */
|
/* Spacing */
|
||||||
--space-xs: 4px;
|
--space-xs: 4px;
|
||||||
@@ -149,7 +153,7 @@ input, textarea, select {
|
|||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scrollbar */
|
/* Scrollbar - Dark theme */
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
@@ -226,6 +230,11 @@ input, textarea, select {
|
|||||||
100% { background-position: 200% 0; }
|
100% { background-position: 200% 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes glow {
|
||||||
|
0%, 100% { box-shadow: 0 0 5px rgba(108, 99, 255, 0.3); }
|
||||||
|
50% { box-shadow: 0 0 20px rgba(108, 99, 255, 0.5); }
|
||||||
|
}
|
||||||
|
|
||||||
.animate-fadeIn { animation: fadeIn var(--transition-normal); }
|
.animate-fadeIn { animation: fadeIn var(--transition-normal); }
|
||||||
.animate-slideUp { animation: slideUp var(--transition-normal); }
|
.animate-slideUp { animation: slideUp var(--transition-normal); }
|
||||||
.animate-slideDown { animation: slideDown var(--transition-normal); }
|
.animate-slideDown { animation: slideDown var(--transition-normal); }
|
||||||
@@ -239,7 +248,32 @@ input, textarea, select {
|
|||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive breakpoints utility */
|
/* Spinner */
|
||||||
|
.audit-spinner {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
border: 2px solid rgba(108, 99, 255, 0.2);
|
||||||
|
border-top-color: var(--color-accent);
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 0.6s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Loading screen */
|
||||||
|
.loading-screen {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100vh;
|
||||||
|
font-size: 18px;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
background: var(--color-bg-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive breakpoints */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
:root {
|
:root {
|
||||||
--sidebar-width: 0px;
|
--sidebar-width: 0px;
|
||||||
@@ -252,12 +286,462 @@ input, textarea, select {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-screen {
|
/* === Glass card effect === */
|
||||||
|
.glass-card {
|
||||||
|
background: rgba(17, 22, 39, 0.7);
|
||||||
|
backdrop-filter: blur(16px);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === Gradient text === */
|
||||||
|
.gradient-text {
|
||||||
|
background: linear-gradient(135deg, #6C63FF, #A78BFA, #C084FC);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-clip: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === Admin stats card grid === */
|
||||||
|
.admin-stats-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||||
|
gap: var(--space-lg);
|
||||||
|
margin-bottom: var(--space-2xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card {
|
||||||
|
padding: var(--space-xl);
|
||||||
|
background: var(--color-surface);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
transition: all var(--transition-normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card:hover {
|
||||||
|
border-color: rgba(108, 99, 255, 0.3);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 4px 16px rgba(108, 99, 255, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card .stat-label {
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
color: var(--color-text-tertiary);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
margin-bottom: var(--space-xs);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card .stat-value {
|
||||||
|
font-size: var(--text-2xl);
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card .stat-sub {
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
color: var(--color-text-tertiary);
|
||||||
|
margin-top: var(--space-xs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === Common button styles === */
|
||||||
|
.btn-primary {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
font-size: var(--text-base);
|
||||||
|
font-weight: 600;
|
||||||
|
color: white;
|
||||||
|
background: var(--color-accent);
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all var(--transition-fast);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background: var(--color-accent-hover);
|
||||||
|
box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-secondary {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
font-size: var(--text-base);
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all var(--transition-fast);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-secondary:hover {
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
border-color: var(--color-border-hover);
|
||||||
|
background: var(--color-bg-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
font-size: var(--text-base);
|
||||||
|
font-weight: 500;
|
||||||
|
color: white;
|
||||||
|
background: var(--color-error);
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all var(--transition-fast);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger:hover {
|
||||||
|
background: #DC2626;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-sm {
|
||||||
|
padding: 6px 12px;
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === Form elements === */
|
||||||
|
.form-input-dark {
|
||||||
|
padding: 10px 14px;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
background: var(--color-bg-tertiary);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: var(--text-base);
|
||||||
|
outline: none;
|
||||||
|
transition: all var(--transition-fast);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-input-dark:focus {
|
||||||
|
border-color: rgba(108, 99, 255, 0.4);
|
||||||
|
box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-input-dark::placeholder {
|
||||||
|
color: var(--color-text-disabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select-dark {
|
||||||
|
padding: 10px 14px;
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
background: var(--color-bg-tertiary);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: var(--text-base);
|
||||||
|
outline: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all var(--transition-fast);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select-dark:focus {
|
||||||
|
border-color: rgba(108, 99, 255, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === Table (dark theme) === */
|
||||||
|
.data-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table th {
|
||||||
|
padding: 12px 16px;
|
||||||
|
text-align: left;
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--color-text-tertiary);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table td {
|
||||||
|
padding: 12px 16px;
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
border-bottom: 1px solid var(--color-border-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table tr:hover td {
|
||||||
|
background: var(--color-bg-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === Badge === */
|
||||||
|
.badge {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 2px 10px;
|
||||||
|
border-radius: 100px;
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-success { background: var(--color-success-light); color: var(--color-success); }
|
||||||
|
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
|
||||||
|
.badge-error { background: var(--color-error-light); color: var(--color-error); }
|
||||||
|
.badge-info { background: var(--color-info-light); color: var(--color-info); }
|
||||||
|
.badge-accent { background: var(--color-accent-light); color: var(--color-accent); }
|
||||||
|
|
||||||
|
/* === Modal/Dialog === */
|
||||||
|
.modal-overlay {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 100vh;
|
z-index: var(--z-modal);
|
||||||
font-size: 18px;
|
}
|
||||||
color: var(--color-text-secondary);
|
|
||||||
background: var(--color-bg-primary);
|
.modal-content {
|
||||||
|
background: var(--color-surface);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-xl);
|
||||||
|
padding: var(--space-2xl);
|
||||||
|
max-width: 90vw;
|
||||||
|
max-height: 90vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
box-shadow: var(--shadow-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: var(--space-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header h3 {
|
||||||
|
font-size: var(--text-lg);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === Toast === */
|
||||||
|
.toast {
|
||||||
|
position: fixed;
|
||||||
|
top: 24px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
padding: 12px 24px;
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: var(--color-surface-elevated);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
z-index: var(--z-toast);
|
||||||
|
animation: slideDown var(--transition-normal);
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== Color Scheme Improvements v2 ===== */
|
||||||
|
/* Glassmorphism + Text Highlighting + Consistency Fixes */
|
||||||
|
|
||||||
|
/* Glass card effect */
|
||||||
|
.admin-page-card,
|
||||||
|
.admin-card,
|
||||||
|
.stat-card,
|
||||||
|
.dashboard-card {
|
||||||
|
background: rgba(22, 27, 46, 0.6) !important;
|
||||||
|
backdrop-filter: blur(12px) !important;
|
||||||
|
-webkit-backdrop-filter: blur(12px) !important;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.06) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Stat number highlight */
|
||||||
|
.stat-value,
|
||||||
|
.stat-number,
|
||||||
|
.metric-value {
|
||||||
|
color: var(--color-text-primary) !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
text-shadow: 0 0 20px rgba(108, 99, 255, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Section title highlight */
|
||||||
|
.section-title,
|
||||||
|
.page-title,
|
||||||
|
.card-title,
|
||||||
|
h1, h2, h3 {
|
||||||
|
color: var(--color-text-primary) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Accent text highlight */
|
||||||
|
.text-accent,
|
||||||
|
.text-primary,
|
||||||
|
.highlight-text {
|
||||||
|
color: var(--color-accent) !important;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Table header improvements */
|
||||||
|
table th,
|
||||||
|
.table-header {
|
||||||
|
background: rgba(108, 99, 255, 0.08) !important;
|
||||||
|
color: var(--color-text-primary) !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Table row hover */
|
||||||
|
table tbody tr:hover,
|
||||||
|
.table-row:hover {
|
||||||
|
background: rgba(108, 99, 255, 0.04) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Input/Select consistency */
|
||||||
|
input,
|
||||||
|
textarea,
|
||||||
|
select,
|
||||||
|
.form-input,
|
||||||
|
.form-control {
|
||||||
|
background: rgba(10, 14, 26, 0.6) !important;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08) !important;
|
||||||
|
color: var(--color-text-primary) !important;
|
||||||
|
border-radius: var(--radius-md) !important;
|
||||||
|
transition: border-color 0.2s, box-shadow 0.2s !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus,
|
||||||
|
textarea:focus,
|
||||||
|
select:focus,
|
||||||
|
.form-input:focus,
|
||||||
|
.form-control:focus {
|
||||||
|
border-color: var(--color-accent) !important;
|
||||||
|
box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12) !important;
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Button consistency */
|
||||||
|
button,
|
||||||
|
.btn,
|
||||||
|
.admin-btn {
|
||||||
|
border-radius: var(--radius-md) !important;
|
||||||
|
transition: all 0.2s !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Primary button */
|
||||||
|
.btn-primary,
|
||||||
|
.admin-btn-primary,
|
||||||
|
button[type="submit"] {
|
||||||
|
background: var(--color-accent) !important;
|
||||||
|
color: white !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover,
|
||||||
|
.admin-btn-primary:hover {
|
||||||
|
background: var(--color-accent-hover) !important;
|
||||||
|
box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Secondary/ghost button */
|
||||||
|
.btn-secondary,
|
||||||
|
.admin-btn-secondary {
|
||||||
|
background: rgba(255, 255, 255, 0.05) !important;
|
||||||
|
color: var(--color-text-secondary) !important;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-secondary:hover,
|
||||||
|
.admin-btn-secondary:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.08) !important;
|
||||||
|
color: var(--color-text-primary) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Badge/tag improvements */
|
||||||
|
.badge,
|
||||||
|
.tag,
|
||||||
|
.admin-badge {
|
||||||
|
border-radius: var(--radius-full) !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
padding: 2px 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Badge variants */
|
||||||
|
.badge-success,
|
||||||
|
.admin-badge-success {
|
||||||
|
background: rgba(16, 185, 129, 0.12) !important;
|
||||||
|
color: #10B981 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-warning,
|
||||||
|
.admin-badge-warning {
|
||||||
|
background: rgba(245, 158, 11, 0.12) !important;
|
||||||
|
color: #F59E0B !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-error,
|
||||||
|
.admin-badge-danger {
|
||||||
|
background: rgba(239, 68, 68, 0.12) !important;
|
||||||
|
color: #EF4444 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-info,
|
||||||
|
.admin-badge-info {
|
||||||
|
background: rgba(59, 130, 246, 0.12) !important;
|
||||||
|
color: #3B82F6 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Empty state */
|
||||||
|
.empty-state,
|
||||||
|
.admin-empty {
|
||||||
|
color: var(--color-text-tertiary) !important;
|
||||||
|
text-align: center;
|
||||||
|
padding: 48px 24px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scrollbar improvement */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(108, 99, 255, 0.2);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(108, 99, 255, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Link color */
|
||||||
|
a {
|
||||||
|
color: var(--color-accent);
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: var(--color-accent-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tab improvements */
|
||||||
|
.tab-active,
|
||||||
|
.tab-item.active {
|
||||||
|
color: var(--color-accent) !important;
|
||||||
|
border-bottom-color: var(--color-accent) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Modal/dialog overlay */
|
||||||
|
.modal-overlay,
|
||||||
|
.dialog-overlay {
|
||||||
|
background: rgba(10, 14, 26, 0.7) !important;
|
||||||
|
backdrop-filter: blur(4px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Card hover effect */
|
||||||
|
.admin-card:hover,
|
||||||
|
.stat-card:hover {
|
||||||
|
border-color: rgba(108, 99, 255, 0.2) !important;
|
||||||
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user