diff --git a/src/renderer/src/components/sidebar/AddRepoHostSelector.tsx b/src/renderer/src/components/sidebar/AddRepoHostSelector.tsx index 592dfd00cf7..9fa10d5d058 100644 --- a/src/renderer/src/components/sidebar/AddRepoHostSelector.tsx +++ b/src/renderer/src/components/sidebar/AddRepoHostSelector.tsx @@ -51,93 +51,82 @@ export function AddRepoHostSelector({ if (!selectedHost) { return null } - const selectedHealthLabel = getSidebarHostHealthLabel(selectedHost.health) - return ( -
-
- - {translate('auto.components.sidebar.AddRepoHostSelector.host', 'Host')} - - - - + + + + + {hosts.map((host) => { + const selected = host.id === selectedHostId + const disabled = !canSelectAddRepoHost(host) + return ( + { + if (disabled) { + return + } + onSelectHost(host.id) + onOpenChange(false) + }} className={cn( - 'max-w-40 truncate text-[10px]', - selectedHost.health === 'available' - ? 'text-muted-foreground' - : 'text-destructive' + 'items-start gap-2 px-3 py-2 text-xs', + disabled && 'cursor-not-allowed opacity-55' )} > - {selectedHealthLabel} - - )} - - - - - - - - {hosts.map((host) => { - const selected = host.id === selectedHostId - const disabled = !canSelectAddRepoHost(host) - return ( - { - if (disabled) { - return - } - onSelectHost(host.id) - onOpenChange(false) - }} + - - - - {host.label} - - {getHostKindLabel(host)} - - - - {getHostStatusDetail(host)} + /> + + + {host.label} + + {getHostKindLabel(host)} - - ) - })} - - - - -
+ + {getHostStatusDetail(host)} + + + + ) + })} + + + +
) }