From 1dbe03c0a1fea033496b0d2737f048122dc749ad Mon Sep 17 00:00:00 2001 From: chrono Date: Tue, 10 Dec 2013 14:10:56 +0000 Subject: [PATCH] More UI status update fixes --- public/assets/css/picoreflow.css | 63 ++++++++++++++++++++++++++++++-- public/assets/js/picoreflow.js | 18 +++------ public/index.html | 12 ++---- storage/profiles/leadfree.json | 2 +- 4 files changed, 70 insertions(+), 25 deletions(-) diff --git a/public/assets/css/picoreflow.css b/public/assets/css/picoreflow.css index df8fdb9..d37e898 100644 --- a/public/assets/css/picoreflow.css +++ b/public/assets/css/picoreflow.css @@ -26,7 +26,7 @@ body { -moz-border-radius: 7px; border-radius: 7px; border: 1px solid #ddd; - height: 81px; + height: 80px; -moz-box-shadow: 0 0 1.1em 0 rgba(0,0,0,0.55); -webkit-box-shadow: 0 0 1.5em 0 rgba(0,0,0,0.55); box-shadow: 0 0 1.1em 0 rgba(0,0,0,0.55); @@ -46,7 +46,6 @@ body { } .ds-panel { - border-top: 1px solid #000; background: #3F3E3A url('/picoreflow/assets/images/panel_bg.png') repeat; -moz-box-shadow: inset 0 0 42px 0 #000; -webkit-box-shadow: inset 0 0 42px 0 #000; @@ -114,11 +113,56 @@ body { } .ds-led { - margin: -5px; font-family: "Tables"; font-size: 38px; + text-align: center; color: #1F1E1A; text-shadow: 0 0 5px #000, 0 0 5px #000; + border-left: 1px solid #b9b6af; + height: 40px; + width: 42px; + display: inline-block; +} + + +.ds-led-hazard-active { + color: rgb(255, 204, 0); + background: -moz-radial-gradient(center, ellipse cover, rgba(242,195,67,1) 0%, rgba(241,218,54,0.26) 100%); /* FF3.6+ */ + background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(242,195,67,1)), color-stop(100%,rgba(241,218,54,0.26))); /* Chrome,Safari4+ */ + background: -webkit-radial-gradient(center, ellipse cover, rgba(242,195,67,1) 0%,rgba(241,218,54,0.26) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-radial-gradient(center, ellipse cover, rgba(242,195,67,1) 0%,rgba(241,218,54,0.26) 100%); /* Opera 12+ */ + background: -ms-radial-gradient(center, ellipse cover, rgba(242,195,67,1) 0%,rgba(241,218,54,0.26) 100%); /* IE10+ */ + background: radial-gradient(ellipse at center, rgba(242,195,67,1) 0%,rgba(241,218,54,0.26) 100%); /* W3C */ +} + +.ds-led-cool-active { + color: rgb(74, 159, 255); + background: -moz-radial-gradient(center, ellipse cover, rgba(124,197,239,1) 0%, rgba(48,144,209,0.26) 100%); /* FF3.6+ */ + background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(124,197,239,1)), color-stop(100%,rgba(48,144,209,0.26))); /* Chrome,Safari4+ */ + background: -webkit-radial-gradient(center, ellipse cover, rgba(124,197,239,1) 0%,rgba(48,144,209,0.26) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-radial-gradient(center, ellipse cover, rgba(124,197,239,1) 0%,rgba(48,144,209,0.26) 100%); /* Opera 12+ */ + background: -ms-radial-gradient(center, ellipse cover, rgba(124,197,239,1) 0%,rgba(48,144,209,0.26) 100%); /* IE10+ */ + background: radial-gradient(ellipse at center, rgba(124,197,239,1) 0%,rgba(48,144,209,0.26) 100%); /* W3C */ +} + +.ds-led-heat-active { + color: rgb(214, 42, 0); + background: -moz-radial-gradient(center, ellipse cover, rgba(214,25,25,1) 0%, rgba(214,42,0,0.26) 100%); /* FF3.6+ */ + background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(214,25,25,1)), color-stop(100%,rgba(214,42,0,0.26))); /* Chrome,Safari4+ */ + background: -webkit-radial-gradient(center, ellipse cover, rgba(214,25,25,1) 0%,rgba(214,42,0,0.26) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-radial-gradient(center, ellipse cover, rgba(214,25,25,1) 0%,rgba(214,42,0,0.26) 100%); /* Opera 12+ */ + background: -ms-radial-gradient(center, ellipse cover, rgba(214,25,25,1) 0%,rgba(214,42,0,0.26) 100%); /* IE10+ */ + background: radial-gradient(ellipse at center, rgba(214,25,25,1) 0%,rgba(214,42,0,0.26) 100%); /* W3C */ +} + +.ds-led-air-active { + color: rgb(240, 240, 240); + background: -moz-radial-gradient(center, ellipse cover, rgba(221,221,221,1) 0%, rgba(221,221,221,0.26) 100%); /* FF3.6+ */ + background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(221,221,221,1)), color-stop(100%,rgba(221,221,221,0.26))); /* Chrome,Safari4+ */ + background: -webkit-radial-gradient(center, ellipse cover, rgba(221,221,221,1) 0%,rgba(221,221,221,0.26) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-radial-gradient(center, ellipse cover, rgba(221,221,221,1) 0%,rgba(221,221,221,0.26) 100%); /* Opera 12+ */ + background: -ms-radial-gradient(center, ellipse cover, rgba(221,221,221,1) 0%,rgba(221,221,221,0.26) 100%); /* IE10+ */ + background: radial-gradient(ellipse at center, rgba(221,221,221,1) 0%,rgba(221,221,221,0.26) 100%); /* W3C */ } .ds-trend { @@ -135,9 +179,22 @@ body { .ds-state { border: none; width: initial; + text-align: center; + width: 168px; + padding: 0; +} + +.ds-state { + border: none; + width: initial; + text-align: center; + width: 168px; + padding: 0; } .ds-text { + border: none; + width: initial; font-family: sans-serif; font-size: 32px; } diff --git a/public/assets/js/picoreflow.js b/public/assets/js/picoreflow.js index eecfbc1..7f36081 100644 --- a/public/assets/js/picoreflow.js +++ b/public/assets/js/picoreflow.js @@ -456,7 +456,7 @@ $(document).ready(function() eta = minutes+':'+ (seconds < 10 ? "0" : "") + seconds; updateProgress(parseFloat(x.runtime)/parseFloat(x.totaltime)*100); - $('#state').html(eta); + $('#state').html('' + eta + ''); $('#target_temp').html(parseInt(x.target)); } @@ -468,25 +468,19 @@ $(document).ready(function() } $('#act_temp').html(parseInt(x.temperature)); - $('#hazard').css("color", (x.temperature > 45 ? "rgb(255, 204, 0)" : "rgba(12, 12, 12, 0.62") ); - $('#heat').css("color", (x.heat > 0.5 ? "rgba(233, 28, 0, 0.84)" : "rgba(46, 12, 12, 0.62") ); - //$('#heat').css("text-shadow", (x.heat > 0.5 ? "0 0 5px rgba(233, 28, 0, 0.84), inset 0 0 5px 2px rgba(255,255,255,0.25)" : "0 0 1.1em rgba(0,0,0,0.75)") ); - $('#air').css("color", (x.air > 0.5 ? "rgba(216, 211, 197, 1)" : "rgba(55, 55, 55, 0.62)") ); - //$('#air').css("text-shadow", (x.air > 0.5 ? "0 0 5px rgba(240, 199, 67, 0.84), inset 0 0 5px 2px rgba(255,255,255,0.25)" : "0 0 1.1em rgba(0,0,0,0.75)") ); - $('#cool').css("color", (x.cool > 0.5 ? "rgba(74, 159, 255, 0.84)" : "rgba(12, 28, 46, 0.62)") ); - //$('#cool').css("text-shadow", (x.cool > 0.5 ? "0 0 5px rgba(74, 159, 255, 0.84), inset 0 0 5px 2px rgba(255,255,255,0.25)" : "0 0 1.1em rgba(0,0,0,0.75)") ); + if (x.heat > 0.5) { $('#heat').addClass("ds-led-heat-active"); } else { $('#heat').removeClass("ds-led-heat-active"); } + if (x.cool > 0.5) { $('#cool').addClass("ds-led-cool-active"); } else { $('#cool').removeClass("ds-led-cool-active"); } + if (x.air > 0.5) { $('#air').addClass("ds-led-air-active"); } else { $('#air').removeClass("ds-led-air-active"); } + if (x.temperature > 45) { $('#hazard').addClass("ds-led-hazard-active"); } else { $('#hazard').removeClass("ds-led-hazard-active"); } state_last = state; } }; - - // Control Socket //////////////////////////////// - ws_control.onopen = function() { @@ -552,9 +546,7 @@ $(document).ready(function() $('#e2').select2('val', i); updateProfile(i); } - } - }; diff --git a/public/index.html b/public/index.html index 12fe053..4cc6d69 100644 --- a/public/index.html +++ b/public/index.html @@ -30,18 +30,14 @@
Sensor Temp
Target Temp
-
Status
+
Status
+
25°C
---°C
-
-
- I - [ - \ - l -
+
+
\l[I
diff --git a/storage/profiles/leadfree.json b/storage/profiles/leadfree.json index 57ea758..8fb5cf0 100644 --- a/storage/profiles/leadfree.json +++ b/storage/profiles/leadfree.json @@ -1 +1 @@ -{"type": "profile", "data": [[0, 25], [90, 150], [180, 183], [211, 237], [234, 184], [2297420, 137]], "name": "leadfree"} \ No newline at end of file +{"type": "profile", "data": [[0, 25], [90, 150], [180, 183], [211, 237], [234, 184], [313, 26]], "name": "leadfree"} \ No newline at end of file