@electerm/electerm-react 1.39.88 → 1.39.99
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/constants.js +2 -1
- package/client/common/create-title.jsx +2 -3
- package/client/common/init-setting-item.js +3 -6
- package/client/common/new-terminal.js +1 -2
- package/client/common/terminal-theme.js +2 -3
- package/client/components/auth/login.jsx +2 -3
- package/client/components/batch-op/batch-op.jsx +18 -36
- package/client/components/bookmark-form/form-ssh-common.jsx +4 -7
- package/client/components/bookmark-form/form-tabs.jsx +4 -8
- package/client/components/bookmark-form/index.jsx +5 -9
- package/client/components/bookmark-form/local-form-ui.jsx +3 -6
- package/client/components/bookmark-form/proxy.jsx +1 -2
- package/client/components/bookmark-form/quick-command.jsx +7 -8
- package/client/components/bookmark-form/rdp-form-ui.jsx +2 -4
- package/client/components/bookmark-form/render-auth-ssh.jsx +1 -2
- package/client/components/bookmark-form/render-connection-hopping.jsx +9 -11
- package/client/components/bookmark-form/render-delayed-scripts.jsx +1 -2
- package/client/components/bookmark-form/render-ssh-tunnel.jsx +9 -12
- package/client/components/bookmark-form/serial-form-ui.jsx +4 -8
- package/client/components/bookmark-form/sftp-enable.jsx +1 -2
- package/client/components/bookmark-form/telnet-form-ui.jsx +2 -4
- package/client/components/bookmark-form/tree-delete.jsx +3 -4
- package/client/components/bookmark-form/use-quick-commands.jsx +5 -6
- package/client/components/bookmark-form/use-submit.jsx +1 -2
- package/client/components/bookmark-form/use-ui.jsx +4 -6
- package/client/components/bookmark-form/vnc-form-ui.jsx +2 -4
- package/client/components/bookmark-form/web-form-ui.jsx +2 -4
- package/client/components/common/markdown.jsx +1 -1
- package/client/components/context-menu/context-menu.jsx +3 -4
- package/client/components/context-menu/menu-btn.jsx +13 -18
- package/client/components/footer/batch-input.jsx +1 -2
- package/client/components/footer/footer-entry.jsx +2 -3
- package/client/components/main/error-wrapper.jsx +2 -4
- package/client/components/main/upgrade.jsx +2 -4
- package/client/components/main/upgrade.styl +4 -1
- package/client/components/profile/profile-form-elem.jsx +28 -10
- package/client/components/quick-commands/quick-commands-box.jsx +1 -2
- package/client/components/quick-commands/quick-commands-form-elem.jsx +7 -12
- package/client/components/quick-commands/quick-commands-list-form.jsx +5 -6
- package/client/components/quick-commands/quick-commands-list.jsx +2 -3
- package/client/components/quick-commands/quick-commands-select.jsx +1 -2
- package/client/components/rdp/rdp-session.jsx +0 -3
- package/client/components/rdp/resolution-form.jsx +3 -6
- package/client/components/session/session.jsx +2 -4
- package/client/components/session/sessions.jsx +4 -6
- package/client/components/setting-panel/keywords-form.jsx +2 -3
- package/client/components/setting-panel/list.jsx +3 -6
- package/client/components/setting-panel/setting-common.jsx +10 -14
- package/client/components/setting-panel/setting-modal.jsx +7 -11
- package/client/components/setting-panel/setting-terminal.jsx +13 -16
- package/client/components/setting-panel/start-session-select.jsx +1 -2
- package/client/components/setting-panel/tab-history.jsx +2 -3
- package/client/components/setting-sync/data-import.jsx +4 -7
- package/client/components/setting-sync/data-select.jsx +4 -16
- package/client/components/setting-sync/setting-sync-form.jsx +8 -12
- package/client/components/sftp/address-bar.jsx +1 -2
- package/client/components/sftp/confirm-modal-store.jsx +1 -2
- package/client/components/sftp/file-item.jsx +6 -8
- package/client/components/sftp/file-mode-modal.jsx +1 -2
- package/client/components/sftp/file-props-modal.jsx +1 -2
- package/client/components/sftp/list-table-ui.jsx +1 -2
- package/client/components/sftp/permission-render.jsx +1 -2
- package/client/components/sftp/sftp-entry.jsx +21 -7
- package/client/components/sftp/transfer-tag.jsx +1 -2
- package/client/components/shortcuts/shortcuts.jsx +5 -28
- package/client/components/sidebar/bookmark.jsx +6 -9
- package/client/components/sidebar/history.jsx +4 -6
- package/client/components/sidebar/index.jsx +9 -16
- package/client/components/sidebar/info-modal.jsx +10 -15
- package/client/components/sidebar/transfer-history-modal.jsx +3 -6
- package/client/components/sidebar/transfer-list-control.jsx +1 -2
- package/client/components/sidebar/transfer-list.jsx +1 -2
- package/client/components/sidebar/transfer-modal.jsx +2 -4
- package/client/components/sidebar/transport-ui.jsx +1 -2
- package/client/components/tabs/index.jsx +28 -20
- package/client/components/tabs/tab.jsx +5 -9
- package/client/components/tabs/window-control.jsx +4 -5
- package/client/components/terminal/index.jsx +5 -7
- package/client/components/terminal/term-search.jsx +2 -3
- package/client/components/terminal/terminal-interactive.jsx +2 -4
- package/client/components/terminal-info/activity.jsx +4 -5
- package/client/components/terminal-info/base.jsx +3 -4
- package/client/components/terminal-info/terminal-info.styl +1 -0
- package/client/components/terminal-theme/index.jsx +6 -9
- package/client/components/terminal-theme/theme-list.jsx +1 -2
- package/client/components/text-editor/text-editor-form.jsx +4 -8
- package/client/components/text-editor/text-editor.jsx +2 -3
- package/client/components/tree-list/bookmark-transport.jsx +4 -7
- package/client/components/tree-list/tree-list-item.jsx +4 -7
- package/client/components/tree-list/tree-list.jsx +3 -6
- package/client/components/vnc/vnc-form.jsx +2 -4
- package/client/components/vnc/vnc-session.jsx +1 -2
- package/client/entry/basic.js +4 -6
- package/client/store/common.js +10 -12
- package/client/store/index.js +4 -7
- package/client/store/init-state.js +2 -3
- package/client/store/load-data.js +10 -0
- package/client/store/setting.js +2 -3
- package/client/store/system-menu.js +4 -6
- package/client/store/terminal-theme.js +2 -4
- package/package.json +1 -1
|
@@ -354,8 +354,9 @@ export const cwdId = '=__+__'
|
|
|
354
354
|
export const zmodemTransferPackSize = 1024 * 1024 * 2
|
|
355
355
|
export const syncDataMaps = {
|
|
356
356
|
settings: ['config'],
|
|
357
|
-
bookmarks: ['bookmarks', 'bookmarkGroups'
|
|
357
|
+
bookmarks: ['bookmarks', 'bookmarkGroups'],
|
|
358
358
|
terminalThemes: ['terminalThemes'],
|
|
359
359
|
quickCommands: ['quickCommands'],
|
|
360
|
+
profiles: ['profiles'],
|
|
360
361
|
addressBookmarks: ['addressBookmarks']
|
|
361
362
|
}
|
|
@@ -6,8 +6,7 @@ import {
|
|
|
6
6
|
terminalLocalType
|
|
7
7
|
} from './constants'
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
const p = prefix('sftp')
|
|
9
|
+
const e = window.translate
|
|
11
10
|
|
|
12
11
|
function maskHost (hostOrIp = '') {
|
|
13
12
|
if (/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(hostOrIp)) {
|
|
@@ -46,7 +45,7 @@ export default function createTitle (res, hide = true) {
|
|
|
46
45
|
if (type) {
|
|
47
46
|
f = `[${type}]${f}`
|
|
48
47
|
}
|
|
49
|
-
return f ||
|
|
48
|
+
return f || e(terminalLocalType)
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
export function createTitleTag (obj) {
|
|
@@ -9,11 +9,8 @@ import {
|
|
|
9
9
|
} from './constants'
|
|
10
10
|
import { buildNewTheme } from '../common/terminal-theme'
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
const e = prefix('control')
|
|
12
|
+
const e = window.translate
|
|
14
13
|
const newQuickCommand = 'newQuickCommand'
|
|
15
|
-
const q = prefix('quickCommands')
|
|
16
|
-
const f = prefix('form')
|
|
17
14
|
|
|
18
15
|
export default (arr, tab) => {
|
|
19
16
|
if (tab === settingMap.history) {
|
|
@@ -27,12 +24,12 @@ export default (arr, tab) => {
|
|
|
27
24
|
} else if (tab === settingMap.quickCommands) {
|
|
28
25
|
return {
|
|
29
26
|
id: '',
|
|
30
|
-
name:
|
|
27
|
+
name: encodeURIComponent(newQuickCommand)
|
|
31
28
|
}
|
|
32
29
|
} else if (tab === settingMap.profiles) {
|
|
33
30
|
return {
|
|
34
31
|
id: '',
|
|
35
|
-
name:
|
|
32
|
+
name: e(settingMap.profiles)
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
35
|
}
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
import { defaultTheme, settingMap } from '../common/constants'
|
|
6
6
|
import download from '../common/download'
|
|
7
7
|
import copy from 'json-deep-copy'
|
|
8
|
-
const
|
|
9
|
-
const t = prefix('terminalThemes')
|
|
8
|
+
const e = window.translate
|
|
10
9
|
const terminalPrefix = 'terminal:'
|
|
11
10
|
export const requiredThemeProps = [
|
|
12
11
|
'main',
|
|
@@ -64,7 +63,7 @@ export const buildNewTheme = (theme = defaultTheme) => {
|
|
|
64
63
|
copy(theme),
|
|
65
64
|
{
|
|
66
65
|
id: '',
|
|
67
|
-
name:
|
|
66
|
+
name: e('newTheme')
|
|
68
67
|
}
|
|
69
68
|
)
|
|
70
69
|
}
|
|
@@ -12,8 +12,7 @@ import {
|
|
|
12
12
|
import Main from '../main/main.jsx'
|
|
13
13
|
import './login.styl'
|
|
14
14
|
|
|
15
|
-
const
|
|
16
|
-
const f = prefix('form')
|
|
15
|
+
const e = window.translate
|
|
17
16
|
|
|
18
17
|
window.store = store
|
|
19
18
|
|
|
@@ -98,7 +97,7 @@ export default class Login extends Component {
|
|
|
98
97
|
value={pass}
|
|
99
98
|
readOnly={loading}
|
|
100
99
|
onChange={this.handlePassChange}
|
|
101
|
-
placeholder={
|
|
100
|
+
placeholder={e('password')}
|
|
102
101
|
addonAfter={this.renderAfter()}
|
|
103
102
|
onPressEnter={this.handleSubmit}
|
|
104
103
|
/>
|
|
@@ -32,11 +32,7 @@ import wait from '../../common/wait'
|
|
|
32
32
|
import { getFolderFromFilePath } from '../sftp/file-read'
|
|
33
33
|
import resolveFilePath from '../../common/resolve'
|
|
34
34
|
|
|
35
|
-
const
|
|
36
|
-
const f = prefix('form')
|
|
37
|
-
const t = prefix('transferHistory')
|
|
38
|
-
const c = prefix('common')
|
|
39
|
-
const m = prefix('menu')
|
|
35
|
+
const e = window.translate
|
|
40
36
|
|
|
41
37
|
export default class BatchOp extends Component {
|
|
42
38
|
state = {
|
|
@@ -50,13 +46,13 @@ export default class BatchOp extends Component {
|
|
|
50
46
|
}
|
|
51
47
|
|
|
52
48
|
exampleColumns = [
|
|
53
|
-
{ title:
|
|
54
|
-
{ title:
|
|
55
|
-
{ title:
|
|
56
|
-
{ title:
|
|
49
|
+
{ title: e('host'), dataIndex: 'host', key: 'host' },
|
|
50
|
+
{ title: e('port'), dataIndex: 'port', key: 'port', responsive: ['md'] },
|
|
51
|
+
{ title: e('username'), dataIndex: 'username', key: 'username', responsive: ['lg'] },
|
|
52
|
+
{ title: e('password'), dataIndex: 'password', key: 'password', responsive: ['xl'] },
|
|
57
53
|
{ title: 'Command', dataIndex: 'command', key: 'command', responsive: ['lg'] },
|
|
58
|
-
{ title:
|
|
59
|
-
{ title:
|
|
54
|
+
{ title: e('localPath'), dataIndex: 'localPath', key: 'localPath', responsive: ['xl'] },
|
|
55
|
+
{ title: e('remotePath'), dataIndex: 'remotePath', key: 'remotePath', responsive: ['xl'] },
|
|
60
56
|
{ title: 'Action', dataIndex: 'action', key: 'action', responsive: ['md'] },
|
|
61
57
|
{ title: 'Command After', dataIndex: 'commandAfter', key: 'commandAfter', responsive: ['xl'] }
|
|
62
58
|
]
|
|
@@ -209,7 +205,7 @@ export default class BatchOp extends Component {
|
|
|
209
205
|
await runCmd(tab.pid, tab.sessionId, conf.cmdAfterTransfer)
|
|
210
206
|
this.updateState('run cmd2 done', index)
|
|
211
207
|
}
|
|
212
|
-
this.updateState(
|
|
208
|
+
this.updateState(e('finished'), index)
|
|
213
209
|
document.querySelector('.tabs .tab.active .tab-close .anticon').click()
|
|
214
210
|
}
|
|
215
211
|
|
|
@@ -462,7 +458,7 @@ export default class BatchOp extends Component {
|
|
|
462
458
|
<Button
|
|
463
459
|
onClick={this.handleExec}
|
|
464
460
|
loading={this.state.working}
|
|
465
|
-
>{
|
|
461
|
+
>{e('execute')}
|
|
466
462
|
</Button>
|
|
467
463
|
</div>
|
|
468
464
|
)
|
|
@@ -471,22 +467,8 @@ export default class BatchOp extends Component {
|
|
|
471
467
|
translate = k => {
|
|
472
468
|
if (k === 'index') {
|
|
473
469
|
return 'NO.'
|
|
474
|
-
} else if (
|
|
475
|
-
[
|
|
476
|
-
'host',
|
|
477
|
-
'port',
|
|
478
|
-
'username',
|
|
479
|
-
'password'
|
|
480
|
-
].includes(k)
|
|
481
|
-
) {
|
|
482
|
-
return f(k)
|
|
483
|
-
} else if (
|
|
484
|
-
k.includes('Path')
|
|
485
|
-
) {
|
|
486
|
-
return t(k)
|
|
487
|
-
} else {
|
|
488
|
-
return c(k)
|
|
489
470
|
}
|
|
471
|
+
return e(k)
|
|
490
472
|
}
|
|
491
473
|
|
|
492
474
|
renderContent () {
|
|
@@ -509,12 +491,12 @@ export default class BatchOp extends Component {
|
|
|
509
491
|
<div>
|
|
510
492
|
<div className='pd1y'>
|
|
511
493
|
<h2>
|
|
512
|
-
{
|
|
494
|
+
{e('batchOperation')}
|
|
513
495
|
<HelpIcon
|
|
514
496
|
link={batchOpHelpLink}
|
|
515
497
|
/>
|
|
516
498
|
</h2>
|
|
517
|
-
<div className='pd1y'>{
|
|
499
|
+
<div className='pd1y'>{e('examples')}:</div>
|
|
518
500
|
<Table
|
|
519
501
|
{...exampleTableProps}
|
|
520
502
|
/>
|
|
@@ -546,7 +528,7 @@ export default class BatchOp extends Component {
|
|
|
546
528
|
type='dashed'
|
|
547
529
|
disabled={disabled}
|
|
548
530
|
>
|
|
549
|
-
{
|
|
531
|
+
{e('importFromCSV')}
|
|
550
532
|
</Button>
|
|
551
533
|
</Upload>
|
|
552
534
|
</div>
|
|
@@ -565,7 +547,7 @@ export default class BatchOp extends Component {
|
|
|
565
547
|
loading={loading}
|
|
566
548
|
disabled={disabled}
|
|
567
549
|
htmlType='button'
|
|
568
|
-
>{
|
|
550
|
+
>{e('addToQueue')}
|
|
569
551
|
</Button>
|
|
570
552
|
</div>
|
|
571
553
|
<div className='fright'>
|
|
@@ -575,7 +557,7 @@ export default class BatchOp extends Component {
|
|
|
575
557
|
disabled={disabled || !tasks.length}
|
|
576
558
|
type='primary'
|
|
577
559
|
htmlType='button'
|
|
578
|
-
>{
|
|
560
|
+
>{e('execute')}
|
|
579
561
|
</Button>
|
|
580
562
|
</div>
|
|
581
563
|
</div>
|
|
@@ -632,7 +614,7 @@ export default class BatchOp extends Component {
|
|
|
632
614
|
})
|
|
633
615
|
if (tab === 'tasks') {
|
|
634
616
|
columns.push({
|
|
635
|
-
title:
|
|
617
|
+
title: e('del'),
|
|
636
618
|
dataIndex: 'op',
|
|
637
619
|
key: 'op',
|
|
638
620
|
render: (k, rec) => {
|
|
@@ -644,7 +626,7 @@ export default class BatchOp extends Component {
|
|
|
644
626
|
className='act-del pointer'
|
|
645
627
|
onClick={() => this.handleDel(rec)}
|
|
646
628
|
>
|
|
647
|
-
{
|
|
629
|
+
{e('del')}
|
|
648
630
|
</span>
|
|
649
631
|
)
|
|
650
632
|
}
|
|
@@ -657,7 +639,7 @@ export default class BatchOp extends Component {
|
|
|
657
639
|
}
|
|
658
640
|
})
|
|
659
641
|
const len = data.length
|
|
660
|
-
const title = `${
|
|
642
|
+
const title = `${e(tab)}(${len})`
|
|
661
643
|
return {
|
|
662
644
|
key: tab,
|
|
663
645
|
label: title,
|
|
@@ -28,10 +28,7 @@ const RadioButton = Radio.Button
|
|
|
28
28
|
const RadioGroup = Radio.Group
|
|
29
29
|
const FormItem = Form.Item
|
|
30
30
|
const { Option } = Select
|
|
31
|
-
const
|
|
32
|
-
const e = prefix('form')
|
|
33
|
-
const c = prefix('common')
|
|
34
|
-
const sf = prefix('sftp')
|
|
31
|
+
const e = window.translate
|
|
35
32
|
|
|
36
33
|
export default function renderCommon (props) {
|
|
37
34
|
const {
|
|
@@ -146,7 +143,7 @@ export default function renderCommon (props) {
|
|
|
146
143
|
</FormItem>
|
|
147
144
|
<FormItem
|
|
148
145
|
{...formItemLayout}
|
|
149
|
-
label={
|
|
146
|
+
label={e('bookmarkCategory')}
|
|
150
147
|
name='category'
|
|
151
148
|
>
|
|
152
149
|
<TreeSelect
|
|
@@ -181,14 +178,14 @@ export default function renderCommon (props) {
|
|
|
181
178
|
<FormItem
|
|
182
179
|
{...formItemLayout}
|
|
183
180
|
name='startDirectoryLocal'
|
|
184
|
-
label={`${e('startDirectory')}:${
|
|
181
|
+
label={`${e('startDirectory')}:${e('local')}`}
|
|
185
182
|
>
|
|
186
183
|
<Input />
|
|
187
184
|
</FormItem>
|
|
188
185
|
<FormItem
|
|
189
186
|
{...formItemLayout}
|
|
190
187
|
name='startDirectory'
|
|
191
|
-
label={`${e('startDirectory')}:${
|
|
188
|
+
label={`${e('startDirectory')}:${e('remote')}`}
|
|
192
189
|
>
|
|
193
190
|
<Input />
|
|
194
191
|
</FormItem>
|
|
@@ -7,16 +7,12 @@ import {
|
|
|
7
7
|
import { sshTunnelHelpLink } from '../../common/constants'
|
|
8
8
|
import HelpIcon from '../common/help-icon'
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
const e = prefix('form')
|
|
12
|
-
const s = prefix('setting')
|
|
13
|
-
const h = prefix('ssh')
|
|
14
|
-
const q = prefix('quickCommands')
|
|
10
|
+
const e = window.translate
|
|
15
11
|
|
|
16
12
|
export default function renderTabs (props) {
|
|
17
13
|
const tunnelTag = (
|
|
18
14
|
<span>
|
|
19
|
-
{
|
|
15
|
+
{e('sshTunnel')}
|
|
20
16
|
<HelpIcon
|
|
21
17
|
link={sshTunnelHelpLink}
|
|
22
18
|
/>
|
|
@@ -31,7 +27,7 @@ export default function renderTabs (props) {
|
|
|
31
27
|
},
|
|
32
28
|
{
|
|
33
29
|
key: 'settings',
|
|
34
|
-
label:
|
|
30
|
+
label: e('settings'),
|
|
35
31
|
forceRender: true,
|
|
36
32
|
children: (
|
|
37
33
|
<div>
|
|
@@ -44,7 +40,7 @@ export default function renderTabs (props) {
|
|
|
44
40
|
},
|
|
45
41
|
{
|
|
46
42
|
key: 'quickCommands',
|
|
47
|
-
label:
|
|
43
|
+
label: e('quickCommands'),
|
|
48
44
|
forceRender: true,
|
|
49
45
|
children: props.qms
|
|
50
46
|
},
|
|
@@ -29,11 +29,7 @@ import {
|
|
|
29
29
|
BookOutlined
|
|
30
30
|
} from '@ant-design/icons'
|
|
31
31
|
|
|
32
|
-
const
|
|
33
|
-
const c = prefix('common')
|
|
34
|
-
const m = prefix('menu')
|
|
35
|
-
const s = prefix('setting')
|
|
36
|
-
const p = prefix('sftp')
|
|
32
|
+
const e = window.translate
|
|
37
33
|
|
|
38
34
|
export default class BookmarkIndex extends Component {
|
|
39
35
|
constructor (props) {
|
|
@@ -102,7 +98,7 @@ export default class BookmarkIndex extends Component {
|
|
|
102
98
|
keys.map(k => {
|
|
103
99
|
const v = connectionMap[k]
|
|
104
100
|
return (
|
|
105
|
-
<Radio.Button key={v} value={v}>{
|
|
101
|
+
<Radio.Button key={v} value={v}>{e(v)}</Radio.Button>
|
|
106
102
|
)
|
|
107
103
|
})
|
|
108
104
|
}
|
|
@@ -156,9 +152,9 @@ export default class BookmarkIndex extends Component {
|
|
|
156
152
|
<span>
|
|
157
153
|
{
|
|
158
154
|
(!isNew
|
|
159
|
-
?
|
|
160
|
-
:
|
|
161
|
-
) + ' ' +
|
|
155
|
+
? e('edit')
|
|
156
|
+
: e('new')
|
|
157
|
+
) + ' ' + e(settingMap.bookmarks)
|
|
162
158
|
}
|
|
163
159
|
</span>
|
|
164
160
|
{this.renderTitle(formData, isNew)}
|
|
@@ -26,10 +26,7 @@ import { ColorPickerItem } from './color-picker-item.jsx'
|
|
|
26
26
|
import { getRandomDefaultColor } from '../../common/rand-hex-color.js'
|
|
27
27
|
|
|
28
28
|
const FormItem = Form.Item
|
|
29
|
-
const
|
|
30
|
-
const e = prefix('form')
|
|
31
|
-
const c = prefix('common')
|
|
32
|
-
const s = prefix('setting')
|
|
29
|
+
const e = window.translate
|
|
33
30
|
|
|
34
31
|
export default function LocalFormUi (props) {
|
|
35
32
|
const [
|
|
@@ -94,7 +91,7 @@ export default function LocalFormUi (props) {
|
|
|
94
91
|
</FormItem>
|
|
95
92
|
<FormItem
|
|
96
93
|
{...formItemLayout}
|
|
97
|
-
label={
|
|
94
|
+
label={e('bookmarkCategory')}
|
|
98
95
|
name='category'
|
|
99
96
|
>
|
|
100
97
|
<TreeSelect
|
|
@@ -125,7 +122,7 @@ export default function LocalFormUi (props) {
|
|
|
125
122
|
},
|
|
126
123
|
{
|
|
127
124
|
key: 'settings',
|
|
128
|
-
label:
|
|
125
|
+
label: e('settings'),
|
|
129
126
|
forceRender: true,
|
|
130
127
|
children: uis
|
|
131
128
|
},
|
|
@@ -6,8 +6,7 @@ import {
|
|
|
6
6
|
import { formItemLayout } from '../../common/form-layout'
|
|
7
7
|
|
|
8
8
|
const FormItem = Form.Item
|
|
9
|
-
const
|
|
10
|
-
const e = prefix('form')
|
|
9
|
+
const e = window.translate
|
|
11
10
|
|
|
12
11
|
export default function renderProxy (props) {
|
|
13
12
|
const proxyTree = props.bookmarks
|
|
@@ -18,8 +18,7 @@ import generate from '../../common/uid'
|
|
|
18
18
|
import eq from 'fast-deep-equal'
|
|
19
19
|
|
|
20
20
|
const InputGroup = Space.Compact
|
|
21
|
-
const
|
|
22
|
-
const t = prefix('quickCommands')
|
|
21
|
+
const e = window.translate
|
|
23
22
|
|
|
24
23
|
export default class QuickCommandItem extends PureComponent {
|
|
25
24
|
constructor (props) {
|
|
@@ -156,19 +155,19 @@ export default class QuickCommandItem extends PureComponent {
|
|
|
156
155
|
onChange={this.handleChangeName}
|
|
157
156
|
className='width-40'
|
|
158
157
|
title={item.name}
|
|
159
|
-
placeholder={
|
|
158
|
+
placeholder={e('quickCommandName')}
|
|
160
159
|
/>
|
|
161
160
|
<Input
|
|
162
161
|
value={item.command}
|
|
163
162
|
onChange={this.handleChangeCommand}
|
|
164
163
|
className='width-60'
|
|
165
|
-
placeholder={
|
|
164
|
+
placeholder={e('quickCommand')}
|
|
166
165
|
title={item.command}
|
|
167
166
|
/>
|
|
168
167
|
</InputGroup>
|
|
169
168
|
</Col>
|
|
170
169
|
<Col span={3}>
|
|
171
|
-
<Tooltip title={
|
|
170
|
+
<Tooltip title={e('inputOnly')}>
|
|
172
171
|
<Switch
|
|
173
172
|
checked={!!item.inputOnly}
|
|
174
173
|
onChange={this.handleChangeInputOnly}
|
|
@@ -192,7 +191,7 @@ export default class QuickCommandItem extends PureComponent {
|
|
|
192
191
|
readOnly
|
|
193
192
|
className='width-40'
|
|
194
193
|
title={item.name}
|
|
195
|
-
placeholder={
|
|
194
|
+
placeholder={e('quickCommandName')}
|
|
196
195
|
/>
|
|
197
196
|
<Input
|
|
198
197
|
value={item.command}
|
|
@@ -203,10 +202,10 @@ export default class QuickCommandItem extends PureComponent {
|
|
|
203
202
|
</InputGroup>
|
|
204
203
|
</Col>
|
|
205
204
|
<Col span={3}>
|
|
206
|
-
<Tooltip title={
|
|
205
|
+
<Tooltip title={e('inputOnly')}>
|
|
207
206
|
<Switch
|
|
208
207
|
checked={!!item.inputOnly}
|
|
209
|
-
title={
|
|
208
|
+
title={e('inputOnly')}
|
|
210
209
|
readOnly
|
|
211
210
|
/>
|
|
212
211
|
</Tooltip>
|
|
@@ -25,9 +25,7 @@ import formatBookmarkGroups from './bookmark-group-tree-format'
|
|
|
25
25
|
import findBookmarkGroupId from '../../common/find-bookmark-group-id'
|
|
26
26
|
|
|
27
27
|
const FormItem = Form.Item
|
|
28
|
-
const
|
|
29
|
-
const e = prefix('form')
|
|
30
|
-
const c = prefix('common')
|
|
28
|
+
const e = window.translate
|
|
31
29
|
|
|
32
30
|
export default function RdpFormUi (props) {
|
|
33
31
|
const [
|
|
@@ -140,7 +138,7 @@ export default function RdpFormUi (props) {
|
|
|
140
138
|
</FormItem>
|
|
141
139
|
<FormItem
|
|
142
140
|
{...formItemLayout}
|
|
143
|
-
label={
|
|
141
|
+
label={e('bookmarkCategory')}
|
|
144
142
|
name='category'
|
|
145
143
|
>
|
|
146
144
|
<TreeSelect
|
|
@@ -21,9 +21,7 @@ import { useState } from 'react'
|
|
|
21
21
|
const FormItem = Form.Item
|
|
22
22
|
const RadioButton = Radio.Button
|
|
23
23
|
const RadioGroup = Radio.Group
|
|
24
|
-
const
|
|
25
|
-
const f = prefix('form')
|
|
26
|
-
const m = prefix('menu')
|
|
24
|
+
const e = window.translate
|
|
27
25
|
|
|
28
26
|
export default function renderConnectionHopping (props) {
|
|
29
27
|
const {
|
|
@@ -89,7 +87,7 @@ export default function renderConnectionHopping (props) {
|
|
|
89
87
|
key: 'index',
|
|
90
88
|
render: (k) => k
|
|
91
89
|
}, {
|
|
92
|
-
title:
|
|
90
|
+
title: e('connectionHopping'),
|
|
93
91
|
key: 'connectionHopping',
|
|
94
92
|
render: (k, item) => {
|
|
95
93
|
const pass = item.password ? ':*****' : ''
|
|
@@ -99,7 +97,7 @@ export default function renderConnectionHopping (props) {
|
|
|
99
97
|
return <span>{useProfile}{item.username}{pass}@{item.host}:{item.port}{pk}{ph}</span>
|
|
100
98
|
}
|
|
101
99
|
}, {
|
|
102
|
-
title:
|
|
100
|
+
title: e('del'),
|
|
103
101
|
key: 'op',
|
|
104
102
|
dataIndex: 'id',
|
|
105
103
|
render: (id) => {
|
|
@@ -148,7 +146,7 @@ export default function renderConnectionHopping (props) {
|
|
|
148
146
|
{renderList()}
|
|
149
147
|
<FormItem
|
|
150
148
|
{...formItemLayout}
|
|
151
|
-
label={
|
|
149
|
+
label={e('host')}
|
|
152
150
|
hasFeedback
|
|
153
151
|
rules={[{
|
|
154
152
|
max: 520, message: '520 chars max'
|
|
@@ -162,7 +160,7 @@ export default function renderConnectionHopping (props) {
|
|
|
162
160
|
</FormItem>
|
|
163
161
|
<FormItem
|
|
164
162
|
{...formItemLayout}
|
|
165
|
-
label={
|
|
163
|
+
label={e('port')}
|
|
166
164
|
hasFeedback
|
|
167
165
|
name='port'
|
|
168
166
|
rules={[{
|
|
@@ -170,7 +168,7 @@ export default function renderConnectionHopping (props) {
|
|
|
170
168
|
}]}
|
|
171
169
|
>
|
|
172
170
|
<InputNumber
|
|
173
|
-
placeholder={
|
|
171
|
+
placeholder={e('port')}
|
|
174
172
|
min={1}
|
|
175
173
|
max={65535}
|
|
176
174
|
step={1}
|
|
@@ -178,7 +176,7 @@ export default function renderConnectionHopping (props) {
|
|
|
178
176
|
</FormItem>
|
|
179
177
|
<FormItem
|
|
180
178
|
{...formItemLayout}
|
|
181
|
-
label={
|
|
179
|
+
label={e('username')}
|
|
182
180
|
hasFeedback
|
|
183
181
|
name='username'
|
|
184
182
|
rules={[{
|
|
@@ -202,7 +200,7 @@ export default function renderConnectionHopping (props) {
|
|
|
202
200
|
authTypes.map(t => {
|
|
203
201
|
return (
|
|
204
202
|
<RadioButton value={t} key={t}>
|
|
205
|
-
{
|
|
203
|
+
{e(t)}
|
|
206
204
|
</RadioButton>
|
|
207
205
|
)
|
|
208
206
|
})
|
|
@@ -221,7 +219,7 @@ export default function renderConnectionHopping (props) {
|
|
|
221
219
|
icon={<PlusOutlined />}
|
|
222
220
|
onClick={onSubmit}
|
|
223
221
|
>
|
|
224
|
-
{
|
|
222
|
+
{e('connectionHopping')}
|
|
225
223
|
</Button>
|
|
226
224
|
</FormItem>
|
|
227
225
|
</Form>
|
|
@@ -10,8 +10,7 @@ import { formItemLayout } from '../../common/form-layout'
|
|
|
10
10
|
|
|
11
11
|
const FormItem = Form.Item
|
|
12
12
|
const FormList = Form.List
|
|
13
|
-
const
|
|
14
|
-
const e = prefix('form')
|
|
13
|
+
const e = window.translate
|
|
15
14
|
|
|
16
15
|
export default function renderRunScripts () {
|
|
17
16
|
function renderItem (field, i, add, remove) {
|
|
@@ -18,10 +18,7 @@ const {
|
|
|
18
18
|
Button: RadioButton,
|
|
19
19
|
Group: RadioGroup
|
|
20
20
|
} = Radio
|
|
21
|
-
const
|
|
22
|
-
const e = prefix('ssh')
|
|
23
|
-
const s = prefix('sftp')
|
|
24
|
-
const m = prefix('menu')
|
|
21
|
+
const e = window.translate
|
|
25
22
|
|
|
26
23
|
export default function renderSshTunnels (props) {
|
|
27
24
|
const {
|
|
@@ -98,11 +95,11 @@ export default function renderSshTunnels (props) {
|
|
|
98
95
|
return `${n}socks5://${sshTunnelLocalHost}:${sshTunnelLocalPort}`
|
|
99
96
|
}
|
|
100
97
|
const to = sshTunnel === 'forwardRemoteToLocal'
|
|
101
|
-
? `${
|
|
102
|
-
: `${
|
|
98
|
+
? `${e('local')}:${sshTunnelLocalHost}:${sshTunnelLocalPort}`
|
|
99
|
+
: `${e('remote')}:${sshTunnelRemoteHost}:${sshTunnelRemotePort}`
|
|
103
100
|
const from = sshTunnel === 'forwardRemoteToLocal'
|
|
104
|
-
? `${
|
|
105
|
-
: `${
|
|
101
|
+
? `${e('remote')}:${sshTunnelRemoteHost}:${sshTunnelRemotePort}`
|
|
102
|
+
: `${e('local')}:${sshTunnelLocalHost}:${sshTunnelLocalPort}`
|
|
106
103
|
return (
|
|
107
104
|
<span>
|
|
108
105
|
{name ? `[${name}] ` : ''}→ {from} → {to}
|
|
@@ -110,7 +107,7 @@ export default function renderSshTunnels (props) {
|
|
|
110
107
|
)
|
|
111
108
|
}
|
|
112
109
|
}, {
|
|
113
|
-
title:
|
|
110
|
+
title: e('del'),
|
|
114
111
|
key: 'op',
|
|
115
112
|
dataIndex: 'id',
|
|
116
113
|
render: (id) => {
|
|
@@ -168,7 +165,7 @@ export default function renderSshTunnels (props) {
|
|
|
168
165
|
}
|
|
169
166
|
return (
|
|
170
167
|
<FormItem
|
|
171
|
-
label={
|
|
168
|
+
label={e('remote')}
|
|
172
169
|
{...formItemLayout}
|
|
173
170
|
required
|
|
174
171
|
className='ssh-tunnels-host'
|
|
@@ -245,7 +242,7 @@ export default function renderSshTunnels (props) {
|
|
|
245
242
|
</FormItem>
|
|
246
243
|
{renderRemote()}
|
|
247
244
|
<FormItem
|
|
248
|
-
label={
|
|
245
|
+
label={e('local')}
|
|
249
246
|
{...formItemLayout}
|
|
250
247
|
required
|
|
251
248
|
className='ssh-tunnels-host'
|
|
@@ -276,7 +273,7 @@ export default function renderSshTunnels (props) {
|
|
|
276
273
|
</FormItem>
|
|
277
274
|
<FormItem
|
|
278
275
|
name='name'
|
|
279
|
-
label={
|
|
276
|
+
label={e('name')}
|
|
280
277
|
{...formItemLayout}
|
|
281
278
|
>
|
|
282
279
|
<Input
|