Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: show and toggle an agent's unrestricted internet flag, add it to the create dialog

This commit is contained in:
atlas 2026-10-27 13:38:58 +01:00 • committed by mara
commit 10508895c4

View file

@ -38,3 +38,13 @@ export function initialSelection(
...extra.filter((p) => all.includes(p) && !defaults.includes(p)),
];
}
/**
* The create request's internet field: `unrestricted_internet: true` while
* the box is ticked, nothing otherwise, as the server writes `false` for it.
*/
export function requestInternet(ticked: boolean): {
unrestricted_internet?: true;
} {
return ticked ? { unrestricted_internet: true } : {};
}