diff --git a/apps/burn/.gitignore b/apps/burn/.gitignore new file mode 100644 index 000000000..656b79624 --- /dev/null +++ b/apps/burn/.gitignore @@ -0,0 +1 @@ +.prettierignore \ No newline at end of file diff --git a/apps/burn/.prettierignore b/apps/burn/.prettierignore index 172082901..292d490cb 100644 --- a/apps/burn/.prettierignore +++ b/apps/burn/.prettierignore @@ -1,2 +1,2 @@ # Ignore icon: -burn-icon.js \ No newline at end of file +app-icon.js \ No newline at end of file diff --git a/apps/burn/ChangeLog b/apps/burn/ChangeLog index 5551398c0..11d2aaf66 100644 --- a/apps/burn/ChangeLog +++ b/apps/burn/ChangeLog @@ -2,4 +2,5 @@ 0.02: Added README.md 0.03: Icon update 0.04: Icon Fix -0.05: Misc cleanup for PR \ No newline at end of file +0.05: Misc cleanup for PR +0.06: Implementing fixes from PR comments \ No newline at end of file diff --git a/apps/burn/burn-icon.js b/apps/burn/app-icon.js similarity index 100% rename from apps/burn/burn-icon.js rename to apps/burn/app-icon.js diff --git a/apps/burn/burn_icon.png b/apps/burn/app-icon.png similarity index 100% rename from apps/burn/burn_icon.png rename to apps/burn/app-icon.png diff --git a/apps/burn/bangle1-burn-screenshot.png b/apps/burn/app-screenshot.png similarity index 100% rename from apps/burn/bangle1-burn-screenshot.png rename to apps/burn/app-screenshot.png diff --git a/apps/burn/burn.js b/apps/burn/app.js similarity index 95% rename from apps/burn/burn.js rename to apps/burn/app.js index 44ed7d146..a2dad9a54 100644 --- a/apps/burn/burn.js +++ b/apps/burn/app.js @@ -19,6 +19,9 @@ // File variable to handle file operations let file; +// Check if the hardware version is Bangle.js 2 +const BANGLEJS2 = process.env.HWVERSION == 2; + // Importing the Storage module for file operations const Storage = require("Storage"); @@ -26,11 +29,11 @@ const Storage = require("Storage"); const PATH = "kcal.txt"; // Function to get the current date as a string -const dayString = () => { +function dayString() { const date = new Date(); // Month is 0-indexed, so we add 1 to get the correct month number return `${date.getMonth() + 1}-${date.getDate()}-${date.getFullYear()}`; -}; +} // Counter object to keep track of the count and the date let counter = { count: 0, date: dayString() }; @@ -135,23 +138,6 @@ const intervalFunctions = createIntervalFunctions(); const getInterval = intervalFunctions.getInterval; const rotateIncrement = intervalFunctions.rotateIncrement; -// Check if the hardware version is Bangle.js 2 -const BANGLEJS2 = process.env.HWVERSION == 2; - -// Variables for drag handling and screen coordinates -let drag, y, x; - -// If the hardware version is Bangle.js 2, set the coordinates accordingly -if (BANGLEJS2) { - drag = undefined; - y = 45; - x = 5; -} else { - // If the hardware version is Bangle.js 1, set the coordinates accordingly - y = 100; - x = 25; -} - // Function to update the screen function updateScreen() { // Clear the screen area for the counter diff --git a/apps/burn/metadata.json b/apps/burn/metadata.json index 82967794f..7cb81a1b8 100644 --- a/apps/burn/metadata.json +++ b/apps/burn/metadata.json @@ -1,16 +1,16 @@ { "id": "burn", "name": "Burn", - "version": "0.05", + "version": "0.06", "description": "Simple Calorie Counter -- saves to flash and resets at midnight. I often keep mine running while the digital clock widget is at the top", - "icon": "burn_icon.png", + "icon": "app-icon.png", "tags": "tool", "readme":"README.md", "supports": ["BANGLEJS", "BANGLEJS2"], - "screenshots": [{"url":"bangle1-burn-screenshot.png"}], + "screenshots": [{"url":"app-screenshot.png"}], "allow_emulator": true, "storage": [ - {"name":"burn.app.js","url":"burn.js"}, - {"name":"burn.img","url":"burn-icon.js","evaluate":true} + {"name":"burn.app.js","url":"app.js"}, + {"name":"burn.img","url":"app-icon.js","evaluate":true} ] }