Skip to content

Commit

Permalink
Completely hide GPU from Statusbar when unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
track0x1 committed May 30, 2024
1 parent ee1894f commit b443721
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/src/components/Statusbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ export default function Statusbar() {

const gpu = parseInt(stats.gpu);

if (isNaN(gpu)) {
return;
}

return (
<Link key={gpuTitle} to="/system#general">
{" "}
Expand All @@ -97,7 +101,7 @@ export default function Statusbar() {
: "text-danger"
}`}
/>
{gpuTitle} {isNaN(gpu) ? 'unknown' : `${gpu}%`}
{gpuTitle} {gpu}%
</div>
</Link>
);
Expand Down

0 comments on commit b443721

Please sign in to comment.