Skip to content

Commit

Permalink
fix(deployment): improve ssh key generate button
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 committed Oct 11, 2024
1 parent 4858e65 commit d8ecfc1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions apps/deploy-web/src/components/sdl/SSHKeyFromControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,24 @@ export const SSHKeyFormControl: FC<SSHKeyInputProps> = ({ control, serviceIndex,
</CustomTooltip>
</div>
}
placeholder="ssh-..."
placeholder="Enter your own pub key: ssh-.."
className="flex-grow"
inputClassName="pr-[100px]"
value={field.value}
onChange={event => field.onChange(event.target.value || "")}
startIcon={<Key className="ml-2 text-xs text-muted-foreground" />}
endIcon={
<Button onClick={generateSSHKeys} type="button" size="sm" className="h-full" data-testid="generate-ssh-keys-btn">
Generate
</Button>
}
data-testid="ssh-public-key-input"
/>
)}
/>

<div className="mt-2 flex items-center justify-end space-x-2">
<span className="text-sm text-muted-foreground">Or</span>
<Button onClick={generateSSHKeys} type="button" size="xs" data-testid="generate-ssh-keys-btn">
Generate new key
</Button>
</div>

{hasGenerated && (
<div className="mt-2 text-sm text-muted-foreground">
<h4 className="text-lg">How to use</h4>
Expand Down

0 comments on commit d8ecfc1

Please sign in to comment.