3
3
* License: MS-RSL – see LICENSE.md for details
4
4
*/
5
5
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" ;
11
9
12
10
// Sibling Libraries
13
11
import { compute_fingerprint } from "./fingerprint" ;
@@ -117,27 +115,29 @@ export const SSHKeyAdder: React.FC<Props> = (props: Props) => {
117
115
118
116
function render_panel ( ) {
119
117
return (
120
- < Panel
121
- header = {
118
+ < Card
119
+ title = {
122
120
< >
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 >
124
123
</ >
125
124
}
126
125
style = { style }
127
126
>
128
127
{ 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" } } >
138
139
Key
139
- < FormControl
140
- componentClass = "textarea"
140
+ < Input . TextArea
141
141
value = { key_value }
142
142
rows = { 8 }
143
143
placeholder = { `Begins with ${ ALLOWED_SSH_TYPES_DESCRIPTION } ` }
@@ -150,9 +150,9 @@ export const SSHKeyAdder: React.FC<Props> = (props: Props) => {
150
150
} }
151
151
style = { { resize : "vertical" } }
152
152
/>
153
- </ FormGroup >
154
- </ form >
155
- < div >
153
+ </ div >
154
+ </ div >
155
+ < div style = { { marginTop : "15px" } } >
156
156
< Space >
157
157
{ toggleable ? (
158
158
< Button onClick = { cancel_and_close } > Cancel</ Button >
@@ -173,7 +173,7 @@ export const SSHKeyAdder: React.FC<Props> = (props: Props) => {
173
173
/>
174
174
) }
175
175
</ div >
176
- </ Panel >
176
+ </ Card >
177
177
) ;
178
178
}
179
179
0 commit comments