Improve failover controls and preserve manual switching state
This commit is contained in:
@@ -710,6 +710,7 @@ export function ClientOverviewPage({
|
||||
activeSwitch?.finish();
|
||||
|
||||
if (current === target) {
|
||||
if (target === 'failover') failoverFeature.pendingTargetRef.current = null;
|
||||
drawerControls[target].close();
|
||||
return;
|
||||
}
|
||||
@@ -717,7 +718,13 @@ export function ClientOverviewPage({
|
||||
routingFeature.requestClose();
|
||||
return;
|
||||
}
|
||||
if (current === 'failover' && !failoverFeature.beforeCloseRef.current()) return;
|
||||
if (current === 'failover') {
|
||||
if (!failoverFeature.beforeCloseRef.current()) {
|
||||
failoverFeature.pendingTargetRef.current = () => switchDrawer(target);
|
||||
return;
|
||||
}
|
||||
failoverFeature.pendingTargetRef.current = null;
|
||||
}
|
||||
if (!current) {
|
||||
drawerControls[target].show();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user