Skip to content

Commit 8b3bac5

Browse files
committed
modernize add ssh key in account prefs
1 parent 417e623 commit 8b3bac5

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/packages/frontend/account/ssh-keys/ssh-key-adder.tsx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
* License: MS-RSL – see LICENSE.md for details
44
*/
55

6-
// 3rd Party Libraries
7-
import { FormControl, FormGroup, Panel } from "../../antd-bootstrap";
8-
import { Button, Space } from "antd";
9-
import { useState } from "../../app-framework";
10-
import { ErrorDisplay, Icon } from "../../components";
6+
import { Button, Card, Input, Space } from "antd";
7+
import { useState } from "react";
8+
import { A, ErrorDisplay, Icon } from "@cocalc/frontend/components";
119

1210
// Sibling Libraries
1311
import { compute_fingerprint } from "./fingerprint";
@@ -117,27 +115,29 @@ export const SSHKeyAdder: React.FC<Props> = (props: Props) => {
117115

118116
function render_panel() {
119117
return (
120-
<Panel
121-
header={
118+
<Card
119+
title={
122120
<>
123-
<Icon name="plus-circle" /> Add an SSH key
121+
<Icon name="plus-circle" /> Add an{" "}
122+
<A href="https://doc.cocalc.com/account/ssh.html">SSH key</A>
124123
</>
125124
}
126125
style={style}
127126
>
128127
{extra && extra}
129-
<form onSubmit={submit_form}>
130-
<FormGroup>
131-
Title
132-
<FormControl
133-
id="ssh-title"
134-
type="text"
135-
value={key_title}
136-
onChange={(e) => set_key_title((e.target as any).value)}
137-
/>
128+
<div>
129+
Title
130+
<Input
131+
id="ssh-title"
132+
value={key_title}
133+
onChange={(e) => set_key_title(e.target.value)}
134+
placeholder={
135+
"Choose a name for this ssh key to help you keep track of it..."
136+
}
137+
/>
138+
<div style={{ marginTop: "15px" }}>
138139
Key
139-
<FormControl
140-
componentClass="textarea"
140+
<Input.TextArea
141141
value={key_value}
142142
rows={8}
143143
placeholder={`Begins with ${ALLOWED_SSH_TYPES_DESCRIPTION}`}
@@ -150,9 +150,9 @@ export const SSHKeyAdder: React.FC<Props> = (props: Props) => {
150150
}}
151151
style={{ resize: "vertical" }}
152152
/>
153-
</FormGroup>
154-
</form>
155-
<div>
153+
</div>
154+
</div>
155+
<div style={{ marginTop: "15px" }}>
156156
<Space>
157157
{toggleable ? (
158158
<Button onClick={cancel_and_close}>Cancel</Button>
@@ -173,7 +173,7 @@ export const SSHKeyAdder: React.FC<Props> = (props: Props) => {
173173
/>
174174
)}
175175
</div>
176-
</Panel>
176+
</Card>
177177
);
178178
}
179179

0 commit comments

Comments
 (0)