diff --git a/packages/web_ui/src/components/BaseConfigTree.tsx b/packages/web_ui/src/components/BaseConfigTree.tsx index fcc7c1e8..744ce51d 100644 --- a/packages/web_ui/src/components/BaseConfigTree.tsx +++ b/packages/web_ui/src/components/BaseConfigTree.tsx @@ -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(); diff --git a/packages/web_ui/src/components/HostConfigTree.tsx b/packages/web_ui/src/components/HostConfigTree.tsx index caf8d4a1..693b8e86 100644 --- a/packages/web_ui/src/components/HostConfigTree.tsx +++ b/packages/web_ui/src/components/HostConfigTree.tsx @@ -14,7 +14,7 @@ export default function HostConfigTree(props: { id: number, available: boolean } } async function setConfig(fields: Record>) { - await control.send(new lib.HostConfigSetRequest(fields)); + await control.sendTo({ hostId: props.id }, new lib.HostConfigSetRequest(fields)); } return