add ability to use ctrl/cmd S to save in the config editor

This commit is contained in:
Josh Hawkins 2025-05-08 09:27:34 -05:00
parent e923d3cc73
commit 77aef4c192

View File

@ -143,6 +143,12 @@ function ConfigEditor() {
scrollBeyondLastLine: false, scrollBeyondLastLine: false,
theme: (systemTheme || theme) == "dark" ? "vs-dark" : "vs-light", theme: (systemTheme || theme) == "dark" ? "vs-dark" : "vs-light",
}); });
editorRef.current?.addCommand(
monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS,
() => {
onHandleSaveConfig("saveonly");
},
);
} else if (editorRef.current) { } else if (editorRef.current) {
editorRef.current.setModel(modelRef.current); editorRef.current.setModel(modelRef.current);
} }
@ -158,7 +164,7 @@ function ConfigEditor() {
} }
schemaConfiguredRef.current = false; schemaConfiguredRef.current = false;
}; };
}, [config, apiHost, systemTheme, theme]); }, [config, apiHost, systemTheme, theme, onHandleSaveConfig]);
// monitoring state // monitoring state