Icons: huge cleanup
This commit is contained in:
parent
ccdb4e0664
commit
1f8c55d581
53 changed files with 155 additions and 174 deletions
|
|
@ -11,20 +11,20 @@ Singleton {
|
|||
// Choose icon based on charge and charging state
|
||||
function getIcon(percent, charging, isReady) {
|
||||
if (!isReady) {
|
||||
return Bootstrap.icons["exclamation-diamond"]
|
||||
return "exclamation-diamond"
|
||||
}
|
||||
|
||||
if (charging) {
|
||||
return Bootstrap.icons["battery-charging"]
|
||||
return "battery-charging"
|
||||
} else {
|
||||
if (percent >= 85)
|
||||
return Bootstrap.icons["battery-full"]
|
||||
return "battery-full"
|
||||
if (percent >= 45)
|
||||
return Bootstrap.icons["battery-half"]
|
||||
return "battery-half"
|
||||
if (percent >= 25)
|
||||
return Bootstrap.icons["battery-low"]
|
||||
return "battery-low"
|
||||
if (percent >= 0)
|
||||
return Bootstrap.icons["battery"]
|
||||
return "battery"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue