From e247d8095eeda306ff5c33ca7f06d207e4fee4ae Mon Sep 17 00:00:00 2001 From: MacRimi Date: Tue, 7 Oct 2025 10:49:43 +0200 Subject: [PATCH] Update AppImage --- AppImage/components/hardware.tsx | 42 ++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/AppImage/components/hardware.tsx b/AppImage/components/hardware.tsx index ccc155c..f66d2d8 100644 --- a/AppImage/components/hardware.tsx +++ b/AppImage/components/hardware.tsx @@ -16,6 +16,7 @@ import { Cpu, MemoryStick, Cpu as Gpu, + Loader2, } from "lucide-react" import useSWR from "swr" import { useState } from "react" @@ -60,12 +61,14 @@ export default function Hardware() { const [selectedGPU, setSelectedGPU] = useState(null) const [realtimeGPUData, setRealtimeGPUData] = useState(null) + const [loadingGPUData, setLoadingGPUData] = useState(false) const [selectedPCIDevice, setSelectedPCIDevice] = useState(null) const [selectedDisk, setSelectedDisk] = useState(null) const [selectedNetwork, setSelectedNetwork] = useState(null) const handleGPUClick = async (gpu: GPU) => { - // Don't open modal yet - wait for data first + setLoadingGPUData(true) + setSelectedGPU(gpu) setRealtimeGPUData(null) try { @@ -82,9 +85,9 @@ export default function Hardware() { } catch (error) { console.error("[v0] Error fetching real-time GPU data:", error) setRealtimeGPUData({ has_monitoring_tool: false }) + } finally { + setLoadingGPUData(false) } - - setSelectedGPU(gpu) } const findPCIDeviceForGPU = (gpu: GPU): PCIDevice | null => { @@ -378,7 +381,30 @@ export default function Hardware() { )} { + if (!loadingGPUData) { + setSelectedGPU(null) + setRealtimeGPUData(null) + } + }} + > + + + + + Loading GPU Data + + Fetching real-time monitoring information... + +
+ +
+
+
+ + { setSelectedGPU(null) setRealtimeGPUData(null) @@ -775,7 +801,7 @@ export default function Hardware() { {hardwareData?.power_meter && (
- +

Power Consumption

@@ -788,7 +814,7 @@ export default function Hardware() { )}
-

{hardwareData.power_meter.watts.toFixed(1)} W

+

{hardwareData.power_meter.watts.toFixed(1)} W

Current Draw

@@ -835,7 +861,7 @@ export default function Hardware() { {hardwareData?.power_supplies && hardwareData.power_supplies.length > 0 && (
- +

Power Supplies

{hardwareData.power_supplies.length} PSUs @@ -851,7 +877,7 @@ export default function Hardware() { {psu.status} )}
-

{psu.watts} W

+

{psu.watts} W

Current Output

))}