sync: soul-admin 页面 | 原因: 前端页面修改

This commit is contained in:
卡若
2026-03-08 16:22:04 +08:00
parent bf0c5ee879
commit af77279425

View File

@@ -256,64 +256,7 @@ export function CKBStatsTab({ onSwitchTab }: Props = {}) {
)}
</div>
{/* ===== 区块三:接口联通测试 ===== */}
<div>
<div className="flex items-center justify-between mb-4">
<h3 className="text-lg font-semibold text-white flex items-center gap-2">
<Activity className="w-5 h-5 text-green-400" />
</h3>
<div className="flex gap-2">
<Button onClick={loadStats} disabled={isLoading} variant="outline" size="sm" className="border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent">
<RefreshCw className={`w-3.5 h-3.5 mr-1.5 ${isLoading ? 'animate-spin' : ''}`} />
</Button>
<Button onClick={testAll} size="sm" className="bg-[#38bdac] hover:bg-[#2da396] text-white">
<Zap className="w-3.5 h-3.5 mr-1.5" />
</Button>
</div>
</div>
{/* 测试手机号输入 */}
<div className="flex gap-4 mb-4 p-4 bg-[#0a1628] rounded-xl border border-gray-700/40">
<div className="flex items-center gap-2 flex-1">
<Smartphone className="w-4 h-4 text-gray-500 shrink-0" />
<div className="flex-1">
<Label className="text-gray-500 text-xs"></Label>
<Input className="bg-[#0f2137] border-gray-700 text-white h-9 mt-1" value={testPhone} onChange={e => setTestPhone(e.target.value)} placeholder="手机号" />
</div>
</div>
<div className="flex items-center gap-2 flex-1">
<span className="text-gray-500 text-sm shrink-0">💬</span>
<div className="flex-1">
<Label className="text-gray-500 text-xs"></Label>
<Input className="bg-[#0f2137] border-gray-700 text-white h-9 mt-1" value={testWechat} onChange={e => setTestWechat(e.target.value)} placeholder="微信号" />
</div>
</div>
</div>
{/* 测试结果列表 */}
<div className="space-y-2">
{ckbTests.map((test, idx) => (
<div key={`${test.endpoint}-${idx}`} className="flex items-center justify-between bg-[#0a1628] border border-gray-700/30 rounded-lg px-4 py-3">
<div className="flex items-center gap-3 min-w-0 flex-1">
{test.status === 'idle' && <div className="w-2.5 h-2.5 rounded-full bg-gray-600 shrink-0" />}
{test.status === 'testing' && <RefreshCw className="w-4 h-4 text-yellow-400 animate-spin shrink-0" />}
{test.status === 'success' && <CheckCircle2 className="w-4 h-4 text-green-400 shrink-0" />}
{test.status === 'error' && <XCircle className="w-4 h-4 text-red-400 shrink-0" />}
<div className="min-w-0">
<p className="text-white text-sm">{test.label}</p>
<p className="text-gray-600 text-xs truncate">{test.description}</p>
</div>
</div>
<div className="flex items-center gap-2 shrink-0">
{test.message && <span className={`text-xs max-w-[180px] truncate ${test.status === 'success' ? 'text-green-400' : 'text-red-400'}`}>{test.message}</span>}
{test.responseTime !== undefined && <Badge className="bg-gray-800 text-gray-400 border-0 text-[10px]">{test.responseTime}ms</Badge>}
<Button size="sm" variant="outline" onClick={() => testEndpoint(idx)} disabled={test.status === 'testing'}
className="border-gray-700 text-gray-400 hover:bg-gray-700/50 bg-transparent text-xs h-7 px-2.5"></Button>
</div>
</div>
))}
</div>
</div>
{/* 接口联通测试已移到右上角「存客宝」按钮面板 */}
</div>
)