fix: should not show vulkan options in cpu only mode (#5210)

This commit is contained in:
Louis 2025-06-07 00:55:01 +07:00 committed by GitHub
parent c444643294
commit 1fa9f4e731
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -282,6 +282,8 @@ function Hardware() {
title="Usage"
actions={
<div className="flex items-center gap-2">
{hardwareData.cpu?.usage > 0 && (
<>
<Progress
value={hardwareData.cpu?.usage}
className="h-2 w-10"
@ -289,6 +291,8 @@ function Hardware() {
<span className="text-main-view-fg/80">
{hardwareData.cpu?.usage?.toFixed(2)}%
</span>
</>
)}
</div>
}
/>
@ -316,6 +320,8 @@ function Hardware() {
title="Usage"
actions={
<div className="flex items-center gap-2">
{hardwareData.ram?.total > 0 && (
<>
<Progress
value={
((hardwareData.ram?.total -
@ -334,12 +340,15 @@ function Hardware() {
).toFixed(2)}
%
</span>
</>
)}
</div>
}
/>
</Card>
{/* Vulkan Settings */}
{hardwareData.gpus.length > 0 && (
<Card title="Vulkan">
<CardItem
title="Enable Vulkan"
@ -359,6 +368,7 @@ function Hardware() {
}
/>
</Card>
)}
{/* GPU Information */}
<Card title="GPUs">