mirror of
https://github.com/yuto-yuto/node-red-contrib-password-generator.git
synced 2024-12-19 19:07:00 +01:00
61 lines
2.3 KiB
HTML
61 lines
2.3 KiB
HTML
<script type="text/javascript">
|
|
const nodeName = "password-generator";
|
|
RED.nodes.registerType(nodeName, {
|
|
category: "function",
|
|
color: "#D8BFD8",
|
|
defaults: {
|
|
name: { value: "" },
|
|
length: { value: "", required: true, validate: (v) => v > 4 },
|
|
setTo: { value: "" },
|
|
isNumberDisabled: { value: false, require: true },
|
|
isSpecialCharsDisabled: { value: false, require: true },
|
|
isSpaceDisabled: { value: false, require: true },
|
|
},
|
|
inputs: 1,
|
|
outputs: 1,
|
|
icon: "font-awesome/fa-key",
|
|
label: function () {
|
|
return this.name || nodeName;
|
|
},
|
|
});
|
|
</script>
|
|
<script type="text/html" data-template-name="password-generator">
|
|
<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>
|
|
<div class="form-row">
|
|
<label for="node-input-length"> Length</label>
|
|
<input type="text" id="node-input-length">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-setTo"><i class="fa fa-ellipsis-h"></i> to</label>
|
|
<input type="text" id="node-input-setTo">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-isNumberDisabled"> Disable Number</label>
|
|
<input type="checkbox" id="node-input-isNumberDisabled">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-isSpecialCharsDisabled"> Disable Special chars</label>
|
|
<input type="checkbox" id="node-input-isSpecialCharsDisabled">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-isSpaceDisabled"> Disable Space</label>
|
|
<input type="checkbox" id="node-input-isSpaceDisabled">
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/html" data-help-name="password-generator">
|
|
<p>Send incoming message only when the value of the specified key path changes.</p>
|
|
|
|
<h3>Configuration</h3>
|
|
<dl class="message-properties">
|
|
<dt>Length</dt>
|
|
<dd> Password length. It must be 5 or bigger number. </dd>
|
|
<dt>to</dt>
|
|
<dd> The property to set generated password. </dd>
|
|
<dt>Disable options</dt>
|
|
<dd> Excludes the characters from the generated password. </dd>
|
|
</dl>
|
|
</script> |