Skip to content

Commit

Permalink
| 1.1.1 | 2024-5-17 | Updating dependencies and fixing issue in batte…
Browse files Browse the repository at this point in the history
…ry_util package + updating UI
  • Loading branch information
Malick-Tammal committed Nov 28, 2024
1 parent d10c111 commit 707af39
Show file tree
Hide file tree
Showing 14 changed files with 454 additions and 199 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

| Version | Date | Comment |
| ------- | --------- | --------------------- |
| 1.1.1 | 2024-5-17 | Updating dependencies and fixing issue in battery_util package + updating UI |
| 1.0.1 | 2024-5-17 | Updating dependencies |
| 1.0.0 | 2024-4-24 | Initial release |
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ git clone https://github.com/Malick-Tammal/ENERGIZE.git
npm install
```

## Usage
## Starting

```sh
npm start
Expand Down
Binary file added asset/icons/Battery_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asset/icons/Details_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asset/icons/Health_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/battery.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const getLaptopModel = new Promise((resolve, reject) => {
//========================================================================\\

// Getting battery state (percentage / state) ===\\
const getBatteryState = async () => {
const getBatteryState = () => {
return bu
.batteryState()
.then((data) => {
Expand Down
23 changes: 23 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ const createMainWin = () => {
// Dev tools
if (isDev) mainWin.webContents.openDevTools({ mode: "detach" });

/*------ Mem garbage collection ------*/
mainWin.on("close", () => {
mainWin = null;
});

/*------ Disabling keyboard shortcuts ------*/
mainWin.webContents.on("before-input-event", (event, input) => {
if (input.control && input.key.toLowerCase() === "r") {
event.preventDefault();
} else if (input.control && input.key.toLowerCase() === "w") {
event.preventDefault();
}
});

console.timeEnd("app_startup_time");
};

Expand Down Expand Up @@ -128,3 +142,12 @@ ipc.on("check_updates_user", () => {
checkUpdates();
});
//===================================================\\

ipc.on("open_website", () => {
const shell = require("electron").shell;
shell.openExternal("https://energize-app.netlify.app");
});
ipc.on("open_github", () => {
const shell = require("electron").shell;
shell.openExternal("https://github.com/Malick-Tammal/ENERGIZE.git");
});
173 changes: 156 additions & 17 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "energize",
"version": "1.0.1",
"description": "Get instant insights into your laptop battery's health with our diagnostic tool",
"version": "1.1.1",
"description": "ENERGIZE",
"main": "main.js",
"scripts": {
"start": "electron .",
Expand All @@ -15,7 +15,7 @@
"url": "https://github.com/Malick-Tammal/ENERGIZE.git"
},
"devDependencies": {
"electron": "^33.1.0",
"electron": "^33.2.1",
"electron-builder": "^25.1.8"
},
"build": {
Expand All @@ -33,7 +33,7 @@
}
},
"dependencies": {
"battery_util": "^2.1.5",
"battery_util": "^2.2.5",
"electron-store": "^8.2.0",
"electron-updater": "^6.3.9",
"v8-compile-cache": "^2.4.0"
Expand Down
Loading

0 comments on commit 707af39

Please sign in to comment.