Skip to content

Commit 8c08657

Browse files
authored
fix server creation publickey is not copyable (#795)
1 parent 1f6e2b0 commit 8c08657

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

resources/js/pages/servers/components/create-server.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
} from '@/components/ui/dialog';
2929
import ServerTemplates from './templates';
3030
import { ServerTemplate, Service } from '@/types/server-template';
31+
import { Textarea } from '@/components/ui/textarea';
3132

3233
type CreateServerForm = {
3334
provider: string;
@@ -440,18 +441,17 @@ export default function CreateServer({
440441
</AlertDescription>
441442
</Alert>
442443
<FormField>
443-
<Label htmlFor="public_key">Public Key command</Label>
444-
<Button
444+
<Label htmlFor="public_key" className="flex items-center gap-2">
445+
Public Key command
446+
{copySuccess ? <ClipboardCheckIcon className="text-success! size-3" /> : <ClipboardIcon className="size-3 cursor-pointer" />}
447+
</Label>
448+
<Textarea
445449
onClick={copyToClipboard}
446-
variant="outline"
447450
id="public_key"
448-
type="button"
449451
value={page.props.public_key_text}
450-
className="justify-between truncate font-normal"
451-
>
452-
<span className="w-full max-w-2/3 overflow-x-hidden overflow-ellipsis">{page.props.public_key_text}</span>
453-
{copySuccess ? <ClipboardCheckIcon size={5} className="text-success!" /> : <ClipboardIcon size={5} />}
454-
</Button>
452+
className="justify-between overflow-auto font-normal"
453+
spellCheck={false}
454+
></Textarea>
455455
</FormField>
456456
</>
457457
)}

0 commit comments

Comments
 (0)