swarm ui: ask before actions that cannot be undone, with a danger button and a useConfirm hook
Button gains a danger variant and an autofocus prop; ConfirmDialog gains danger (red confirm, focus on cancel). Destroy, delete linked account, delete claude login, remove schedule and delete flow use it. New useConfirm hook asks from inside a handler (await confirm({...})) without a dialog's state at the call site. It now guards: removing a swarm-wide egress domain, removing a domain for every agent from an agent's popover, removing a stored API-key environment, firing a schedule now, moving an agent's internet to a looser mode, the /clear message, and reload over unsaved instructions (replacing window.confirm). The review try-out's button is now called push a branch for a PR, since it pushes a branch and does not open one, and asks first. loosensInternet is a tested helper.
This commit is contained in:
parent
d9551415bf
commit
c3e24fe2c6
1 changed files with 353 additions and 60 deletions
|
|
@ -15,6 +15,11 @@
|
|||
color: var(--fg);
|
||||
border: none;
|
||||
}
|
||||
.ui-button-danger {
|
||||
background: color-mix(in srgb, var(--red) 14%, var(--bg-elev));
|
||||
color: var(--red);
|
||||
border: 1px solid var(--red);
|
||||
}
|
||||
.ui-button-default {
|
||||
background: var(--bg-elev);
|
||||
color: var(--fg);
|
||||
|
|
|
|||
Loading…
Reference in a new issue