Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
fix: upgrade systeminformation battery method names - close #1113
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSquared committed Apr 28, 2021
1 parent 051d223 commit 4f1a264
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/classes/sysinfo.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ class Sysinfo {
updateBattery() {
window.si.battery().then(bat => {
let indicator = document.querySelector("#mod_sysinfo > div:last-child > h2");
if (bat.hasbattery) {
if (bat.ischarging) {
if (bat.hasBattery) {
if (bat.isCharging) {
indicator.innerHTML = "CHARGE";
} else if (bat.acconnected /*|| bat.timeremaining === -1*/) {//fixes #833
} else if (bat.acConnected) {
indicator.innerHTML = "WIRED";
} else {
indicator.innerHTML = bat.percent+"%";
Expand Down

0 comments on commit 4f1a264

Please sign in to comment.