feat: Initialize core application structure with backend configuration, database, API, and a comprehensive frontend UI for account pooling and management.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { NavLink, useLocation } from 'react-router-dom'
|
||||
import { useState } from 'react'
|
||||
import { useConfig } from '../../hooks/useConfig'
|
||||
import {
|
||||
LayoutDashboard,
|
||||
Upload,
|
||||
@@ -12,6 +13,7 @@ import {
|
||||
Server,
|
||||
Mail,
|
||||
Cog,
|
||||
Trash2,
|
||||
} from 'lucide-react'
|
||||
|
||||
interface SidebarProps {
|
||||
@@ -32,6 +34,7 @@ const navItems: NavItem[] = [
|
||||
{ to: '/records', icon: History, label: '加号记录' },
|
||||
{ to: '/accounts', icon: Users, label: '号池账号' },
|
||||
{ to: '/monitor', icon: Activity, label: '号池监控' },
|
||||
{ to: '/cleaner', icon: Trash2, label: '定期清理' },
|
||||
{
|
||||
to: '/config',
|
||||
icon: Settings,
|
||||
@@ -47,6 +50,7 @@ const navItems: NavItem[] = [
|
||||
export default function Sidebar({ isOpen, onClose }: SidebarProps) {
|
||||
const location = useLocation()
|
||||
const [expandedItems, setExpandedItems] = useState<string[]>(['/config'])
|
||||
const { siteName } = useConfig()
|
||||
|
||||
const toggleExpand = (path: string) => {
|
||||
setExpandedItems(prev =>
|
||||
@@ -132,9 +136,9 @@ export default function Sidebar({ isOpen, onClose }: SidebarProps) {
|
||||
<div className="flex items-center justify-between h-16 px-6 border-b border-slate-200/50 dark:border-slate-800/50 lg:hidden">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="h-8 w-8 rounded-xl bg-gradient-to-br from-blue-600 to-indigo-600 flex items-center justify-center shadow-lg shadow-blue-500/30">
|
||||
<span className="text-white font-bold text-sm">CP</span>
|
||||
<span className="text-white font-bold text-sm">{siteName.slice(0, 2).toUpperCase()}</span>
|
||||
</div>
|
||||
<span className="font-bold text-lg text-slate-900 dark:text-slate-100 tracking-tight">Codex Pool</span>
|
||||
<span className="font-bold text-lg text-slate-900 dark:text-slate-100 tracking-tight truncate">{siteName}</span>
|
||||
</div>
|
||||
<button
|
||||
onClick={onClose}
|
||||
@@ -149,9 +153,9 @@ export default function Sidebar({ isOpen, onClose }: SidebarProps) {
|
||||
<div className="hidden lg:flex items-center h-16 px-6 border-b border-slate-200/50 dark:border-slate-800/50">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="h-8 w-8 rounded-xl bg-gradient-to-br from-blue-600 to-indigo-600 flex items-center justify-center shadow-lg shadow-blue-500/30">
|
||||
<span className="text-white font-bold text-sm">CP</span>
|
||||
<span className="text-white font-bold text-sm">{siteName.slice(0, 2).toUpperCase()}</span>
|
||||
</div>
|
||||
<span className="font-bold text-lg text-slate-900 dark:text-slate-100 tracking-tight">Codex Pool</span>
|
||||
<span className="font-bold text-lg text-slate-900 dark:text-slate-100 tracking-tight truncate">{siteName}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -230,8 +230,7 @@ export default function OwnerList({ onStatsChange }: OwnerListProps) {
|
||||
>
|
||||
<option value="">全部状态</option>
|
||||
<option value="valid">有效</option>
|
||||
<option value="registered">已注册</option>
|
||||
<option value="pooled">已入库</option>
|
||||
<option value="processing">处理中</option>
|
||||
<option value="used">已使用</option>
|
||||
<option value="invalid">无效</option>
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user