@electerm/electerm-react 2.3.190 → 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 +5 -7
- package/client/components/bookmark-form/config/ftp.js +1 -1
- package/client/components/bookmark-form/config/local.js +3 -3
- package/client/components/bookmark-form/config/rdp.js +1 -1
- package/client/components/bookmark-form/config/serial.js +4 -4
- package/client/components/bookmark-form/config/ssh.js +3 -2
- package/client/components/bookmark-form/config/telnet.js +2 -2
- package/client/components/bookmark-form/config/vnc.js +1 -1
- package/client/components/bookmark-form/config/web.js +1 -1
- 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,
|
|
@@ -311,18 +309,18 @@ export const telnetAuthFields = [
|
|
|
311
309
|
// Common tab configurations - functions to ensure translation happens at render time
|
|
312
310
|
export const quickCommandsTab = () => ({
|
|
313
311
|
key: 'quickCommands',
|
|
314
|
-
label:
|
|
312
|
+
label: e('quickCommands'),
|
|
315
313
|
fields: [commonFields.quickCommands]
|
|
316
314
|
})
|
|
317
315
|
|
|
318
316
|
export const sshTunnelTab = () => ({
|
|
319
317
|
key: 'tunnel',
|
|
320
|
-
label:
|
|
318
|
+
label: e('sshTunnel'),
|
|
321
319
|
fields: [commonFields.sshTunnels]
|
|
322
320
|
})
|
|
323
321
|
|
|
324
322
|
export const connectionHoppingTab = () => ({
|
|
325
323
|
key: 'connectionHopping',
|
|
326
|
-
label:
|
|
324
|
+
label: e('connectionHopping'),
|
|
327
325
|
fields: [commonFields.connectionHopping]
|
|
328
326
|
})
|
|
@@ -26,7 +26,7 @@ const localConfig = {
|
|
|
26
26
|
tabs: () => [
|
|
27
27
|
{
|
|
28
28
|
key: 'auth',
|
|
29
|
-
label:
|
|
29
|
+
label: e('auth'),
|
|
30
30
|
fields: [
|
|
31
31
|
commonFields.category,
|
|
32
32
|
commonFields.colorTitle,
|
|
@@ -37,7 +37,7 @@ const localConfig = {
|
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
key: 'settings',
|
|
40
|
-
label:
|
|
40
|
+
label: e('settings'),
|
|
41
41
|
fields: [
|
|
42
42
|
{
|
|
43
43
|
type: 'input',
|
|
@@ -91,7 +91,7 @@ const localConfig = {
|
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
key: 'quickCommands',
|
|
94
|
-
label:
|
|
94
|
+
label: e('quickCommands'),
|
|
95
95
|
fields: [
|
|
96
96
|
{ type: 'quickCommands', name: '__quick__', label: '' }
|
|
97
97
|
]
|
|
@@ -31,7 +31,7 @@ const serialConfig = {
|
|
|
31
31
|
tabs: () => [
|
|
32
32
|
{
|
|
33
33
|
key: 'auth',
|
|
34
|
-
label:
|
|
34
|
+
label: e('auth'),
|
|
35
35
|
fields: [
|
|
36
36
|
commonFields.category,
|
|
37
37
|
commonFields.colorTitle,
|
|
@@ -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,14 +64,14 @@ const serialConfig = {
|
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
key: 'settings',
|
|
67
|
-
label:
|
|
67
|
+
label: e('settings'),
|
|
68
68
|
fields: [
|
|
69
69
|
{ type: 'terminalBackground', name: 'terminalBackground', label: () => e('terminalBackgroundImage') }
|
|
70
70
|
]
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
key: 'quickCommands',
|
|
74
|
-
label:
|
|
74
|
+
label: e('quickCommands'),
|
|
75
75
|
fields: [
|
|
76
76
|
{ type: 'quickCommands', name: '__quick__', label: '' }
|
|
77
77
|
]
|
|
@@ -21,6 +21,7 @@ const sshConfig = {
|
|
|
21
21
|
sshTunnels: [],
|
|
22
22
|
connectionHoppings: [],
|
|
23
23
|
useSshAgent: true,
|
|
24
|
+
sshAgent: '',
|
|
24
25
|
serverHostKey: [],
|
|
25
26
|
cipher: [],
|
|
26
27
|
...getTerminalDefaults(store),
|
|
@@ -33,12 +34,12 @@ const sshConfig = {
|
|
|
33
34
|
tabs: () => [
|
|
34
35
|
{
|
|
35
36
|
key: 'auth',
|
|
36
|
-
label:
|
|
37
|
+
label: e('auth'),
|
|
37
38
|
fields: sshAuthFields
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
41
|
key: 'settings',
|
|
41
|
-
label:
|
|
42
|
+
label: e('settings'),
|
|
42
43
|
fields: sshSettings
|
|
43
44
|
},
|
|
44
45
|
quickCommandsTab(),
|
|
@@ -31,12 +31,12 @@ const telnetConfig = {
|
|
|
31
31
|
tabs: () => [
|
|
32
32
|
{
|
|
33
33
|
key: 'auth',
|
|
34
|
-
label:
|
|
34
|
+
label: e('auth'),
|
|
35
35
|
fields: telnetAuthFields
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
key: 'settings',
|
|
39
|
-
label:
|
|
39
|
+
label: e('settings'),
|
|
40
40
|
fields: terminalSettings
|
|
41
41
|
},
|
|
42
42
|
quickCommandsTab()
|
|
@@ -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}`)
|