@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.
@@ -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: 'switch',
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: () => e('quickCommands'),
312
+ label: e('quickCommands'),
315
313
  fields: [commonFields.quickCommands]
316
314
  })
317
315
 
318
316
  export const sshTunnelTab = () => ({
319
317
  key: 'tunnel',
320
- label: () => e('sshTunnel'),
318
+ label: e('sshTunnel'),
321
319
  fields: [commonFields.sshTunnels]
322
320
  })
323
321
 
324
322
  export const connectionHoppingTab = () => ({
325
323
  key: 'connectionHopping',
326
- label: () => e('connectionHopping'),
324
+ label: e('connectionHopping'),
327
325
  fields: [commonFields.connectionHopping]
328
326
  })
@@ -22,7 +22,7 @@ const ftpConfig = {
22
22
  tabs: () => [
23
23
  {
24
24
  key: 'auth',
25
- label: () => e('auth'),
25
+ label: e('auth'),
26
26
  fields: [
27
27
  commonFields.category,
28
28
  commonFields.colorTitle,
@@ -26,7 +26,7 @@ const localConfig = {
26
26
  tabs: () => [
27
27
  {
28
28
  key: 'auth',
29
- label: () => e('auth'),
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: () => e('settings'),
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: () => e('quickCommands'),
94
+ label: e('quickCommands'),
95
95
  fields: [
96
96
  { type: 'quickCommands', name: '__quick__', label: '' }
97
97
  ]
@@ -19,7 +19,7 @@ const rdpConfig = {
19
19
  tabs: () => [
20
20
  {
21
21
  key: 'auth',
22
- label: () => e('auth'),
22
+ label: e('auth'),
23
23
  fields: [
24
24
  { type: 'rdpWarning', name: 'rdpWarning' },
25
25
  commonFields.category,
@@ -31,7 +31,7 @@ const serialConfig = {
31
31
  tabs: () => [
32
32
  {
33
33
  key: 'auth',
34
- label: () => e('auth'),
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: () => e('settings'),
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: () => e('quickCommands'),
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: () => e('auth'),
37
+ label: e('auth'),
37
38
  fields: sshAuthFields
38
39
  },
39
40
  {
40
41
  key: 'settings',
41
- label: () => e('settings'),
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: () => e('auth'),
34
+ label: e('auth'),
35
35
  fields: telnetAuthFields
36
36
  },
37
37
  {
38
38
  key: 'settings',
39
- label: () => e('settings'),
39
+ label: e('settings'),
40
40
  fields: terminalSettings
41
41
  },
42
42
  quickCommandsTab()
@@ -23,7 +23,7 @@ const vncConfig = {
23
23
  tabs: () => [
24
24
  {
25
25
  key: 'auth',
26
- label: () => e('auth'),
26
+ label: e('auth'),
27
27
  fields: [
28
28
  { type: 'vncWarning', name: 'vncWarning' },
29
29
  commonFields.category,
@@ -15,7 +15,7 @@ const webConfig = {
15
15
  tabs: () => [
16
16
  {
17
17
  key: 'main',
18
- label: () => e('auth'),
18
+ label: e('auth'),
19
19
  fields: [
20
20
  commonFields.category,
21
21
  commonFields.colorTitle,
@@ -64,12 +64,12 @@ export default function DeepLinkControl () {
64
64
  }
65
65
 
66
66
  const renderTooltipContent = () => {
67
- const protocols = ['ssh', 'telnet', 'rdp', 'vnc', 'serial']
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://, rdp://, vnc://, serial://)
72
+ Register electerm to handle protocol URLs (ssh://, telnet://)
73
73
  </div>
74
74
 
75
75
  {registrationStatus && (
@@ -13,3 +13,4 @@
13
13
  top 100px
14
14
  right 5px
15
15
  z-index 200
16
+ background var(--main)
@@ -1184,7 +1184,7 @@ class Term extends Component {
1184
1184
  'execLinuxArgs',
1185
1185
  'debug'
1186
1186
  ]),
1187
- keepaliveInterval: tab.keepaliveInterval === undefined ? config.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}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "2.3.190",
3
+ "version": "2.3.198",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",