From 22dbb8d3794eb03f9e0de658d500b198e68df5dc Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 18 Apr 2023 16:12:08 +0100 Subject: [PATCH] Updating automation action add modal to split out plugins into their own section. --- .../FlowChart/ActionModal.svelte | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte index e058c48557..3a85c7ed56 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte @@ -34,13 +34,22 @@ const internal = actions.reduce((acc, elm) => { const [k, v] = elm - if (v.internal || v.custom) { + if (v.internal) { acc[k] = v } delete acc.LOOP return acc }, {}) + const plugins = actions.reduce((acc, elm) => { + const [k, v] = elm + if (v.custom) { + acc[k] = v + } + return acc + }, {}) + console.log(plugins) + const selectAction = action => { actionVal = action selectedAction = action.name @@ -116,6 +125,26 @@ {/each} + + {#if Object.keys(plugins).length} + + Plugins +
+ {#each Object.entries(plugins) as [idx, action]} +
selectAction(action)} + > +
+ + {action.name} +
+
+ {/each} +
+
+ {/if}