File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ const icons: Record<string, icon> = {
22
22
iconName : 'battery.25percent' ,
23
23
color : Color . red ( ) ,
24
24
} ,
25
- 'battery.50.green' : {
25
+ 'battery.25.orange' : {
26
+ iconName : 'battery.25percent' ,
27
+ color : Color . orange ( ) ,
28
+ } ,
29
+ 'battery.50' : {
26
30
iconName : 'battery.50percent' ,
27
31
color : Color . green ( ) ,
28
32
} ,
@@ -148,9 +152,9 @@ export function getChargeCompletionString(
148
152
}
149
153
150
154
export function getBatteryPercentColor ( batteryPercent : number ) : Color {
151
- if ( batteryPercent >= 45 ) {
155
+ if ( batteryPercent >= 40 ) {
152
156
return Color . green ( )
153
- } else if ( batteryPercent >= 35 ) {
157
+ } else if ( batteryPercent >= 20 ) {
154
158
return Color . orange ( )
155
159
}
156
160
return Color . red ( )
@@ -213,12 +217,14 @@ export function calculateBatteryIcon(batteryPercent: number): string {
213
217
percentRounded = 100
214
218
} else if ( batteryPercent >= 65 ) {
215
219
percentRounded = 75
216
- } else if ( batteryPercent >= 45 ) {
220
+ } else if ( batteryPercent >= 40 ) {
217
221
percentRounded = 50
218
- colorExtra = '.green'
219
222
} else if ( batteryPercent >= 35 ) {
220
223
percentRounded = 50
221
224
colorExtra = '.orange'
225
+ } else if ( batteryPercent >= 20 ) {
226
+ percentRounded = 25
227
+ colorExtra = '.orange'
222
228
} else if ( batteryPercent >= 15 ) {
223
229
percentRounded = 25
224
230
}
You can’t perform that action at this time.
0 commit comments