mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 21:26:33 +00:00
42 lines
1.3 KiB
HTML
42 lines
1.3 KiB
HTML
|
|
<script type="text/javascript">
|
||
|
|
RED.nodes.registerType("bf-layout-switch", {
|
||
|
|
category: "BetterFrame",
|
||
|
|
color: "#a6d4ff",
|
||
|
|
defaults: {
|
||
|
|
name: { value: "" },
|
||
|
|
config: { value: "", type: "bf-config", required: true },
|
||
|
|
display_id: { value: "" },
|
||
|
|
layout_id: { value: "" },
|
||
|
|
},
|
||
|
|
inputs: 1,
|
||
|
|
outputs: 1,
|
||
|
|
icon: "betterframe.svg",
|
||
|
|
label: function () {
|
||
|
|
return this.name || "bf layout switch";
|
||
|
|
},
|
||
|
|
paletteLabel: "bf layout switch",
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<script type="text/html" data-template-name="bf-layout-switch">
|
||
|
|
<div class="form-row">
|
||
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||
|
|
<input type="text" id="node-input-name" />
|
||
|
|
</div>
|
||
|
|
<div class="form-row">
|
||
|
|
<label for="node-input-config"><i class="fa fa-cog"></i> BF</label>
|
||
|
|
<input type="text" id="node-input-config" />
|
||
|
|
</div>
|
||
|
|
<div class="form-row">
|
||
|
|
<label for="node-input-display_id"><i class="fa fa-tv"></i> Display ID</label>
|
||
|
|
<input type="number" id="node-input-display_id" />
|
||
|
|
</div>
|
||
|
|
<div class="form-row">
|
||
|
|
<label for="node-input-layout_id"><i class="fa fa-th"></i> Layout ID</label>
|
||
|
|
<input type="number" id="node-input-layout_id" />
|
||
|
|
</div>
|
||
|
|
<div class="form-tips">
|
||
|
|
Either field can be overridden by <code>msg.display_id</code> / <code>msg.layout_id</code>.
|
||
|
|
</div>
|
||
|
|
</script>
|