diff --git a/apps/a_clock_timer/ChangeLog b/apps/a_clock_timer/ChangeLog index 262f30295..cfb53c432 100644 --- a/apps/a_clock_timer/ChangeLog +++ b/apps/a_clock_timer/ChangeLog @@ -1,3 +1,4 @@ 0.01: Beta version for Bangle 2 (2021/11/28) 0.02: Shows night time on the map (2022/12/28) 0.03: Add 1 minute timer with upper taps (2023/01/05) +1.00: Page to set up custom time zones (2023/01/06) \ No newline at end of file diff --git a/apps/a_clock_timer/README.md b/apps/a_clock_timer/README.md index 3fcc00b28..c9c5793f4 100644 --- a/apps/a_clock_timer/README.md +++ b/apps/a_clock_timer/README.md @@ -8,11 +8,11 @@ * Bottom Left tap: decrease by 5 minutes * Short buzz at T-30, T-20, T-10 ; Double buzz at T * Other time zones - * Currently hardcoded to Paris and Tokyo (this will be customizable in a future version) + * Showing Paris and Tokyo by default, but you can customize this using the dedicated configuration page on the app store * World Map * The map shows day and night on Earth and the position of the Sun (yellow line) ![](screenshot.png) ## Creator -[@alainsaas](https://github.com/alainsaas) +[@alainsaas](https://github.com/alainsaas) \ No newline at end of file diff --git a/apps/a_clock_timer/app.js b/apps/a_clock_timer/app.js index 441229842..0667e9bb0 100644 --- a/apps/a_clock_timer/app.js +++ b/apps/a_clock_timer/app.js @@ -89,6 +89,7 @@ function showWelcomeMessage() { } // time +var offsets = require("Storage").readJSON("a_clock_timer.settings.json") || [ ["PAR",1], ["TYO",9] ]; var drawTimeout; function getGmt() { @@ -138,8 +139,8 @@ function draw() { g.setFont("Michroma36").drawString(locale.time(date,1), g.getWidth()/2, 46); g.setFont("6x8"); g.drawString(locale.date(new Date(),1), 125, 68); - g.drawString("PAR "+locale.time(getTimeFromTimezone(1),1), 125, 80); - g.drawString("TYO "+locale.time(getTimeFromTimezone(9),1), 125, 88); + g.drawString(offsets[0][0]+" "+locale.time(getTimeFromTimezone(offsets[0][1]),1), 125, 80); + g.drawString(offsets[1][0]+" "+locale.time(getTimeFromTimezone(offsets[1][1]),1), 125, 88); queueNextDraw(); } @@ -150,4 +151,4 @@ draw(); Bangle.setUI("clock"); Bangle.loadWidgets(); Bangle.drawWidgets(); -showWelcomeMessage(); +showWelcomeMessage(); \ No newline at end of file diff --git a/apps/a_clock_timer/custom.html b/apps/a_clock_timer/custom.html new file mode 100644 index 000000000..34a512fe6 --- /dev/null +++ b/apps/a_clock_timer/custom.html @@ -0,0 +1,59 @@ + + + + + +

You can set the 2 additional timezones displayed by the clock.

+ + + + + +
NameUTC Offset (Hours)
+

Click

+ + + + \ No newline at end of file diff --git a/apps/a_clock_timer/metadata.json b/apps/a_clock_timer/metadata.json index 4e7a36b8a..ce9429e6a 100644 --- a/apps/a_clock_timer/metadata.json +++ b/apps/a_clock_timer/metadata.json @@ -1,7 +1,7 @@ { "id": "a_clock_timer", "name": "A Clock with Timer", - "version": "0.03", + "version": "1.00", "description": "A Clock with Timer, Map and Time Zones", "icon": "app.png", "screenshots": [{"url":"screenshot.png"}], @@ -10,8 +10,10 @@ "supports": ["BANGLEJS2"], "allow_emulator": true, "readme": "README.md", + "custom": "custom.html", "storage": [ {"name":"a_clock_timer.app.js","url":"app.js"}, {"name":"a_clock_timer.img","url":"app-icon.js","evaluate":true} - ] -} + ], + "data": [{"name":"a_clock_timer.settings.json"}] +} \ No newline at end of file