diff --git a/apps/ha/ChangeLog b/apps/ha/ChangeLog index caf64934e..ebbb7b508 100644 --- a/apps/ha/ChangeLog +++ b/apps/ha/ChangeLog @@ -6,3 +6,4 @@ 0.06: Updated clkinfo icon. 0.07: Update clock_info to avoid a redraw 0.08: Allow swiping to switch triggers +0.09: Improve web interface diff --git a/apps/ha/custom.html b/apps/ha/custom.html deleted file mode 100644 index 49f5a2eb8..000000000 --- a/apps/ha/custom.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -

Upload Tigger

-

-

- - - - - - diff --git a/apps/ha/ha.app.js b/apps/ha/ha.app.js index b7882b79a..14c6dc3be 100644 --- a/apps/ha/ha.app.js +++ b/apps/ha/ha.app.js @@ -17,15 +17,26 @@ function draw() { g.setFontAlign(-1,-1); var icon = trigger.getIcon(); - g.setColor(g.theme.fg).drawImage(icon, 12, H/5-2); - g.drawString("Home", icon.width + 20, H/5); - g.drawString("Assistant", icon.width + 18, H/5+24); + g.setColor(g.theme.fg).drawImage(icon, 12, H/5-2-5); + g.drawString("Home", icon.width + 20, H/5-5); + g.drawString("Assistant", icon.width + 18, H/5+24-5); g.setFontAlign(0,0); - var ypos = H/5*3+20; + var ypos = H/5*3+23; g.drawRect(W/2-w/2-8, ypos-h/2-8, W/2+w/2+5, ypos+h/2+5); g.fillRect(W/2-w/2-6, ypos-h/2-6, W/2+w/2+3, ypos+h/2+3); g.setColor(g.theme.bg).drawString(trigger.display, W/2, ypos); + + // draw arrows + g.setColor(g.theme.fg); + if (position > 0) { + g.drawLine(10, H/2, 20, H/2 - 10); + g.drawLine(10, H/2, 20, H/2 + 10); + } + if (position < triggers.length -1) { + g.drawLine(W - 10, H/2, W - 20, H/2 - 10); + g.drawLine(W - 10, H/2, W - 20, H/2 + 10); + } } function toLeft() { diff --git a/apps/ha/interface.html b/apps/ha/interface.html new file mode 100644 index 000000000..947c27e7a --- /dev/null +++ b/apps/ha/interface.html @@ -0,0 +1,52 @@ + + + + + +

Home Assistant trigger config

+

+

+ + + + + + diff --git a/apps/ha/metadata.json b/apps/ha/metadata.json index 3ae3f9e54..d44b4b6f8 100644 --- a/apps/ha/metadata.json +++ b/apps/ha/metadata.json @@ -1,14 +1,14 @@ { "id": "ha", "name": "Home Assistant", - "version": "0.08", + "version": "0.09", "description": "Integrates your Bangle.js into Home Assistant.", "icon": "ha.png", "type": "app", - "tags": "tool,clkinfo", + "tags": "tool,clkinfo,bluetooth", "readme": "README.md", "supports": ["BANGLEJS2"], - "custom": "custom.html", + "interface": "interface.html", "screenshots": [ {"url":"screenshot.png"}, {"url":"screenshot_2.png"},