swarm-ui: show and toggle an agent's unrestricted internet flag, add it to the create dialog
This commit is contained in:
parent
24beb167d8
commit
10508895c4
1 changed files with 136 additions and 2 deletions
|
|
@ -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 } : {};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue