@electerm/electerm-react 1.40.20 → 1.50.21
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 +57 -7
- package/client/common/new-terminal.js +2 -2
- package/client/components/auth/login.jsx +34 -57
- package/client/components/batch-op/batch-op.jsx +12 -11
- package/client/components/bookmark-form/index.jsx +2 -2
- package/client/components/bookmark-form/ssh-form.jsx +4 -1
- package/client/components/bookmark-form/tree-delete.jsx +5 -5
- package/client/components/context-menu/boomarks.jsx +8 -12
- package/client/components/context-menu/context-menu.jsx +10 -10
- package/client/components/context-menu/history.jsx +21 -24
- package/client/components/context-menu/menu-btn.jsx +11 -11
- package/client/components/context-menu/tabs.jsx +15 -19
- package/client/components/context-menu/zoom.jsx +25 -29
- package/client/components/footer/footer-entry.jsx +56 -56
- package/client/components/icons/split-icons.jsx +77 -0
- package/client/components/layout/layout-alg.js +260 -0
- package/client/components/layout/layout-item.jsx +26 -0
- package/client/components/layout/layout.jsx +167 -0
- package/client/components/layout/layout.styl +5 -0
- package/client/components/layout/layouts.jsx +71 -0
- package/client/components/layout/session-size-alg.js +31 -0
- package/client/components/main/main.jsx +183 -109
- package/client/components/main/wrapper.styl +2 -4
- package/client/components/profile/profile-list.jsx +1 -3
- package/client/components/profile/profile-transport-mod.jsx +1 -1
- package/client/components/profile/profile-transport.jsx +6 -9
- package/client/components/quick-commands/quick-command-transport.jsx +6 -9
- package/client/components/quick-commands/quick-commands-box.jsx +144 -153
- package/client/components/quick-commands/quick-commands-select.jsx +10 -3
- package/client/components/rdp/rdp-session.jsx +3 -23
- package/client/components/rdp/resolution-edit.jsx +40 -42
- package/client/components/session/session.jsx +62 -317
- package/client/components/session/session.styl +1 -5
- package/client/components/session/sessions.jsx +99 -105
- package/client/components/setting-panel/bookmark-tree-list.jsx +1 -1
- package/client/components/setting-panel/setting-common.jsx +6 -4
- package/client/components/setting-panel/setting-modal.jsx +31 -31
- package/client/components/setting-panel/start-session-select.jsx +4 -4
- package/client/components/setting-panel/tab-settings.jsx +27 -5
- package/client/components/setting-sync/data-import.jsx +36 -39
- package/client/components/setting-sync/setting-sync-form.jsx +9 -9
- package/client/components/setting-sync/setting-sync.jsx +50 -52
- package/client/components/sftp/address-bookmark.jsx +57 -58
- package/client/components/sftp/confirm-modal-store.jsx +34 -40
- package/client/components/sftp/file-item.jsx +14 -3
- package/client/components/sftp/file-mode-modal.jsx +3 -0
- package/client/components/sftp/list-table-ui.jsx +4 -4
- package/client/components/sftp/sftp-entry.jsx +2 -2
- package/client/components/sftp/transfer-conflict-store.jsx +13 -17
- package/client/components/sftp/transport-action-store.jsx +38 -31
- package/client/components/sftp/transports-action-store.jsx +3 -3
- package/client/components/sftp/transports-ui-store.jsx +18 -23
- package/client/components/shortcuts/shortcut-handler.js +1 -0
- package/client/components/shortcuts/shortcuts.jsx +9 -12
- package/client/components/side-panel-r/right-side-panel.styl +40 -0
- package/client/components/side-panel-r/side-panel-r.jsx +102 -0
- package/client/components/sidebar/bookmark-select.jsx +40 -40
- package/client/components/sidebar/bookmark.jsx +63 -65
- package/client/components/sidebar/history.jsx +53 -50
- package/client/components/sidebar/index.jsx +195 -184
- package/client/components/sidebar/info-modal.jsx +202 -202
- package/client/components/sidebar/sidebar.styl +8 -2
- package/client/components/sidebar/transfer-history-modal.jsx +95 -100
- package/client/components/sidebar/transfer-list-control.jsx +2 -2
- package/client/components/sidebar/transfer-list.jsx +45 -42
- package/client/components/sidebar/transfer-modal.jsx +49 -52
- package/client/components/sidebar/transport-ui.jsx +1 -1
- package/client/components/tabs/index.jsx +261 -49
- package/client/components/tabs/tab.jsx +60 -65
- package/client/components/tabs/tabs.styl +6 -1
- package/client/components/tabs/window-control.jsx +46 -48
- package/client/components/terminal/index.jsx +101 -104
- package/client/components/terminal/term-search.jsx +26 -24
- package/client/components/terminal-info/run-cmd.jsx +0 -25
- package/client/components/terminal-info/terminal-info.jsx +60 -0
- package/client/components/terminal-info/terminal-info.styl +1 -1
- package/client/components/tree-list/bookmark-transport.jsx +8 -9
- package/client/components/tree-list/tree-list.jsx +36 -26
- package/client/components/vnc/vnc-session.jsx +1 -6
- package/client/store/common.js +1 -1
- package/client/store/event.js +2 -2
- package/client/store/index.js +21 -32
- package/client/store/init-state.js +15 -3
- package/client/store/load-data.js +1 -1
- package/client/store/quick-command.js +4 -4
- package/client/store/session.js +1 -1
- package/client/store/setting.js +9 -5
- package/client/store/system-menu.js +1 -10
- package/client/store/tab.js +66 -1
- package/client/store/transfer-list.js +5 -6
- package/client/store/watch.js +11 -6
- package/package.json +1 -1
- package/client/components/common/react-subx.jsx +0 -1
- package/client/components/common/resize-wrap.jsx +0 -222
- package/client/components/common/resize-wrap.styl +0 -9
- package/client/components/terminal-info/content.jsx +0 -152
|
@@ -32,7 +32,7 @@ export default class TransferModalUI extends Component {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
getGroups = () => {
|
|
35
|
-
const fileTransfers = this.props
|
|
35
|
+
const { fileTransfers } = this.props
|
|
36
36
|
const tree = fileTransfers.reduce((p, k) => {
|
|
37
37
|
const {
|
|
38
38
|
id,
|
|
@@ -69,7 +69,7 @@ export default class TransferModalUI extends Component {
|
|
|
69
69
|
const {
|
|
70
70
|
filter
|
|
71
71
|
} = this.state
|
|
72
|
-
const fileTransfers = this.props.
|
|
72
|
+
const fileTransfers = this.props.fileTransfers
|
|
73
73
|
return filter === 'all'
|
|
74
74
|
? fileTransfers
|
|
75
75
|
: fileTransfers.filter(d => d.sessionId === filter)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { memo } from 'react'
|
|
2
2
|
import {
|
|
3
3
|
SwapOutlined
|
|
4
4
|
} from '@ant-design/icons'
|
|
@@ -11,46 +11,49 @@ import './transfer.styl'
|
|
|
11
11
|
|
|
12
12
|
const e = window.translate
|
|
13
13
|
|
|
14
|
-
export default
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
export default memo(function TransferList (props) {
|
|
15
|
+
const {
|
|
16
|
+
fileTransfers,
|
|
17
|
+
transferTab,
|
|
18
|
+
transferHistory
|
|
19
|
+
} = props
|
|
20
|
+
const len = fileTransfers.length
|
|
21
|
+
if (!len && !transferHistory.length) {
|
|
22
|
+
return null
|
|
23
|
+
}
|
|
24
|
+
const color = fileTransfers.some(item => item.error) ? 'red' : 'green'
|
|
25
|
+
const bdProps = {
|
|
26
|
+
className: len ? 'hvr-bob hvr-bob-fast' : '',
|
|
27
|
+
count: len,
|
|
28
|
+
size: 'small',
|
|
29
|
+
offset: [-10, -5],
|
|
30
|
+
color,
|
|
31
|
+
overflowCount: 99
|
|
32
|
+
}
|
|
33
|
+
const transferModalProps = {
|
|
34
|
+
fileTransfers,
|
|
35
|
+
transferHistory,
|
|
36
|
+
transferTab
|
|
37
|
+
}
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
className='control-icon-wrap'
|
|
41
|
+
title={e('fileTransfers')}
|
|
42
|
+
>
|
|
43
|
+
<Popover
|
|
44
|
+
placement='right'
|
|
45
|
+
destroyTooltipOnHide
|
|
46
|
+
overlayClassName='transfer-list-card'
|
|
47
|
+
content={<TransferModal {...transferModalProps} />}
|
|
38
48
|
>
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
destroyTooltipOnHide
|
|
42
|
-
overlayClassName='transfer-list-card'
|
|
43
|
-
content={<TransferModal store={store} />}
|
|
49
|
+
<Badge
|
|
50
|
+
{...bdProps}
|
|
44
51
|
>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
}
|
|
52
|
+
<SwapOutlined
|
|
53
|
+
className='iblock font20 control-icon'
|
|
54
|
+
/>
|
|
55
|
+
</Badge>
|
|
56
|
+
</Popover>
|
|
57
|
+
</div>
|
|
58
|
+
)
|
|
59
|
+
})
|
|
@@ -1,74 +1,71 @@
|
|
|
1
|
-
import { Component } from '../common/react-subx'
|
|
2
1
|
import {
|
|
3
2
|
Tabs
|
|
4
3
|
} from 'antd'
|
|
5
4
|
import Transports from './transfer-list-control'
|
|
6
5
|
import TransportHistory from './transfer-history-modal'
|
|
6
|
+
import { memo } from 'react'
|
|
7
7
|
|
|
8
8
|
const e = window.translate
|
|
9
9
|
|
|
10
|
-
export default
|
|
11
|
-
renderTransfer = () => {
|
|
10
|
+
export default memo(function TransferModal (props) {
|
|
11
|
+
const renderTransfer = () => {
|
|
12
12
|
return (
|
|
13
13
|
<Transports
|
|
14
|
-
|
|
14
|
+
fileTransfers={props.fileTransfers}
|
|
15
15
|
/>
|
|
16
16
|
)
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
renderHistory = () => {
|
|
19
|
+
const renderHistory = () => {
|
|
20
20
|
return (
|
|
21
21
|
<TransportHistory
|
|
22
|
-
|
|
22
|
+
transferHistory={props.transferHistory}
|
|
23
23
|
/>
|
|
24
24
|
)
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
id: 'history',
|
|
49
|
-
render: this.renderHistory
|
|
50
|
-
})
|
|
51
|
-
}
|
|
52
|
-
const activeTab = tabs.map(d => d.id).includes(transferTab)
|
|
53
|
-
? transferTab
|
|
54
|
-
: tabs[0].id
|
|
55
|
-
const items = tabs.map(tab => {
|
|
56
|
-
return {
|
|
57
|
-
key: tab.id,
|
|
58
|
-
label: tab.title,
|
|
59
|
-
children: tab.render()
|
|
60
|
-
}
|
|
27
|
+
const {
|
|
28
|
+
fileTransfers,
|
|
29
|
+
transferHistory,
|
|
30
|
+
transferTab
|
|
31
|
+
} = props
|
|
32
|
+
if (!fileTransfers.length && !transferHistory.length) {
|
|
33
|
+
return null
|
|
34
|
+
}
|
|
35
|
+
const tabs = []
|
|
36
|
+
if (fileTransfers.length) {
|
|
37
|
+
tabs.push({
|
|
38
|
+
title: e('fileTransfers'),
|
|
39
|
+
id: 'transfer',
|
|
40
|
+
render: renderTransfer
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
if (transferHistory.length) {
|
|
44
|
+
tabs.push({
|
|
45
|
+
title: e('transferHistory'),
|
|
46
|
+
id: 'history',
|
|
47
|
+
render: renderHistory
|
|
61
48
|
})
|
|
62
|
-
return (
|
|
63
|
-
<div
|
|
64
|
-
className='pd1'
|
|
65
|
-
>
|
|
66
|
-
<Tabs
|
|
67
|
-
activeKey={activeTab}
|
|
68
|
-
onChange={handleTransferTab}
|
|
69
|
-
items={items}
|
|
70
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
)
|
|
73
49
|
}
|
|
74
|
-
|
|
50
|
+
const activeTab = tabs.map(d => d.id).includes(transferTab)
|
|
51
|
+
? transferTab
|
|
52
|
+
: tabs[0].id
|
|
53
|
+
const items = tabs.map(tab => {
|
|
54
|
+
return {
|
|
55
|
+
key: tab.id,
|
|
56
|
+
label: tab.title,
|
|
57
|
+
children: tab.render()
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
return (
|
|
61
|
+
<div
|
|
62
|
+
className='pd1'
|
|
63
|
+
>
|
|
64
|
+
<Tabs
|
|
65
|
+
activeKey={activeTab}
|
|
66
|
+
onChange={window.store.handleTransferTab}
|
|
67
|
+
items={items}
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
)
|
|
71
|
+
})
|
|
@@ -44,7 +44,7 @@ export default function Transporter (props) {
|
|
|
44
44
|
const title = `${typeFromTitle}→${typeToTitle}: ${fromPath} -> ${toPath} ${speed || ''} ${percent || 0}%`
|
|
45
45
|
const cancelIcon = (
|
|
46
46
|
<CloseCircleOutlined
|
|
47
|
-
className='transfer-control-icon pointer hover-black font14'
|
|
47
|
+
className='transfer-control-icon transfer-control-cancel pointer hover-black font14'
|
|
48
48
|
onClick={cancel}
|
|
49
49
|
title={e('cancel')}
|
|
50
50
|
/>
|