Fix profile server selection activation state
This commit is contained in:
@@ -105,7 +105,6 @@ interface ClientOverviewPageProps {
|
||||
error: UiError | null;
|
||||
onAddProfile: (label: string, url: string) => Promise<unknown>;
|
||||
onSelectProfileServer: (profileId: string, serverId: string) => Promise<unknown>;
|
||||
onActivateProfile: (profileId: string) => Promise<unknown>;
|
||||
onRefreshProfile: (profileId: string) => Promise<unknown>;
|
||||
onForgetProfile: (profileId: string, mode: 'delete' | 'stop-and-delete') => Promise<unknown>;
|
||||
onApply: (profileId: string, serverId: string) => Promise<unknown>;
|
||||
@@ -411,7 +410,6 @@ export function ClientOverviewPage({
|
||||
error,
|
||||
onAddProfile,
|
||||
onSelectProfileServer,
|
||||
onActivateProfile,
|
||||
onRefreshProfile,
|
||||
onForgetProfile,
|
||||
onApply,
|
||||
@@ -494,7 +492,6 @@ export function ClientOverviewPage({
|
||||
onAdd: onAddProfile,
|
||||
onRefresh: onRefreshProfile,
|
||||
onForget: onForgetProfile,
|
||||
onActivate: onActivateProfile,
|
||||
onDismissError,
|
||||
});
|
||||
const routingFeature = useRoutingFeature({
|
||||
@@ -553,7 +550,7 @@ export function ClientOverviewPage({
|
||||
}, []);
|
||||
|
||||
function selectServer(profile: ProfileSnapshot, serverId: string) {
|
||||
if (connected && !gatewayDirect && state.selection.appliedProfileId === profile.id) {
|
||||
if (connected && !gatewayDirect) {
|
||||
onApply(profile.id, serverId);
|
||||
return;
|
||||
}
|
||||
@@ -723,9 +720,9 @@ export function ClientOverviewPage({
|
||||
profileId={profile.id}
|
||||
pingServers={actions.pingServers}
|
||||
servers={profile.servers}
|
||||
selectedServerId={profile.desiredServerId}
|
||||
selectedServerId={pickerState.selectedServerId}
|
||||
disabled={serverApplyBlocked || pickerState.disabled}
|
||||
prompt={!profile.desiredServerId}
|
||||
prompt={!pickerState.selectedServerId}
|
||||
leaving={pickerState.leaving}
|
||||
revealVersion={pickerState.revealVersion}
|
||||
anchorServerId={pickerState.anchorServerId}
|
||||
|
||||
Reference in New Issue
Block a user