mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 20:17:42 +03:00
add ability to use ctrl/cmd S to save in the config editor
This commit is contained in:
parent
e923d3cc73
commit
77aef4c192
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user