This commit is contained in:
legop3
2025-11-18 00:09:48 -05:00
parent 7390d5c1ac
commit 5c66bbd809
4 changed files with 23 additions and 23 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>webui</title>
<script type="module" crossorigin src="/assets/index-DNSnH2id.js"></script>
<script type="module" crossorigin src="/assets/index-BdPhVyWy.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-C4V7xiyW.css">
</head>
<body>
+1 -1
View File
@@ -31,7 +31,7 @@ export default function AdvancedSettings() {
if (!roverId) return;
setSensorStream(enable);
};
// why is this broken
return (
<div className="space-y-1">
<KeymapSettings />
+17 -17
View File
@@ -98,6 +98,23 @@ export function ControlSystemProvider({ children }) {
[pipeline],
);
const persistSettings = useCallback(
(partial) => {
const merged = { ...(state.settings.data ?? {}), ...(partial ?? {}) };
const success = saveControlSettings(merged);
if (success) {
dispatch({ type: 'control/settings/loaded', payload: merged });
} else {
dispatch({
type: 'control/settings/error',
payload: new Error('Failed to save control settings'),
});
}
return success;
},
[state.settings.data],
);
const updateKeyBinding = useCallback(
(bindingId, keyValue) => {
if (!bindingId) return false;
@@ -207,23 +224,6 @@ export function ControlSystemProvider({ children }) {
dispatch({ type: 'control/settings/loaded', payload: next });
}, []);
const persistSettings = useCallback(
(partial) => {
const merged = { ...(state.settings.data ?? {}), ...(partial ?? {}) };
const success = saveControlSettings(merged);
if (success) {
dispatch({ type: 'control/settings/loaded', payload: merged });
} else {
dispatch({
type: 'control/settings/error',
payload: new Error('Failed to save control settings'),
});
}
return success;
},
[state.settings.data],
);
const contextValue = useMemo(
() => ({
state,