From 73e942d430b34ec4011160c0eada698f94fd49db Mon Sep 17 00:00:00 2001 From: Jarek Szczepanski Date: Fri, 25 Mar 2016 09:57:40 +0100 Subject: [PATCH] Added point down arrow when actual temperature is above target temperature --- octoprint_navbartemp/static/js/navbartemp.js | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/octoprint_navbartemp/static/js/navbartemp.js b/octoprint_navbartemp/static/js/navbartemp.js index 239f68c..5ef7b48 100644 --- a/octoprint_navbartemp/static/js/navbartemp.js +++ b/octoprint_navbartemp/static/js/navbartemp.js @@ -38,7 +38,8 @@ function formatBarTemperature(toolName, actual, target) { var output = toolName + ": " + _.sprintf("%.1f°C", actual); if (target) { - output += " \u21D7 " + _.sprintf("%.1f°C", target); + var sign = (target >= actual) ? " \u21D7 " : " \u21D8 "; + output += sign + _.sprintf("%.1f°C", target); } return output; diff --git a/setup.py b/setup.py index 18e6afd..d943ce3 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ plugin_identifier = "navbartemp" plugin_package = "octoprint_%s" % plugin_identifier plugin_name = "OctoPrint-NavbarTemp" -plugin_version = "0.7" +plugin_version = "0.8" plugin_description = "Displays temperatures on navbar" plugin_author = "Jarek Szczepanski" plugin_author_email = "imrahil@imrahil.com"