Skip to content
Source
Sign inSign up
pingdotgg/t3code

Allow failed remote environments to be removed #4084

Mergedzepi2509(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/4084/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 28 additions and 16 deletions.

x
0 of 1 viewed, 1 left
28 additions and 16 deletionsapps/web/src/components/settings/ConnectionsSettings.tsxModified
View file
@@ -1461,22 +1461,34 @@
</TooltipPopup>
</Tooltip>
) : (
- <Button
- size="xs"
- variant="outline"
- disabled={isConnecting || removingEnvironmentId === environmentId}
- onClick={() =>
- void (isConnected ? onRemove(environmentId) : onConnect(environmentId))
- }
- >
- {isConnected
- ? removingEnvironmentId === environmentId
- ? "Disconnecting…"
- : "Disconnect"
- : isConnecting
- ? "Connecting…"
- : "Connect"}
- </Button>
+ <>
+ {!isConnected ? (
+ <Button
+ size="xs"
+ variant="outline"
+ disabled={removingEnvironmentId === environmentId}
+ onClick={() => void onRemove(environmentId)}
+ >
+ {removingEnvironmentId === environmentId ? "Removing…" : "Remove"}
+ </Button>