Fix webui error on setting host config (#893)

This commit is contained in:
Cooldude2606 authored and GitHub committed 2026-04-14 21:21:00 +01:00
1 parent 490e9c0e5f
commit 3667b4733a
2 files changed
+3 -3

No files matched your search

@@ -9,7 +9,7 @@ import * as lib from "@clusterio/lib";
import ControlContext from "./ControlContext";
import { InputComponent, InputComponentProps } from "../BaseWebPlugin";
import type { Control } from "../util/websocket";
import { notifyErrorHandler } from "../util/notify";
import notify from "../util/notify";
const { Title } = Typography;
@@ -183,7 +183,7 @@ export default function BaseConfigTree(props: BaseConfigTreeProps) {
await props.setConfig(fields);
setChangedFields(new Set());
} catch (err: any) {
notifyErrorHandler(err.message);
notify(err.message, "error");
}
await updateConfig();
@@ -14,7 +14,7 @@ export default function HostConfigTree(props: { id: number, available: boolean }
}
async function setConfig(fields: Record<string, string | Record<string, string>>) {
await control.send(new lib.HostConfigSetRequest(fields));
await control.sendTo({ hostId: props.id }, new lib.HostConfigSetRequest(fields));
}
return <BaseConfigTree