Skip to content

Commit b8db5bc

Browse files
Allow copy on click for SFTP information (pterodactyl#3027)
1 parent 25f6561 commit b8db5bc

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

resources/scripts/components/server/settings/SettingsContainer.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,23 @@ export default () => {
3030
<TitledGreyBox title={'SFTP Details'} css={tw`mb-6 md:mb-10`}>
3131
<div>
3232
<Label>Server Address</Label>
33-
<Input
34-
type={'text'}
35-
value={`sftp://${sftp.ip}:${sftp.port}`}
36-
readOnly
37-
/>
33+
<CopyOnClick text={`sftp://${sftp.ip}:${sftp.port}`}>
34+
<Input
35+
type={'text'}
36+
value={`sftp://${sftp.ip}:${sftp.port}`}
37+
readOnly
38+
/>
39+
</CopyOnClick>
3840
</div>
3941
<div css={tw`mt-6`}>
4042
<Label>Username</Label>
41-
<Input
42-
type={'text'}
43-
value={`${username}.${id}`}
44-
readOnly
45-
/>
43+
<CopyOnClick text={`${username}.${id}`}>
44+
<Input
45+
type={'text'}
46+
value={`${username}.${id}`}
47+
readOnly
48+
/>
49+
</CopyOnClick>
4650
</div>
4751
<div css={tw`mt-6 flex items-center`}>
4852
<div css={tw`flex-1`}>

0 commit comments

Comments
 (0)