mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 22:26:33 +00:00
Renames:
- bf-config → bf-server-config (config node clarity)
- bf-event-in → bf-kiosk-camera-event (specific camera trigger)
New trigger nodes (input-only, under "BetterFrame Triggers"):
- bf-trigger-display-power, bf-trigger-layout-changed,
bf-trigger-kiosk-changed, bf-trigger-camera-changed
New flow nodes:
- bf-config-get: query state by type (displays/kiosks/cameras/layouts/
entities, or by-id)
- bf-config-set: mutate via typed setters (default-layout, enabled,
priority, name)
Server-side event emission:
- shared/strip-secrets.ts: recursive password scrub
- New JSON admin endpoints: GET/POST /api/admin/{displays,kiosks,
layouts,entities}[/:id]
- Coordinator-ws fires kiosk.changed on connect/disconnect/heartbeat
- Layout/power/camera routes call nodered.forward() on state change
37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType("bf-cameras", {
|
|
category: "BetterFrame",
|
|
color: "#a6d4ff",
|
|
defaults: {
|
|
name: { value: "" },
|
|
config: { value: "", type: "bf-server-config", required: true },
|
|
label: { value: "" },
|
|
},
|
|
inputs: 1,
|
|
outputs: 1,
|
|
icon: "betterframe.svg",
|
|
label: function () {
|
|
return this.name || "bf cameras";
|
|
},
|
|
paletteLabel: "bf cameras",
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" data-template-name="bf-cameras">
|
|
<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-label"><i class="fa fa-tag"></i> Filter label</label>
|
|
<input type="text" id="node-input-label" placeholder="(blank = all)" />
|
|
</div>
|
|
<div class="form-tips">
|
|
Outputs <code>msg.payload</code> = array of <code>{id, name, type, enabled, labels}</code>.
|
|
Override label via <code>msg.label</code>.
|
|
</div>
|
|
</script>
|