You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit be45bb0
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -171,22 +173,37 @@ export function useRemoteConnections() {
171
173
if(!environment){
172
174
return;
173
175
}
176
+
constremove={
177
+
text: "Remove",
178
+
style: "destructive",
179
+
onPress: ()=>{
180
+
voidcontroller.removeEnvironment(environmentId);
181
+
},
182
+
}asconst;
183
+
// Removing a T3 Connect environment here leaves its account registration
184
+
// and host space, so point to where it can be deregistered.
185
+
if(environment.isRelayManaged){
186
+
Alert.alert(
187
+
"Remove from this device?",
188
+
`Forget ${environment.environmentLabel} and its cached threads on this device.\n\nIt stays on your T3 Connect account and keeps its host space. Deregister it under T3 Account → T3 Connect to free it.`,
@@ -2514,18 +2515,8 @@ export function ConnectionsSettings() {
2514
2515
[setEnvironmentEnabled],
2515
2516
);
2516
2517
2517
-
// Removing forgets the pairing, credentials, and cached threads on this
2518
-
// device. Switching off is the reversible path, so removal always confirms.
2519
-
consthandleRemoveSavedBackend=useCallback(
2518
+
constremoveSavedBackend=useCallback(
2520
2519
async(environment: EnvironmentPresentation)=>{
2521
-
// Fail closed: no mounted confirm host means no removal.
2522
-
constconfirmed=awaitrequestConfirmDialog(
2523
-
`Remove ${environment.label} from this device?\nThis forgets its pairing, credentials, and cached threads here. Switch it off instead to keep it saved.`,
2524
-
{variant: "destructive"},
2525
-
);
2526
-
if(confirmed!==true){
2527
-
return;
2528
-
}
2529
2520
constenvironmentId=environment.environmentId;
2530
2521
setRemovingSavedEnvironmentId(environmentId);
2531
2522
setSavedBackendError(null);
@@ -2547,6 +2538,28 @@ export function ConnectionsSettings() {
2547
2538
[removeEnvironment],
2548
2539
);
2549
2540
2541
+
// Removing forgets the pairing, credentials, and cached threads on this
2542
+
// device. Switching off is the reversible path, so removal always confirms.
2543
+
// T3 Connect environments get their own dialog: removing one here leaves its
2544
+
// account registration, so it points to where that can be deregistered.
// Fail closed: no mounted confirm host means no removal.
2554
+
constconfirmed=awaitrequestConfirmDialog(
2555
+
`Remove ${environment.label} from this device?\nThis forgets its pairing, credentials, and cached threads here. Switch it off instead to keep it saved.`,
0 commit comments