mirror of
https://github.com/stablyai/orca.git
synced 2026-10-18 00:03:20 +00:00
Remove redundant SSH target row in add project
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -211,7 +211,7 @@ describe('AddRepoDialogStepContent nested imports', () => {
|
||||
expect(html).toContain('Open project on SSH host')
|
||||
expect(html).toContain('openclaw 2')
|
||||
expect(html).toContain('Host path')
|
||||
expect(html).toContain('SSH target')
|
||||
expect(html).not.toContain('SSH target')
|
||||
expect(html).not.toContain('github.com')
|
||||
expect(html).not.toContain('Connect')
|
||||
})
|
||||
@@ -239,7 +239,9 @@ describe('AddRepoDialogStepContent nested imports', () => {
|
||||
})
|
||||
|
||||
expect(html).toContain('openclaw 2')
|
||||
expect(html).toContain('is disconnected')
|
||||
expect(html).toContain('Connect')
|
||||
expect(html).not.toContain('SSH target')
|
||||
expect(html).toContain('placeholder="/home/user/project"')
|
||||
expect(html).toContain('disabled=""')
|
||||
})
|
||||
|
||||
@@ -143,17 +143,23 @@ export function RemoteStep({
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
) : selectedTarget ? (
|
||||
<div className="space-y-1">
|
||||
<label className="text-[11px] font-medium text-muted-foreground">
|
||||
{translate('auto.components.sidebar.AddRepoRemoteStep.44637f43bd', 'SSH target')}
|
||||
</label>
|
||||
<SshTargetRow
|
||||
target={selectedTarget}
|
||||
isSelected
|
||||
onSelect={() => undefined}
|
||||
onConnect={onConnectTarget}
|
||||
/>
|
||||
) : selectedTarget && !selectedTargetConnected ? (
|
||||
<div className="flex items-center justify-between gap-3 rounded-md border border-border bg-muted/30 px-3 py-2">
|
||||
<p className="min-w-0 text-xs text-muted-foreground">
|
||||
{translate(
|
||||
'auto.components.sidebar.AddRepoRemoteStep.lockedDisconnected',
|
||||
'{{value0}} is disconnected.',
|
||||
{ value0: selectedTargetLabel ?? 'This SSH host' }
|
||||
)}
|
||||
</p>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="xs"
|
||||
className="shrink-0"
|
||||
onClick={() => onConnectTarget(selectedTarget.id)}
|
||||
>
|
||||
{translate('auto.components.sidebar.AddRepoRemoteStep.93e0221434', 'Connect')}
|
||||
</Button>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user