Added server status to nodes that didn't have it

This commit is contained in:
2021-08-18 14:19:56 -06:00
parent 2b2c628904
commit dc5f744e5f
4 changed files with 40 additions and 0 deletions
+10
View File
@@ -22,6 +22,16 @@ module.exports = function(RED) {
return;
}
node.status({ fill: "red", shape: "ring", text: "disconnected" });
node.server.on("disconnected", function(){
node.status({ fill: "red", shape: "ring", text: "disconnected" });
});
node.server.on("connected", function() {
node.status({ fill: "green", shape: "ring", text: "connected" });
});
node.on("input", function (msg) {
if(!msg.payload.username) {