{/* 系统信息 */}
系统信息
{computerInfo.OsName && (
系统: {computerInfo.OsName}
{windowsVersionCode && (
({windowsVersionCode})
)}
)}
{!computerInfo.OsName && (
系统: {allSysData?.name || "未知"} {allSysData?.os_version || ""}
{allSysData?.kernel_version && (
<>
{" "}{allSysData.kernel_version}
{windowsVersionCode && (
({windowsVersionCode})
)}
>
)}
)}
{computerInfo.CsName && (
主机名: {computerInfo.CsName}
)}
{!computerInfo.CsName && allSysData?.hostname && (
主机名: {allSysData.hostname}
)}
{/* 主板信息 */}
{(computerInfo.CsManufacturer || computerInfo.BiosSMBIOSBIOSVersion) && (
主板
{computerInfo.CsManufacturer && (
制造商: {computerInfo.CsManufacturer}
)}
{computerInfo.BiosSMBIOSBIOSVersion && (
BIOS版本: {computerInfo.BiosSMBIOSBIOSVersion}
)}
)}
{/* CPU 信息 */}
处理器
型号: {allSysData?.cpus?.[0]?.brand || "未知"}
{averageCpuFrequency !== null && (
频率: {averageCpuFrequency.toFixed(2)} GHz
)}
核心数: {allSysData?.cpu_count || "未知"}
{/* 内存信息 */}
{allSysData?.total_memory && (
内存
总容量: {formatBytes(allSysData.total_memory)}
{allSysData.used_memory !== undefined && (
已用: {formatBytes(allSysData.used_memory)}
{memoryUsagePercent !== null && (
({memoryUsagePercent}%)
)}
)}
{allSysData.total_memory !== undefined && allSysData.used_memory !== undefined && (
可用: {formatBytes(allSysData.total_memory - allSysData.used_memory)}
)}
)}
{/* GPU 信息 */}
{allSysData?.components && allSysData.components.length > 0 && (
(() => {
const gpuComponents = allSysData.components.filter((comp) =>
comp.label?.toLowerCase().includes('gpu') ||
comp.label?.toLowerCase().includes('graphics') ||
comp.label?.toLowerCase().includes('显卡')
)
if (gpuComponents.length === 0) return null
return (
显卡
{gpuComponents.map((gpu, index) => (
GPU{index > 0 ? ` ${index + 1}` : ""}: {gpu.label || "未知"}
{gpu.temperature !== undefined && (
({gpu.temperature}°C{gpu.max !== undefined ? ` / ${gpu.max}°C` : ""})
)}
))}
)
})()
)}
{/* 电池信息 */}
{allSysData?.batteries && allSysData.batteries.length > 0 && (
电池
{allSysData.batteries.map((battery, index) => (
电池{index > 0 ? ` ${index + 1}` : ""}:
{battery.state && `${battery.state} `}
{battery.state_of_charge !== undefined && `${battery.state_of_charge}% `}
{battery.energy_full !== undefined && battery.energy !== undefined && (
({formatBytes(battery.energy)} / {formatBytes(battery.energy_full)})
)}
))}
)}
)
}