@electerm/electerm-react 2.3.191 → 2.3.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/components/bookmark-form/common/fields.jsx +3 -0
- package/client/components/bookmark-form/common/ssh-agent.jsx +33 -0
- package/client/components/bookmark-form/config/common-fields.js +2 -4
- package/client/components/bookmark-form/config/serial.js +1 -1
- package/client/components/bookmark-form/config/ssh.js +1 -0
- package/client/components/setting-panel/deep-link-control.jsx +2 -2
- package/client/components/terminal/term-search.styl +1 -0
- package/client/components/terminal/terminal.jsx +1 -1
- package/client/store/mcp-handler.js +0 -6
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ import InputAutoFocus from '../../common/input-auto-focus.jsx'
|
|
|
10
10
|
import ProxyField from './proxy.jsx'
|
|
11
11
|
import X11Field from './x11.jsx'
|
|
12
12
|
import SshTunnels from './ssh-tunnels.jsx'
|
|
13
|
+
import SshAgent from './ssh-agent.jsx'
|
|
13
14
|
import ConnectionHopping from './connection-hopping.jsx'
|
|
14
15
|
import TerminalBackgroundField from './terminal-background.jsx'
|
|
15
16
|
import useQuickCmds from './quick-commands.jsx'
|
|
@@ -145,6 +146,8 @@ export function renderFormItem (item, formItemLayout, form, ctxProps, index) {
|
|
|
145
146
|
return <X11Field key={name} form={form} />
|
|
146
147
|
case 'sshTunnels':
|
|
147
148
|
return <SshTunnels key={name} form={form} formData={ctxProps.formData} />
|
|
149
|
+
case 'sshAgent':
|
|
150
|
+
return <SshAgent key={name} />
|
|
148
151
|
case 'connectionHopping':
|
|
149
152
|
return (
|
|
150
153
|
<ConnectionHopping
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Form, Input, Switch, Space } from 'antd'
|
|
3
|
+
import HelpIcon from '../../common/help-icon'
|
|
4
|
+
import { formItemLayout } from '../../../common/form-layout'
|
|
5
|
+
|
|
6
|
+
const FormItem = Form.Item
|
|
7
|
+
const e = window.translate
|
|
8
|
+
|
|
9
|
+
export default function SshAgent () {
|
|
10
|
+
return (
|
|
11
|
+
<FormItem
|
|
12
|
+
{...formItemLayout}
|
|
13
|
+
label={e('useSshAgent')}
|
|
14
|
+
>
|
|
15
|
+
<Space align='center'>
|
|
16
|
+
<FormItem
|
|
17
|
+
name='useSshAgent'
|
|
18
|
+
valuePropName='checked'
|
|
19
|
+
noStyle
|
|
20
|
+
>
|
|
21
|
+
<Switch />
|
|
22
|
+
</FormItem>
|
|
23
|
+
<FormItem
|
|
24
|
+
name='sshAgent'
|
|
25
|
+
noStyle
|
|
26
|
+
>
|
|
27
|
+
<Input placeholder={e('SSH Agent Path')} />
|
|
28
|
+
</FormItem>
|
|
29
|
+
<HelpIcon link='https://github.com/electerm/electerm/wiki/ssh-agent' />
|
|
30
|
+
</Space>
|
|
31
|
+
</FormItem>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -272,10 +272,8 @@ export const sshAuthFields = [
|
|
|
272
272
|
{ type: 'sshAuthSelector', name: '__auth__', label: '', formItemName: 'password' },
|
|
273
273
|
commonFields.port,
|
|
274
274
|
{
|
|
275
|
-
type: '
|
|
276
|
-
name: 'useSshAgent'
|
|
277
|
-
label: () => e('useSshAgent'),
|
|
278
|
-
valuePropName: 'checked'
|
|
275
|
+
type: 'sshAgent',
|
|
276
|
+
name: 'useSshAgent'
|
|
279
277
|
},
|
|
280
278
|
commonFields.runScripts,
|
|
281
279
|
commonFields.description,
|
|
@@ -40,7 +40,7 @@ const serialConfig = {
|
|
|
40
40
|
type: 'autocomplete',
|
|
41
41
|
name: 'baudRate',
|
|
42
42
|
label: 'baudRate',
|
|
43
|
-
options: commonBaudRates.map(d => ({ value: d })),
|
|
43
|
+
options: commonBaudRates.map(d => ({ value: d.toString(), label: d.toString() })),
|
|
44
44
|
normalize: (value) => {
|
|
45
45
|
if (value === '' || value == null) {
|
|
46
46
|
return undefined
|
|
@@ -64,12 +64,12 @@ export default function DeepLinkControl () {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
const renderTooltipContent = () => {
|
|
67
|
-
const protocols = ['ssh', 'telnet'
|
|
67
|
+
const protocols = ['ssh', 'telnet']
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
70
|
<div>
|
|
71
71
|
<div className='pd1b'>
|
|
72
|
-
Register electerm to handle protocol URLs (ssh://, telnet
|
|
72
|
+
Register electerm to handle protocol URLs (ssh://, telnet://)
|
|
73
73
|
</div>
|
|
74
74
|
|
|
75
75
|
{registrationStatus && (
|
|
@@ -1184,7 +1184,7 @@ class Term extends Component {
|
|
|
1184
1184
|
'execLinuxArgs',
|
|
1185
1185
|
'debug'
|
|
1186
1186
|
]),
|
|
1187
|
-
keepaliveInterval: tab.keepaliveInterval
|
|
1187
|
+
keepaliveInterval: tab.keepaliveInterval || config.keepaliveInterval,
|
|
1188
1188
|
tabId: id,
|
|
1189
1189
|
uid: id,
|
|
1190
1190
|
srcTabId: tab.id,
|
|
@@ -123,12 +123,6 @@ export default Store => {
|
|
|
123
123
|
case 'get_settings':
|
|
124
124
|
result = store.mcpGetSettings()
|
|
125
125
|
break
|
|
126
|
-
case 'list_terminal_themes':
|
|
127
|
-
result = store.mcpListTerminalThemes()
|
|
128
|
-
break
|
|
129
|
-
case 'list_ui_themes':
|
|
130
|
-
result = store.mcpListUiThemes()
|
|
131
|
-
break
|
|
132
126
|
|
|
133
127
|
default:
|
|
134
128
|
throw new Error(`Unknown tool: ${toolName}`)
|