File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
gui/src/components/tracker Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export function TrackerBattery({
88 voltage,
99 runtime,
1010 disabled,
11+ moreInfo = false ,
1112 textColor = 'primary' ,
1213} : {
1314 /**
@@ -17,6 +18,7 @@ export function TrackerBattery({
1718 voltage ?: number | null ;
1819 runtime ?: bigint | null ;
1920 disabled ?: boolean ;
21+ moreInfo ?: boolean ;
2022 textColor ?: string ;
2123} ) {
2224 const { currentLocales } = useLocaleConfig ( ) ;
@@ -30,7 +32,8 @@ export function TrackerBattery({
3032 } ) ;
3133
3234 const charging = ( voltage || 0 ) > 4.3 ;
33- const showVoltage = voltage && config ?. debug ;
35+ const debug = config ?. debug || config ?. devSettings . moreInfo ;
36+ const showVoltage = moreInfo && voltage && debug ;
3437
3538 return (
3639 < div className = "flex gap-2" >
@@ -47,7 +50,7 @@ export function TrackerBattery({
4750 'min' }
4851 </ Typography >
4952 ) }
50- { ! charging && ( ! runtime || showVoltage ) && (
53+ { ! charging && ( ! runtime || debug ) && (
5154 < Typography color = { textColor } >
5255 { percentFormatter . format ( value ) }
5356 </ Typography >
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ function TrackerBig({
5353 value = { device . hardwareStatus . batteryPctEstimate / 100 }
5454 runtime = { device . hardwareStatus . batteryRuntimeEstimate }
5555 disabled = { tracker . status === TrackerStatusEnum . DISCONNECTED }
56+ moreInfo = { true }
5657 />
5758 ) }
5859 < div className = "flex gap-2" >
Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ function Row({
231231 voltage = { device . hardwareStatus . batteryVoltage }
232232 runtime = { device . hardwareStatus . batteryRuntimeEstimate }
233233 disabled = { tracker . status === TrackerStatusEnum . DISCONNECTED }
234+ moreInfo = { config ?. devSettings . moreInfo }
234235 textColor = { fontColor }
235236 />
236237 ) }
You can’t perform that action at this time.
0 commit comments