show CPU temp in C or F

This commit is contained in:
proddy
2025-01-18 16:07:18 +01:00
parent 4d3cafcf29
commit 2d9ea3ee8d

View File

@@ -99,7 +99,8 @@ const HardwareStatus = () => {
' @ ' +
data.cpu_freq_mhz +
' Mhz' +
(data.temperature ? ', T: ' + data.temperature + ' °C' : '')
// bit of a hack : if the CPU temp is higher than 90 (=32 Fahrenheit if using Celsius), show F, otherwise C
(data.temperature ? ', T: ' + data.temperature + ' °' + (data.temperature > 90 ? 'F' : 'C') : '')
}
/>
</ListItem>