From 4cd7c31d831c65f24ad3cb89f3d10580c2ef88b0 Mon Sep 17 00:00:00 2001 From: rr807 Date: Thu, 7 May 2026 14:43:51 +0200 Subject: [PATCH] feat(flow2src): add support for Node-RED Dashboard v2 ui-template node --- flow2src/flow2src.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/flow2src/flow2src.js b/flow2src/flow2src.js index 46dabef..5d94c5b 100644 --- a/flow2src/flow2src.js +++ b/flow2src/flow2src.js @@ -120,7 +120,7 @@ module.exports = function(RED) { idMap[obj.id] = { folder: obj.name.replace(/[^a-z0-9]/gi, '_'), subflow: true }; } // Gather nodes and templates - if (obj.type == 'template' || obj.type == 'function' || obj.type == 'wp function') { + if (obj.type == 'template' || obj.type == 'ui-template' || obj.type == 'function' || obj.type == 'wp function') { theNodes.push(obj); } }); @@ -146,6 +146,9 @@ module.exports = function(RED) { ext = '.' + ext; } } + if (obj.type == 'ui-template') { + ext = '.html'; + } if (obj.type == 'function') { ext = '.js'; } @@ -180,6 +183,13 @@ module.exports = function(RED) { subflow: info.subflow }); existingFiles.push(file); + } else if (obj.type == 'ui-template') { + obj.srcFiles.push({ + id: obj.id, + property: 'format', + file: file + }); + existingFiles.push(file); } else if (obj.type == 'function') { obj.srcFiles.push({ id: obj.id,