Skip to content
This repository was archived by the owner on Oct 10, 2026. It is now read-only.

Commit 0506508

Browse files
Allow failed remote environments to be removed (pingdotgg#4084)
Co-authored-by: Julius Marminge <[email protected]>
1 parent b859a57 commit 0506508

1 file changed

Lines changed: 28 additions & 16 deletions

File tree

‎apps/web/src/components/settings/ConnectionsSettings.tsx‎

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,22 +1461,34 @@ function SavedBackendListRow({
14611461
</TooltipPopup>
14621462
</Tooltip>
14631463
) : (
1464-
<Button
1465-
size="xs"
1466-
variant="outline"
1467-
disabled={isConnecting || removingEnvironmentId === environmentId}
1468-
onClick={() =>
1469-
void (isConnected ? onRemove(environmentId) : onConnect(environmentId))
1470-
}
1471-
>
1472-
{isConnected
1473-
? removingEnvironmentId === environmentId
1474-
? "Disconnecting…"
1475-
: "Disconnect"
1476-
: isConnecting
1477-
? "Connecting…"
1478-
: "Connect"}
1479-
</Button>
1464+
<>
1465+
{!isConnected ? (
1466+
<Button
1467+
size="xs"
1468+
variant="outline"
1469+
disabled={removingEnvironmentId === environmentId}
1470+
onClick={() => void onRemove(environmentId)}
1471+
>
1472+
{removingEnvironmentId === environmentId ? "Removing…" : "Remove"}
1473+
</Button>
1474+
) : null}
1475+
<Button
1476+
size="xs"
1477+
variant="outline"
1478+
disabled={isConnecting || removingEnvironmentId === environmentId}
1479+
onClick={() =>
1480+
void (isConnected ? onRemove(environmentId) : onConnect(environmentId))
1481+
}
1482+
>
1483+
{isConnected
1484+
? removingEnvironmentId === environmentId
1485+
? "Disconnecting…"
1486+
: "Disconnect"
1487+
: isConnecting
1488+
? "Connecting…"
1489+
: "Connect"}
1490+
</Button>
1491+
</>
14801492
)}
14811493
</div>
14821494
</div>

0 commit comments

Comments
 (0)