Skip to content

Commit

Permalink
Upgrade dependencies, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
everoddandeven committed Nov 12, 2024
1 parent 8c9519f commit 8eea783
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 53 deletions.
96 changes: 48 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@
"@types/node": "22.9.0",
"@types/pidusage": "2.0.5",
"@types/unbzip2-stream": "1.4.3",
"@typescript-eslint/eslint-plugin": "8.13.0",
"@typescript-eslint/parser": "8.13.0",
"@typescript-eslint/eslint-plugin": "8.14.0",
"@typescript-eslint/parser": "8.14.0",
"conventional-changelog-cli": "5.0.0",
"electron": "33.2.0",
"electron-builder": "25.1.8",
"electron-debug": "4.1.0",
"electron-reloader": "1.2.3",
"eslint": "9.14.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsdoc": "50.4.3",
"eslint-plugin-jsdoc": "50.5.0",
"eslint-plugin-prefer-arrow": "1.2.3",
"jest": "29.7.0",
"node-polyfill-webpack-plugin": "4.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/app/core/services/daemon/daemon.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ export class DaemonService {
}).catch((error: any) => {
this.startedAt = undefined;
console.error(error);
this.starting = false;
});
}
else {
Expand Down
4 changes: 4 additions & 0 deletions src/app/pages/detail/detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ <h5 class="card-title">{{card.content}}</h5>
<table
id="peersTable"
data-toggle="peersTable"
data-search="true"
data-pagination="true"
data-show-columns="true"
data-show-columns-search="true"
>
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,23 @@ export class DaemonStatusService {
}

public get cannotRunBecauseBatteryPolicy(): boolean {
return this.settings ? (this._runningOnBattery && !this.settings.runOnBattery) || (this.settings.runOnBattery && this.settings.batteryLevelThreshold > 0 && this._batteryLevel <= this.settings.batteryLevelThreshold) : false;
if (!this.settings) {
return false;
}

if (!this._runningOnBattery) {
return false;
}

if (!this.settings.runOnBattery) {
return true;
}

if (this.settings.runOnBattery && this.settings.batteryLevelThreshold > 0 && this._batteryLevel <= this.settings.batteryLevelThreshold) {
return true;
}

return false;
}

public get progressStatus(): string {
Expand Down Expand Up @@ -112,7 +128,7 @@ export class DaemonStatusService {
const batteryLevel = await this.electronService.getBatteryLevel();
this._batteryTooLow = batteryLevel <= this.settings.batteryLevelThreshold;
}
else if (!this.settings.runOnBattery) {
else if (!this.settings.runOnBattery || !this._runningOnBattery) {
this._batteryTooLow = false;
}
}).then().catch((error: any) => console.error(error));
Expand Down

0 comments on commit 8eea783

Please sign in to comment.