@electerm/electerm-react 1.100.56 → 1.101.10
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/common/check-skip-src.js +16 -0
- package/client/components/bookmark-form/{bookmark-select.jsx → common/bookmark-select.jsx} +11 -44
- package/client/components/bookmark-form/{bookmark-category-select.jsx → common/category-select.jsx} +10 -4
- package/client/components/bookmark-form/{color-picker-item.jsx → common/color-picker-item.jsx} +2 -3
- package/client/components/bookmark-form/{color-picker.jsx → common/color-picker.jsx} +10 -46
- package/client/components/bookmark-form/{render-connection-hopping.jsx → common/connection-hopping.jsx} +7 -7
- package/client/components/bookmark-form/common/fields.jsx +202 -0
- package/client/components/bookmark-form/common/hex-input.jsx +22 -0
- package/client/components/bookmark-form/common/init-values.js +83 -0
- package/client/components/bookmark-form/common/profile-item.jsx +34 -0
- package/client/components/bookmark-form/{proxy.jsx → common/proxy.jsx} +1 -1
- package/client/components/bookmark-form/{use-quick-commands.jsx → common/quick-commands.jsx} +1 -1
- package/client/components/bookmark-form/common/rdp-alert.jsx +13 -0
- package/client/components/bookmark-form/common/render-auth-ssh.jsx +119 -0
- package/client/components/bookmark-form/{render-delayed-scripts.jsx → common/run-scripts.jsx} +6 -2
- package/client/components/bookmark-form/common/serial-path-selector.jsx +39 -0
- package/client/components/bookmark-form/{render-auth-ssh.jsx → common/ssh-auth-selector.jsx} +3 -4
- package/client/components/bookmark-form/common/ssh-auth-type-selector.jsx +38 -0
- package/client/components/bookmark-form/common/ssh-host-selector.jsx +61 -0
- package/client/components/bookmark-form/{render-ssh-tunnel.jsx → common/ssh-tunnels.jsx} +4 -4
- package/client/components/bookmark-form/common/submit-buttons.jsx +42 -0
- package/client/components/bookmark-form/{render-bg.jsx → common/terminal-background.jsx} +2 -2
- package/client/components/bookmark-form/{x11.jsx → common/x11.jsx} +2 -2
- package/client/components/bookmark-form/config/common-fields.js +305 -0
- package/client/components/bookmark-form/config/ftp.js +40 -0
- package/client/components/bookmark-form/config/local.js +96 -0
- package/client/components/bookmark-form/config/rdp.js +39 -0
- package/client/components/bookmark-form/config/serial.js +69 -0
- package/client/components/bookmark-form/config/session-config.js +23 -0
- package/client/components/bookmark-form/config/ssh.js +47 -0
- package/client/components/bookmark-form/config/telnet.js +40 -0
- package/client/components/bookmark-form/config/vnc.js +44 -0
- package/client/components/bookmark-form/config/web.js +45 -0
- package/client/components/bookmark-form/form-renderer.jsx +328 -0
- package/client/components/bookmark-form/index.jsx +32 -91
- package/client/components/bookmark-form/render-form.jsx +11 -0
- package/client/components/common/password.jsx +21 -12
- package/client/components/footer/footer-entry.jsx +1 -1
- package/client/components/main/main.jsx +12 -2
- package/client/components/main/upgrade.jsx +3 -3
- package/client/components/profile/profile-form-ftp.jsx +35 -0
- package/client/components/profile/profile-form-ssh.jsx +3 -3
- package/client/components/profile/profile-form-telnet.jsx +1 -1
- package/client/components/profile/profile-tabs.jsx +4 -0
- package/client/components/setting-panel/setting-modal.jsx +1 -1
- package/client/components/setting-panel/setting-wrap.jsx +1 -1
- package/client/components/setting-panel/text-bg-modal.jsx +2 -2
- package/client/components/sidebar/info-modal.jsx +3 -3
- package/client/components/theme/theme-edit-slot.jsx +1 -1
- package/client/components/tree-list/category-color-picker.jsx +1 -1
- package/client/components/tree-list/move-item-modal.jsx +1 -1
- package/client/entry/basic.js +6 -1
- package/client/store/load-data.js +1 -1
- package/package.json +1 -1
- package/client/components/bookmark-form/form-ssh-common.jsx +0 -219
- package/client/components/bookmark-form/form-tabs.jsx +0 -66
- package/client/components/bookmark-form/ftp-form-ui.jsx +0 -160
- package/client/components/bookmark-form/ftp-form.jsx +0 -16
- package/client/components/bookmark-form/hex-input.jsx +0 -39
- package/client/components/bookmark-form/local-form-ui.jsx +0 -151
- package/client/components/bookmark-form/local-form.jsx +0 -16
- package/client/components/bookmark-form/profile-form-item.jsx +0 -43
- package/client/components/bookmark-form/quick-command-list.jsx +0 -31
- package/client/components/bookmark-form/quick-command.jsx +0 -227
- package/client/components/bookmark-form/rdp-form-ui.jsx +0 -179
- package/client/components/bookmark-form/rdp-form.jsx +0 -16
- package/client/components/bookmark-form/render-profile-item.jsx +0 -0
- package/client/components/bookmark-form/serial-form-ui.jsx +0 -309
- package/client/components/bookmark-form/serial-form.jsx +0 -20
- package/client/components/bookmark-form/sftp-enable.jsx +0 -41
- package/client/components/bookmark-form/ssh-form-ui.jsx +0 -121
- package/client/components/bookmark-form/ssh-form.jsx +0 -292
- package/client/components/bookmark-form/telnet-form-ui.jsx +0 -140
- package/client/components/bookmark-form/telnet-form.jsx +0 -16
- package/client/components/bookmark-form/use-form-funcs.jsx +0 -50
- package/client/components/bookmark-form/use-submit.jsx +0 -67
- package/client/components/bookmark-form/use-ui.jsx +0 -97
- package/client/components/bookmark-form/vnc-form-ui.jsx +0 -213
- package/client/components/bookmark-form/vnc-form.jsx +0 -16
- package/client/components/bookmark-form/web-form-ui.jsx +0 -143
- package/client/components/bookmark-form/web-form.jsx +0 -16
- /package/client/components/bookmark-form/{bookmark-group-tree-format.js → common/bookmark-group-tree-format.js} +0 -0
- /package/client/components/bookmark-form/{color-picker.styl → common/color-picker.styl} +0 -0
- /package/client/components/bookmark-form/{encodes.js → common/encodes.js} +0 -0
|
@@ -79,6 +79,7 @@ export default auto(function Index (props) {
|
|
|
79
79
|
store.isSecondInstance = window.pre.runSync('isSecondInstance')
|
|
80
80
|
store.initData()
|
|
81
81
|
store.checkForDbUpgrade()
|
|
82
|
+
store.handleGetSerials()
|
|
82
83
|
// window.pre.runGlobalAsync('registerDeepLink')
|
|
83
84
|
}, [])
|
|
84
85
|
|
|
@@ -117,12 +118,20 @@ export default auto(function Index (props) {
|
|
|
117
118
|
const ext1 = {
|
|
118
119
|
className: cls
|
|
119
120
|
}
|
|
121
|
+
// Get active tab IDs
|
|
122
|
+
const activeTabIds = [
|
|
123
|
+
store.activeTabId0,
|
|
124
|
+
store.activeTabId1,
|
|
125
|
+
store.activeTabId2,
|
|
126
|
+
store.activeTabId3
|
|
127
|
+
].filter(Boolean) // Remove empty strings
|
|
128
|
+
|
|
120
129
|
const bgTabs = config.terminalBackgroundImagePath === 'index' ||
|
|
121
130
|
config.terminalBackgroundImagePath === 'randomShape' ||
|
|
122
131
|
config.terminalBackgroundImagePath === textTerminalBgValue
|
|
123
|
-
? store.getTabs()
|
|
132
|
+
? store.getTabs().filter(tab => activeTabIds.includes(tab.id))
|
|
124
133
|
: store.getTabs().filter(tab =>
|
|
125
|
-
tab.terminalBackground?.terminalBackgroundImagePath
|
|
134
|
+
activeTabIds.includes(tab.id) && tab.terminalBackground?.terminalBackgroundImagePath
|
|
126
135
|
)
|
|
127
136
|
const confsCss = {
|
|
128
137
|
...Object.keys(config)
|
|
@@ -131,6 +140,7 @@ export default auto(function Index (props) {
|
|
|
131
140
|
...p,
|
|
132
141
|
[k]: config[k]
|
|
133
142
|
}), {}),
|
|
143
|
+
activeTabIds,
|
|
134
144
|
tabs: bgTabs.map(tab => {
|
|
135
145
|
return {
|
|
136
146
|
tabCount: tab.tabCount,
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
isMac,
|
|
10
10
|
isWin,
|
|
11
11
|
packInfo,
|
|
12
|
-
srcsSkipUpgradeCheck,
|
|
13
12
|
downloadUpgradeTimeout,
|
|
14
13
|
mirrors
|
|
15
14
|
} from '../../common/constants'
|
|
15
|
+
import { checkSkipSrc } from '../../common/check-skip-src'
|
|
16
16
|
import { debounce } from 'lodash-es'
|
|
17
17
|
import newTerm from '../../common/new-terminal'
|
|
18
18
|
import Markdown from '../common/markdown'
|
|
@@ -146,7 +146,7 @@ export default class Upgrade extends PureComponent {
|
|
|
146
146
|
|
|
147
147
|
getLatestRelease = async (noSkipVersion = false) => {
|
|
148
148
|
const { installSrc } = this.props
|
|
149
|
-
if (
|
|
149
|
+
if (checkSkipSrc(installSrc)) {
|
|
150
150
|
return
|
|
151
151
|
}
|
|
152
152
|
this.changeProps({
|
|
@@ -305,7 +305,7 @@ export default class Upgrade extends PureComponent {
|
|
|
305
305
|
{this.renderChangeLog()}
|
|
306
306
|
</div>
|
|
307
307
|
)
|
|
308
|
-
const skip =
|
|
308
|
+
const skip = checkSkipSrc(installSrc)
|
|
309
309
|
return (
|
|
310
310
|
<div className={cls}>
|
|
311
311
|
<div className='upgrade-panel-title fix'>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Form,
|
|
3
|
+
Input
|
|
4
|
+
} from 'antd'
|
|
5
|
+
import { formItemLayout } from '../../common/form-layout'
|
|
6
|
+
import Password from '../common/password'
|
|
7
|
+
|
|
8
|
+
const FormItem = Form.Item
|
|
9
|
+
const e = window.translate
|
|
10
|
+
|
|
11
|
+
export default function ProfileFormSsh (props) {
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<FormItem
|
|
15
|
+
{...formItemLayout}
|
|
16
|
+
label={e('username')}
|
|
17
|
+
hasFeedback
|
|
18
|
+
name={['ftp', 'user']}
|
|
19
|
+
rules={[{
|
|
20
|
+
max: 128, message: '128 chars max'
|
|
21
|
+
}]}
|
|
22
|
+
>
|
|
23
|
+
<Input />
|
|
24
|
+
</FormItem>
|
|
25
|
+
<FormItem
|
|
26
|
+
{...formItemLayout}
|
|
27
|
+
label={e('password')}
|
|
28
|
+
hasFeedback
|
|
29
|
+
name={['rdp', 'password']}
|
|
30
|
+
>
|
|
31
|
+
<Password />
|
|
32
|
+
</FormItem>
|
|
33
|
+
</>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Form,
|
|
3
3
|
Input
|
|
4
4
|
} from 'antd'
|
|
5
|
-
import renderAuth from '../bookmark-form/render-auth-ssh'
|
|
5
|
+
import renderAuth from '../bookmark-form/common/render-auth-ssh'
|
|
6
6
|
import { formItemLayout } from '../../common/form-layout'
|
|
7
7
|
|
|
8
8
|
const FormItem = Form.Item
|
|
@@ -25,14 +25,14 @@ export default function ProfileFormSsh (props) {
|
|
|
25
25
|
</FormItem>
|
|
26
26
|
{
|
|
27
27
|
renderAuth({
|
|
28
|
-
store:
|
|
28
|
+
store: window.store,
|
|
29
29
|
form,
|
|
30
30
|
authType: 'password'
|
|
31
31
|
})
|
|
32
32
|
}
|
|
33
33
|
{
|
|
34
34
|
renderAuth({
|
|
35
|
-
store:
|
|
35
|
+
store: window.store,
|
|
36
36
|
form
|
|
37
37
|
})
|
|
38
38
|
}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
Input
|
|
4
4
|
} from 'antd'
|
|
5
5
|
import { formItemLayout } from '../../common/form-layout'
|
|
6
|
-
import renderAuth from '../bookmark-form/render-auth-ssh'
|
|
6
|
+
import renderAuth from '../bookmark-form/common/render-auth-ssh'
|
|
7
7
|
|
|
8
8
|
const FormItem = Form.Item
|
|
9
9
|
const e = window.translate
|
|
@@ -2,6 +2,7 @@ import { Tabs } from 'antd'
|
|
|
2
2
|
import ProfileFormSsh from './profile-form-ssh'
|
|
3
3
|
import ProfileFormRdp from './profile-form-rdp'
|
|
4
4
|
import ProfileFormVnc from './profile-form-vnc'
|
|
5
|
+
import ProfileFormFtp from './profile-form-ftp'
|
|
5
6
|
import ProfileFormTelnet from './profile-form-telnet'
|
|
6
7
|
|
|
7
8
|
const { TabPane } = Tabs
|
|
@@ -26,6 +27,9 @@ export default function ProfileTabs (props) {
|
|
|
26
27
|
<TabPane tab='rdp' key='rdp' forceRender>
|
|
27
28
|
<ProfileFormRdp />
|
|
28
29
|
</TabPane>
|
|
30
|
+
<TabPane tab='ftp' key='ftp' forceRender>
|
|
31
|
+
<ProfileFormFtp />
|
|
32
|
+
</TabPane>
|
|
29
33
|
</Tabs>
|
|
30
34
|
|
|
31
35
|
)
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Typography,
|
|
8
8
|
Select
|
|
9
9
|
} from 'antd'
|
|
10
|
-
import { ColorPicker } from '../bookmark-form/color-picker.jsx'
|
|
10
|
+
import { ColorPicker } from '../bookmark-form/common/color-picker.jsx'
|
|
11
11
|
|
|
12
12
|
const { TextArea } = Input
|
|
13
13
|
const { Title } = Typography
|
|
@@ -54,7 +54,7 @@ export default function TextBgModal ({
|
|
|
54
54
|
onOk={handleOk}
|
|
55
55
|
onCancel={handleCancel}
|
|
56
56
|
width={500}
|
|
57
|
-
|
|
57
|
+
destroyOnHidden
|
|
58
58
|
>
|
|
59
59
|
<div className='pd1'>
|
|
60
60
|
<Space direction='vertical' size='large' style={{ width: '100%' }}>
|
|
@@ -19,9 +19,9 @@ import { auto } from 'manate/react'
|
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
21
|
packInfo,
|
|
22
|
-
infoTabs
|
|
23
|
-
srcsSkipUpgradeCheck
|
|
22
|
+
infoTabs
|
|
24
23
|
} from '../../common/constants'
|
|
24
|
+
import { checkSkipSrc } from '../../common/check-skip-src'
|
|
25
25
|
import './info.styl'
|
|
26
26
|
|
|
27
27
|
const e = window.translate
|
|
@@ -32,7 +32,7 @@ export default auto(function InfoModal (props) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const renderCheckUpdate = () => {
|
|
35
|
-
if (window.et.isWebApp ||
|
|
35
|
+
if (window.et.isWebApp || checkSkipSrc(props.installSrc)) {
|
|
36
36
|
return null
|
|
37
37
|
}
|
|
38
38
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// render bookmark select, use antd tree select
|
|
2
2
|
import { useState } from 'react'
|
|
3
|
-
import buildGroupData from '../bookmark-form/bookmark-group-tree-format'
|
|
3
|
+
import buildGroupData from '../bookmark-form/common/bookmark-group-tree-format'
|
|
4
4
|
import { TreeSelect, Modal, Button } from 'antd'
|
|
5
5
|
const e = window.translate
|
|
6
6
|
|
package/client/entry/basic.js
CHANGED
|
@@ -38,6 +38,12 @@ async function load () {
|
|
|
38
38
|
const url = !isDev ? `js/electerm-${version}.js` : 'js/electerm.js'
|
|
39
39
|
rcs.src = url
|
|
40
40
|
rcs.type = 'module'
|
|
41
|
+
rcs.onload = () => {
|
|
42
|
+
const loadingEl = document.getElementById('content-loading')
|
|
43
|
+
if (loadingEl) {
|
|
44
|
+
document.body.removeChild(loadingEl)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
41
47
|
document.body.appendChild(rcs)
|
|
42
48
|
}
|
|
43
49
|
window.getLang = (lang = window.store?.config.language || 'en_us') => {
|
|
@@ -50,7 +56,6 @@ async function load () {
|
|
|
50
56
|
}
|
|
51
57
|
await loadWorker()
|
|
52
58
|
loadScript()
|
|
53
|
-
document.body.removeChild(document.getElementById('content-loading'))
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
// window.addEventListener('load', load)
|
|
@@ -8,7 +8,7 @@ import { infoTabs, statusMap, defaultEnvLang } from '../common/constants'
|
|
|
8
8
|
import fs from '../common/fs'
|
|
9
9
|
import generate from '../common/id-with-stamp'
|
|
10
10
|
import defaultSettings from '../common/default-setting'
|
|
11
|
-
import encodes from '../components/bookmark-form/encodes'
|
|
11
|
+
import encodes from '../components/bookmark-form/common/encodes'
|
|
12
12
|
import { initWsCommon } from '../common/fetch-from-server'
|
|
13
13
|
import safeParse from '../common/parse-json-safe'
|
|
14
14
|
import initWatch from './watch'
|
package/package.json
CHANGED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* bookmark form
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
Input,
|
|
6
|
-
InputNumber,
|
|
7
|
-
Radio,
|
|
8
|
-
Select,
|
|
9
|
-
Form
|
|
10
|
-
} from 'antd'
|
|
11
|
-
import {
|
|
12
|
-
authTypeMap
|
|
13
|
-
} from '../../common/constants'
|
|
14
|
-
import { formItemLayout, tailFormItemLayout } from '../../common/form-layout'
|
|
15
|
-
import InputAutoFocus from '../common/input-auto-focus'
|
|
16
|
-
import encodes from './encodes'
|
|
17
|
-
import renderRunScripts from './render-delayed-scripts.jsx'
|
|
18
|
-
import { ColorPickerItem } from './color-picker-item.jsx'
|
|
19
|
-
import BookmarkCategorySelect from './bookmark-category-select.jsx'
|
|
20
|
-
|
|
21
|
-
import './bookmark-form.styl'
|
|
22
|
-
|
|
23
|
-
const authTypes = Object.keys(authTypeMap).map(k => {
|
|
24
|
-
return k
|
|
25
|
-
})
|
|
26
|
-
const RadioButton = Radio.Button
|
|
27
|
-
const RadioGroup = Radio.Group
|
|
28
|
-
const FormItem = Form.Item
|
|
29
|
-
const { Option } = Select
|
|
30
|
-
const e = window.translate
|
|
31
|
-
|
|
32
|
-
export default function renderCommon (props) {
|
|
33
|
-
const {
|
|
34
|
-
bookmarkGroups = [],
|
|
35
|
-
ips,
|
|
36
|
-
form,
|
|
37
|
-
onChangeAuthType,
|
|
38
|
-
filterAuthType = a => a
|
|
39
|
-
} = props
|
|
40
|
-
const authTypesFiltered = authTypes.filter(filterAuthType)
|
|
41
|
-
|
|
42
|
-
// ips is ipaddress string[]
|
|
43
|
-
function renderIps () {
|
|
44
|
-
return ips.map(ip => {
|
|
45
|
-
return (
|
|
46
|
-
<div
|
|
47
|
-
key={ip}
|
|
48
|
-
className='iblock mg2r pointer ip-item'
|
|
49
|
-
onClick={() => props.useIp(form, ip)}
|
|
50
|
-
>
|
|
51
|
-
<b>{ip}</b>
|
|
52
|
-
<span
|
|
53
|
-
className='mg1l item-item-use'
|
|
54
|
-
>
|
|
55
|
-
{e('use')}
|
|
56
|
-
</span>
|
|
57
|
-
</div>
|
|
58
|
-
)
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
|
-
return (
|
|
62
|
-
<>
|
|
63
|
-
<FormItem
|
|
64
|
-
{...formItemLayout}
|
|
65
|
-
label={e('host')}
|
|
66
|
-
hasFeedback
|
|
67
|
-
rules={[{
|
|
68
|
-
max: 520, message: '520 chars max'
|
|
69
|
-
}, {
|
|
70
|
-
required: true, message: 'host required'
|
|
71
|
-
}]}
|
|
72
|
-
normalize={props.trim}
|
|
73
|
-
>
|
|
74
|
-
{
|
|
75
|
-
ips.length
|
|
76
|
-
? renderIps()
|
|
77
|
-
: (
|
|
78
|
-
<div className='dns-section'>
|
|
79
|
-
hostname or ip
|
|
80
|
-
</div>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
<FormItem noStyle name='host'>
|
|
84
|
-
<InputAutoFocus
|
|
85
|
-
name='host'
|
|
86
|
-
onBlur={props.onBlur}
|
|
87
|
-
onPaste={e => props.onPaste(e, form)}
|
|
88
|
-
addonBefore={<ColorPickerItem />}
|
|
89
|
-
/>
|
|
90
|
-
</FormItem>
|
|
91
|
-
</FormItem>
|
|
92
|
-
<FormItem
|
|
93
|
-
{...formItemLayout}
|
|
94
|
-
label={e('username')}
|
|
95
|
-
hasFeedback
|
|
96
|
-
name='username'
|
|
97
|
-
rules={[{
|
|
98
|
-
max: 128, message: '128 chars max'
|
|
99
|
-
}]}
|
|
100
|
-
normalize={props.trim}
|
|
101
|
-
>
|
|
102
|
-
<Input />
|
|
103
|
-
</FormItem>
|
|
104
|
-
<FormItem
|
|
105
|
-
{...tailFormItemLayout}
|
|
106
|
-
className='mg1b'
|
|
107
|
-
name='authType'
|
|
108
|
-
>
|
|
109
|
-
<RadioGroup
|
|
110
|
-
size='small'
|
|
111
|
-
onChange={onChangeAuthType}
|
|
112
|
-
buttonStyle='solid'
|
|
113
|
-
>
|
|
114
|
-
{
|
|
115
|
-
authTypesFiltered.map(t => {
|
|
116
|
-
return (
|
|
117
|
-
<RadioButton value={t} key={t}>
|
|
118
|
-
{e(t)}
|
|
119
|
-
</RadioButton>
|
|
120
|
-
)
|
|
121
|
-
})
|
|
122
|
-
}
|
|
123
|
-
</RadioGroup>
|
|
124
|
-
</FormItem>
|
|
125
|
-
{props.renderAuth(props)}
|
|
126
|
-
<FormItem
|
|
127
|
-
{...formItemLayout}
|
|
128
|
-
label={e('port')}
|
|
129
|
-
name='port'
|
|
130
|
-
rules={[{
|
|
131
|
-
required: true, message: 'port required'
|
|
132
|
-
}]}
|
|
133
|
-
>
|
|
134
|
-
<InputNumber
|
|
135
|
-
placeholder={e('port')}
|
|
136
|
-
min={1}
|
|
137
|
-
max={65535}
|
|
138
|
-
step={1}
|
|
139
|
-
/>
|
|
140
|
-
</FormItem>
|
|
141
|
-
<BookmarkCategorySelect
|
|
142
|
-
bookmarkGroups={bookmarkGroups}
|
|
143
|
-
form={form}
|
|
144
|
-
formItemLayout={formItemLayout}
|
|
145
|
-
/>
|
|
146
|
-
<FormItem
|
|
147
|
-
{...formItemLayout}
|
|
148
|
-
label={e('title')}
|
|
149
|
-
hasFeedback
|
|
150
|
-
name='title'
|
|
151
|
-
>
|
|
152
|
-
<Input />
|
|
153
|
-
</FormItem>
|
|
154
|
-
<FormItem
|
|
155
|
-
{...formItemLayout}
|
|
156
|
-
label={e('description')}
|
|
157
|
-
name='description'
|
|
158
|
-
hasFeedback
|
|
159
|
-
>
|
|
160
|
-
<Input.TextArea autoSize={{ minRows: 1 }} />
|
|
161
|
-
</FormItem>
|
|
162
|
-
<FormItem
|
|
163
|
-
{...formItemLayout}
|
|
164
|
-
name='setEnv'
|
|
165
|
-
label='SetEnv'
|
|
166
|
-
>
|
|
167
|
-
<Input placeholder='SEC=xxx BEC=xxxx' />
|
|
168
|
-
</FormItem>
|
|
169
|
-
<FormItem
|
|
170
|
-
{...formItemLayout}
|
|
171
|
-
name='startDirectoryLocal'
|
|
172
|
-
label={`${e('startDirectory')}:${e('local')}`}
|
|
173
|
-
>
|
|
174
|
-
<Input />
|
|
175
|
-
</FormItem>
|
|
176
|
-
<FormItem
|
|
177
|
-
{...formItemLayout}
|
|
178
|
-
name='startDirectory'
|
|
179
|
-
label={`${e('startDirectory')}:${e('remote')}`}
|
|
180
|
-
>
|
|
181
|
-
<Input />
|
|
182
|
-
</FormItem>
|
|
183
|
-
<FormItem
|
|
184
|
-
{...formItemLayout}
|
|
185
|
-
label={e('interactiveValues')}
|
|
186
|
-
name='interactiveValues'
|
|
187
|
-
hasFeedback
|
|
188
|
-
>
|
|
189
|
-
<Input.TextArea
|
|
190
|
-
autoSize={{ minRows: 1 }}
|
|
191
|
-
/>
|
|
192
|
-
</FormItem>
|
|
193
|
-
{renderRunScripts()}
|
|
194
|
-
<FormItem
|
|
195
|
-
{...formItemLayout}
|
|
196
|
-
key='encode-select'
|
|
197
|
-
label={e('encode')}
|
|
198
|
-
name='encode'
|
|
199
|
-
>
|
|
200
|
-
<Select
|
|
201
|
-
showSearch
|
|
202
|
-
>
|
|
203
|
-
{
|
|
204
|
-
encodes.map(k => {
|
|
205
|
-
return (
|
|
206
|
-
<Option
|
|
207
|
-
value={k}
|
|
208
|
-
key={k}
|
|
209
|
-
>
|
|
210
|
-
{k.toUpperCase()}
|
|
211
|
-
</Option>
|
|
212
|
-
)
|
|
213
|
-
})
|
|
214
|
-
}
|
|
215
|
-
</Select>
|
|
216
|
-
</FormItem>
|
|
217
|
-
</>
|
|
218
|
-
)
|
|
219
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* bookmark form
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
Tabs
|
|
6
|
-
} from 'antd'
|
|
7
|
-
import { sshTunnelHelpLink } from '../../common/constants'
|
|
8
|
-
import HelpIcon from '../common/help-icon'
|
|
9
|
-
|
|
10
|
-
const e = window.translate
|
|
11
|
-
|
|
12
|
-
export default function renderTabs (props) {
|
|
13
|
-
const tunnelTag = (
|
|
14
|
-
<span>
|
|
15
|
-
{e('sshTunnel')}
|
|
16
|
-
<HelpIcon
|
|
17
|
-
link={sshTunnelHelpLink}
|
|
18
|
-
/>
|
|
19
|
-
</span>
|
|
20
|
-
)
|
|
21
|
-
const items = [
|
|
22
|
-
{
|
|
23
|
-
key: 'auth',
|
|
24
|
-
label: e('auth'),
|
|
25
|
-
forceRender: true,
|
|
26
|
-
children: props.renderCommon(props)
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
key: 'settings',
|
|
30
|
-
label: e('settings'),
|
|
31
|
-
forceRender: true,
|
|
32
|
-
children: (
|
|
33
|
-
<>
|
|
34
|
-
{props.renderEnableSftp()}
|
|
35
|
-
{props.uis}
|
|
36
|
-
{props.renderProxy(props)}
|
|
37
|
-
{props.renderX11(props.form)}
|
|
38
|
-
{props.renderTermBg(props.form)}
|
|
39
|
-
</>
|
|
40
|
-
)
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
key: 'quickCommands',
|
|
44
|
-
label: e('quickCommands'),
|
|
45
|
-
forceRender: true,
|
|
46
|
-
children: props.qms
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
key: 'tunnel',
|
|
50
|
-
label: tunnelTag,
|
|
51
|
-
forceRender: true,
|
|
52
|
-
children: props.renderSshTunnel(props)
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
key: 'connectionHopping',
|
|
56
|
-
label: e('connectionHopping'),
|
|
57
|
-
forceRender: true,
|
|
58
|
-
children: props.renderConnectionHopping(props)
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
return (
|
|
62
|
-
<Tabs
|
|
63
|
-
items={items}
|
|
64
|
-
/>
|
|
65
|
-
)
|
|
66
|
-
}
|