mirror of
https://github.com/yuto-yuto/node-red-contrib-password-generator.git
synced 2024-11-21 19:06:44 +01:00
37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
|
<script type="text/javascript">
|
||
|
RED.nodes.registerType('value-change-detector', {
|
||
|
category: 'function',
|
||
|
color: '#a6bbcf',
|
||
|
defaults: {
|
||
|
name: { value: "" },
|
||
|
key: { value: "", required: true },
|
||
|
value: { value: "", required: true },
|
||
|
},
|
||
|
inputs: 1,
|
||
|
outputs: 1,
|
||
|
icon: "file.png",
|
||
|
label: function () {
|
||
|
return this.name || "value-change-detector";
|
||
|
}
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
<script type="text/html" data-template-name="value-change-detector">
|
||
|
<div class="form-row">
|
||
|
<label for="node-input-key"><i class="fa fa-tag"></i> Key prop</label>
|
||
|
<input type="text" id="node-input-key" placeholder="payload.key">
|
||
|
</div>
|
||
|
<div class="form-row">
|
||
|
<label for="node-input-value"><i class="fa fa-tag"></i> Value prop</label>
|
||
|
<input type="text" id="node-input-value" placeholder="payload.value">
|
||
|
</div>
|
||
|
<div class="form-row">
|
||
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||
|
<input type="text" id="node-input-name" placeholder="Name">
|
||
|
</div>
|
||
|
</script>
|
||
|
|
||
|
<script type="text/html" data-help-name="value-change-detector">
|
||
|
<p>Send incoming message only when the value changes.</p>
|
||
|
</script>
|