+
{label && (
)}
-
-
+
+ {selectedOption ? selectedOption.label : placeholder || '请选择...'}
+
+
+
+
+
+
+ {isOpen && (
+
+ {options.length === 0 ? (
+
+ 无可用选项
+
+ ) : (
+ options.map((option) => (
+
handleSelect(option)}
+ className={`
+ relative cursor-pointer select-none py-2.5 pl-10 pr-4 transition-colors
+ ${option.value === value
+ ? 'bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 font-medium'
+ : 'text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700/50'
+ }
+ ${option.disabled ? 'opacity-50 cursor-not-allowed grayscale' : ''}
+ `}
+ >
+ {option.label}
+ {option.value === value && (
+
+
+
+ )}
+
+ ))
+ )}
+
+ )}
- {error &&
{error}
}
+ {error &&
{error}
}
{hint && !error && (
-
{hint}
+
{hint}
)}
)
diff --git a/frontend/src/components/layout/Sidebar.tsx b/frontend/src/components/layout/Sidebar.tsx
index e11c3ae..aba2fbd 100644
--- a/frontend/src/components/layout/Sidebar.tsx
+++ b/frontend/src/components/layout/Sidebar.tsx
@@ -16,6 +16,7 @@ import {
Trash2,
UserPlus,
Globe,
+ BarChart3,
} from 'lucide-react'
interface SidebarProps {
@@ -36,6 +37,7 @@ const navItems: NavItem[] = [
{ to: '/records', icon: History, label: '加号记录' },
{ to: '/accounts', icon: Users, label: '号池账号' },
{ to: '/monitor', icon: Activity, label: '号池监控' },
+ { to: '/s2a-stats', icon: BarChart3, label: 'S2A 统计' },
{ to: '/cleaner', icon: Trash2, label: '定期清理' },
{ to: '/team-reg', icon: UserPlus, label: 'Team 注册' },
{
@@ -46,7 +48,7 @@ const navItems: NavItem[] = [
{ to: '/config', icon: Cog, label: '配置概览' },
{ to: '/config/s2a', icon: Server, label: 'S2A 配置' },
{ to: '/config/email', icon: Mail, label: '邮箱配置' },
- { to: '/config/codex-proxy', icon: Globe, label: 'CodexAuth代理池' },
+ { to: '/config/codex-proxy', icon: Globe, label: '代理配置' },
]
},
]
@@ -133,7 +135,7 @@ export default function Sidebar({ isOpen, onClose }: SidebarProps) {
{/* Sidebar */}
@@ -511,13 +519,23 @@ export default function TeamReg() {
// 日志行组件 - 根据内容着色
function LogLine({ log }: { log: string }) {
let colorClass = 'text-slate-300'
+ let fontClass = ''
- if (log.includes('[OK]') || log.includes('成功')) {
+ // 成功日志 - 绿色加粗
+ if (log.includes('✓') || log.includes('入库成功') || log.includes('注册成功')) {
colorClass = 'text-green-400'
- } else if (log.includes('[!]') || log.includes('重试') || log.includes('[错误]')) {
+ fontClass = 'font-bold'
+ } else if (log.includes('[OK]') || log.includes('成功') || log.includes('完成') || log.includes('结果已保存')) {
+ colorClass = 'text-emerald-400'
+ fontClass = 'font-medium'
+ } else if (log.includes('[!]') || log.includes('重试') || log.includes('[错误]') || log.includes('失败')) {
colorClass = 'text-orange-400'
} else if (log.includes('[系统]') || log.includes('[输入]')) {
colorClass = 'text-blue-400'
+ } else if (log.includes('════════')) {
+ // 分隔线 - 高亮显示
+ colorClass = 'text-yellow-400'
+ fontClass = 'font-bold'
} else if (log.includes('[W1]')) {
colorClass = 'text-cyan-400'
} else if (log.includes('[W2]')) {
@@ -526,12 +544,10 @@ function LogLine({ log }: { log: string }) {
colorClass = 'text-yellow-400'
} else if (log.includes('[W4]')) {
colorClass = 'text-pink-400'
- } else if (log.includes('完成') || log.includes('结果已保存')) {
- colorClass = 'text-emerald-400 font-medium'
}
return (
-
+
{log}
)
diff --git a/frontend/src/pages/index.ts b/frontend/src/pages/index.ts
index 8b66b2e..dfd4745 100644
--- a/frontend/src/pages/index.ts
+++ b/frontend/src/pages/index.ts
@@ -9,5 +9,6 @@ export { default as Monitor } from './Monitor'
export { default as Cleaner } from './Cleaner'
export { default as TeamReg } from './TeamReg'
export { default as CodexProxyConfig } from './CodexProxyConfig'
+export { default as S2AStats } from './S2AStats'