remove old x-red style for better highlighting

This commit is contained in:
Dave Conway-Jones 2021-06-23 12:21:19 +01:00
parent eb8bae6782
commit cdcafbad1d
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
2 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
<script type="text/x-red" data-template-name="blink1"> <script type="text/html" data-template-name="blink1">
<div class="form-row"> <div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name"> <input type="text" id="node-input-name" placeholder="Name">
@ -14,7 +14,7 @@
</div> </div>
</script> </script>
<script type="text/x-red" data-help-name="blink1"> <script type="text/html" data-help-name="blink1">
<p>ThingM Blink1 output node.</p> <p>ThingM Blink1 output node.</p>
<p>Expects a <code>msg.payload</code> with either a three part csv string of <p>Expects a <code>msg.payload</code> with either a three part csv string of
<i>r,g,b</i> or a hex colour <i>#rrggbb</i></p> <i>r,g,b</i> or a hex colour <i>#rrggbb</i></p>
@ -38,7 +38,7 @@
icon: "light.png", icon: "light.png",
align: "right", align: "right",
label: function() { label: function() {
return this.name||"blink1 out"; return this.name||"blink1";
}, },
labelStyle: function() { labelStyle: function() {
return this.name?"node_label_italic":""; return this.name?"node_label_italic":"";
@ -59,7 +59,7 @@
}); });
</script> </script>
<script type="text/x-red" data-template-name="blink1 in"> <script type="text/html" data-template-name="blink1 in">
<div class="form-row"> <div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name"> <input type="text" id="node-input-name" placeholder="Name">
@ -71,7 +71,7 @@
</div> </div>
</script> </script>
<script type="text/x-red" data-help-name="blink1 in"> <script type="text/html" data-help-name="blink1 in">
<p>ThingM Blink1 input node.</p> <p>ThingM Blink1 input node.</p>
<p>Outputs the current RGB value as array <code>[r,g,b]</code> or "off" as string if RGB is 0,0,0 to <code>msg.payload</code>.</p> <p>Outputs the current RGB value as array <code>[r,g,b]</code> or "off" as string if RGB is 0,0,0 to <code>msg.payload</code>.</p>
</script> </script>

View File

@ -4,7 +4,7 @@ module.exports = function(RED) {
var Blink1 = require("node-blink1"); var Blink1 = require("node-blink1");
var blink1 = {}; var blink1 = {};
function Blink1OutNode(n) { function Blink1Node(n) {
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);
this.serial = n.serial; this.serial = n.serial;
if (!this.serial) { delete this.serial; } if (!this.serial) { delete this.serial; }
@ -83,7 +83,8 @@ module.exports = function(RED) {
node.error("No Blink1 found (" + e + ")"); node.error("No Blink1 found (" + e + ")");
} }
} }
RED.nodes.registerType("blink1",Blink1OutNode); RED.nodes.registerType("blink1",Blink1Node);
function Blink1InNode(n) { function Blink1InNode(n) {
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);