Add advanced-reactor node-red implementation and update package.json references

This commit is contained in:
2025-06-12 11:55:17 +02:00
parent b210a71657
commit 49334f59e9
3 changed files with 38 additions and 3 deletions

9
advanced-reactor.js Normal file
View File

@@ -0,0 +1,9 @@
module.exports = function(RED) {
function reactor(config) {
RED.nodes.createNode(this, config);
var node = this;
let name = config.name;
}
RED.nodes.registerType("advanced-reactor", reactor);
}

View File

@@ -15,13 +15,13 @@
], ],
"license": "SEE LICENSE", "license": "SEE LICENSE",
"author": "P.R. van der Wilt", "author": "P.R. van der Wilt",
"main": "asm3.js", "main": "advanced-reactor.js",
"scripts": { "scripts": {
"test": "node asm3.js" "test": "node advanced-reactor.js"
}, },
"node-red": { "node-red": {
"nodes": { "nodes": {
"asm3": "asm3.js" "advanced-reactor": "advanced-reactor.js"
} }
}, },
"dependencies": { "dependencies": {

26
reactor.html Normal file
View File

@@ -0,0 +1,26 @@
<script type="text/javascript">
RED.nodes.registerType("advanced-reactor",{
category: 'wbd typical',
color: '#c4cce0',
defaults: {
name: {value:""}
},
inputs: 1,
outputs: 1,
icon: "font-awesome/fa-recycle",
label: function() {
return this.name||"advanced-reactor";
}
});
</script>
<script type="text/html" data-template-name="advanced-reactor">
<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="advanced-reactor">
<p>New reactor node</p>
</script>