mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 23:24:52 +09:00
Fix webui error on setting host config (#893)
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user