diff --git a/gui/src/components/tracker/TrackerBattery.tsx b/gui/src/components/tracker/TrackerBattery.tsx index 0bf775a82..1f4c232ab 100644 --- a/gui/src/components/tracker/TrackerBattery.tsx +++ b/gui/src/components/tracker/TrackerBattery.tsx @@ -6,6 +6,7 @@ import { Typography } from '@/components/commons/Typography'; export function TrackerBattery({ value, voltage, + runtime, disabled, textColor = 'primary', }: { @@ -14,6 +15,7 @@ export function TrackerBattery({ */ value: number; voltage?: number | null; + runtime?: BigInt | null disabled?: boolean; textColor?: string; }) { @@ -33,11 +35,27 @@ export function TrackerBattery({ return (
- +
{((!charging || showVoltage) && ( -
- {!charging && ( +
+ {!charging && runtime && ( + + {(( + runtime.valueOf() / + BigInt(3600000000) + ).toString() + + 'h ' + + ( + (runtime.valueOf() % + BigInt(3600000000)) / + BigInt(60000000) + ).toString() + + 'min') || + 'N/A'} + + )} + {!charging && (!runtime || showVoltage) && ( {percentFormatter.format(value)} @@ -49,7 +67,7 @@ export function TrackerBattery({ )}
)) || ( -
+
)} diff --git a/gui/src/components/tracker/TrackerCard.tsx b/gui/src/components/tracker/TrackerCard.tsx index 00dafabe0..a016f65dc 100644 --- a/gui/src/components/tracker/TrackerCard.tsx +++ b/gui/src/components/tracker/TrackerCard.tsx @@ -51,6 +51,7 @@ function TrackerBig({ )} @@ -119,6 +120,7 @@ function TrackerSmol({ )} diff --git a/gui/src/components/tracker/TrackersTable.tsx b/gui/src/components/tracker/TrackersTable.tsx index 1a4fdb022..55967fda4 100644 --- a/gui/src/components/tracker/TrackersTable.tsx +++ b/gui/src/components/tracker/TrackersTable.tsx @@ -229,6 +229,7 @@ function Row({ @@ -329,7 +330,7 @@ export function TrackersTable({ const cols = [ 'minmax(150px, 1.5fr)', // Name 'minmax(100px, 1fr)', // Type - 'minmax(60px, 1fr)', // Battery + 'minmax(110px, 1fr)', // Battery '6rem', // Ping (w-24) 'minmax(60px, 1fr)', // TPS config?.devSettings?.preciseRotation ? '11rem' : '8rem', // Rotation