diff --git a/src/pages/Servers.tsx b/src/pages/Servers.tsx
index d6a1f5c..4d0638a 100644
--- a/src/pages/Servers.tsx
+++ b/src/pages/Servers.tsx
@@ -6,40 +6,38 @@ import { getServerMetrics, type ServerInfo, type ProcessInfo } from '@/services/
const { Text, Title } = Typography
+function CopyTag({ text, icon, color }: { text: string; icon?: React.ReactNode; color?: string }) {
+ return (
+ { await navigator.clipboard.writeText(text); message.success(`已复制: ${text}`) }}>
+ {icon}{text}
+
+ )
+}
+
function ServerCard({ server }: { server: ServerInfo }) {
const cpuColor = server.cpu.usagePercent > 80 ? '#ff4d4f' : server.cpu.usagePercent > 50 ? '#faad14' : '#52c41a'
const memColor = server.memory.percent > 80 ? '#ff4d4f' : server.memory.percent > 50 ? '#faad14' : '#52c41a'
return (
- {server.name}{server.role}}
- style={{ height: '100%' }}
- >
- {/* Network info */}
+ {server.name}{server.role}} style={{ height: '100%' }}>
-
- { navigator.clipboard.writeText(server.network.publicIp); message.success('已复制') }}>
- 🌐 {server.network.publicIp}
-
- { navigator.clipboard.writeText(server.network.privateIp); message.success('已复制') }}>
- 🔒 {server.network.privateIp}
-
+
+
+
{server.network.domains.map(d => (
- { navigator.clipboard.writeText(d); message.success('已复制') }}>
- {d}
-
+ } color="blue" />
))}
- {/* Metrics */}
- CPU ({server.cpu.cores}核)
+ CPU · {server.cpu.cores}核