diff --git a/frontend/src/lib/components/FlowBuilder.svelte b/frontend/src/lib/components/FlowBuilder.svelte index 981387096f..6a33ac03fd 100644 --- a/frontend/src/lib/components/FlowBuilder.svelte +++ b/frontend/src/lib/components/FlowBuilder.svelte @@ -420,12 +420,14 @@ const dropdownItems: Array<{ label: string onClick: () => void - }> = [ - { + }> = [] + + if (savedFlow?.draft_only === false) { + dropdownItems.push({ label: 'Exit & see details', onClick: () => dispatch('details', $pathStore) - } - ] + }) + } if (!newFlow) { dropdownItems.push({ diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte index 49ca84f40b..ee03ada182 100644 --- a/frontend/src/lib/components/ScriptBuilder.svelte +++ b/frontend/src/lib/components/ScriptBuilder.svelte @@ -314,12 +314,16 @@ window.open(`/scripts/add?template=${initialPath}`) } }, - { - label: 'Exit & See details', - onClick: () => { - goto(`/scripts/get/${initialPath}?workspace=${$workspaceStore}`) - } - } + ...(!script.draft_only + ? [ + { + label: 'Exit & See details', + onClick: () => { + goto(`/scripts/get/${initialPath}?workspace=${$workspaceStore}`) + } + } + ] + : []) ] : [] @@ -584,7 +588,8 @@ {:else}