From 77aef4c19280d610ccf98daa026e616324c3c33b Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 8 May 2025 09:27:34 -0500 Subject: [PATCH] add ability to use ctrl/cmd S to save in the config editor --- web/src/pages/ConfigEditor.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/src/pages/ConfigEditor.tsx b/web/src/pages/ConfigEditor.tsx index f0efee90a..dc3e642ec 100644 --- a/web/src/pages/ConfigEditor.tsx +++ b/web/src/pages/ConfigEditor.tsx @@ -143,6 +143,12 @@ function ConfigEditor() { scrollBeyondLastLine: false, theme: (systemTheme || theme) == "dark" ? "vs-dark" : "vs-light", }); + editorRef.current?.addCommand( + monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, + () => { + onHandleSaveConfig("saveonly"); + }, + ); } else if (editorRef.current) { editorRef.current.setModel(modelRef.current); } @@ -158,7 +164,7 @@ function ConfigEditor() { } schemaConfiguredRef.current = false; }; - }, [config, apiHost, systemTheme, theme]); + }, [config, apiHost, systemTheme, theme, onHandleSaveConfig]); // monitoring state