mirror of
https://github.com/yuto-yuto/node-red-contrib-password-generator.git
synced 2024-11-17 19:05:53 +01:00
22 lines
609 B
TypeScript
22 lines
609 B
TypeScript
import * as nodered from "node-red";
|
|
import { PasswordGeneratorNodeProperties } from "./PasswordGeneratorNodeDef";
|
|
|
|
declare const RED: nodered.EditorRED;
|
|
const nodeName = "password-generator";
|
|
|
|
RED.nodes.registerType<PasswordGeneratorNodeProperties>(nodeName, {
|
|
category: "function",
|
|
color: "#a6bbcf",
|
|
defaults: {
|
|
name: { value: "" },
|
|
length: { value: "", required: true, validate: RED.validators.number() },
|
|
setTo: { value: "" },
|
|
},
|
|
inputs: 1,
|
|
outputs: 1,
|
|
icon: "fas fa-not-equal",
|
|
label: function () {
|
|
return this.name || nodeName;
|
|
},
|
|
});
|