mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-27 12:26:33 -08:00
only show runtime if nonzero
This commit is contained in:
1 parent
09d44b51d6
commit
d3eafb8d06
1 file changed
+2
-2
@@ -39,12 +39,12 @@ export function TrackerBattery({
|
||||
</div>
|
||||
{((!charging || showVoltage) && (
|
||||
<div className="w-15">
|
||||
{!charging && runtime != null && (
|
||||
{!charging && runtime != null && runtime > 0 && (
|
||||
<Typography color={textColor}>
|
||||
{(runtime / BigInt(3600000000)).toString() +
|
||||
'h ' +
|
||||
((runtime % BigInt(3600000000)) / BigInt(60000000)).toString() +
|
||||
'min' || 'N/A'}
|
||||
'min'}
|
||||
</Typography>
|
||||
)}
|
||||
{!charging && (!runtime || showVoltage) && (
|
||||
|
||||
Reference in new issue
Block a user