diff --git a/frontend/src/lib/components/Editor.svelte b/frontend/src/lib/components/Editor.svelte index cbba40edc0..1274aa6961 100644 --- a/frontend/src/lib/components/Editor.svelte +++ b/frontend/src/lib/components/Editor.svelte @@ -364,20 +364,6 @@ editorConfig(model, code, lang, automaticLayout) ) - if (shouldBindKey) { - editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, function () { - code = getCode() - format() - }) - - editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter, function () { - if (cmdEnterAction) { - code = getCode() - cmdEnterAction() - } - }) - } - let timeoutModel: NodeJS.Timeout | undefined = undefined editor.onDidChangeModelContent((event) => { timeoutModel && clearTimeout(timeoutModel) @@ -389,6 +375,17 @@ editor.onDidFocusEditorText(() => { dispatch('focus') + + editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, function () { + code = getCode() + shouldBindKey && format && format() + }) + + editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter, function () { + code = getCode() + shouldBindKey && cmdEnterAction && cmdEnterAction() + }) + if ( !websocketAlive.black && !websocketAlive.deno && diff --git a/frontend/src/lib/components/FlowBuilder.svelte b/frontend/src/lib/components/FlowBuilder.svelte index 865911206b..41edc7697c 100644 --- a/frontend/src/lib/components/FlowBuilder.svelte +++ b/frontend/src/lib/components/FlowBuilder.svelte @@ -158,6 +158,16 @@
+
+ +
diff --git a/frontend/src/lib/components/flows/header/FlowEditorHeader.svelte b/frontend/src/lib/components/flows/header/FlowEditorHeader.svelte index 8c71cf6175..25499aad08 100644 --- a/frontend/src/lib/components/flows/header/FlowEditorHeader.svelte +++ b/frontend/src/lib/components/flows/header/FlowEditorHeader.svelte @@ -1,27 +1,9 @@
-
- -