@electerm/electerm-react 1.60.16 → 1.60.29
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/clipboard.js +1 -14
- package/client/common/constants.js +0 -43
- package/client/common/data-compare.js +55 -0
- package/client/common/default-setting.js +2 -10
- package/client/common/resolve.js +18 -22
- package/client/common/sftp.js +0 -3
- package/client/components/ai/ai-chat.jsx +30 -6
- package/client/components/ai/ai-config.jsx +17 -6
- package/client/components/batch-op/batch-op.jsx +3 -24
- package/client/components/bookmark-form/bookmark-group-tree-format.js +7 -9
- package/client/components/bookmark-form/form-ssh-common.jsx +0 -2
- package/client/components/bookmark-form/ssh-form.jsx +8 -41
- package/client/components/bookmark-form/tree-delete.jsx +6 -15
- package/client/components/common/animate-text.jsx +3 -4
- package/client/components/common/drag-handle.jsx +59 -45
- package/client/components/common/drag-handle.styl +2 -1
- package/client/components/common/input-auto-focus.jsx +29 -63
- package/client/components/common/ref.js +24 -0
- package/client/components/footer/batch-input.jsx +1 -6
- package/client/components/footer/footer-entry.jsx +13 -16
- package/client/components/footer/footer.styl +0 -5
- package/client/components/icons/ai-icon.jsx +17 -0
- package/client/components/icons/ai-icon.styl +3 -0
- package/client/components/layout/layout-item.jsx +14 -0
- package/client/components/main/main.jsx +8 -19
- package/client/components/main/upgrade.jsx +13 -25
- package/client/components/profile/profile-form-elem.jsx +1 -2
- package/client/components/quick-commands/on-drop.js +1 -12
- package/client/components/quick-commands/quick-command-transport-mod.jsx +3 -13
- package/client/components/quick-commands/quick-commands-form-elem.jsx +1 -2
- package/client/components/rdp/rdp-session.jsx +4 -4
- package/client/components/session/session.jsx +9 -11
- package/client/components/setting-panel/on-tree-drop.js +4 -35
- package/client/components/setting-panel/setting-common.jsx +4 -1
- package/client/components/setting-panel/setting-modal.jsx +7 -5
- package/client/components/setting-panel/tab-settings.jsx +0 -1
- package/client/components/setting-sync/setting-sync.jsx +0 -1
- package/client/components/sftp/address-bookmark-item.jsx +1 -15
- package/client/components/sftp/confirm-modal-store.jsx +2 -2
- package/client/components/sftp/{file-mode-modal.jsx → file-info-modal.jsx} +137 -37
- package/client/components/sftp/file-item.jsx +156 -192
- package/client/components/sftp/file-table-header.jsx +98 -0
- package/client/components/sftp/list-table-ui.jsx +125 -416
- package/client/components/sftp/sftp-entry.jsx +102 -128
- package/client/components/sftp/sftp.styl +6 -22
- package/client/components/sftp/transfer-conflict-store.jsx +8 -12
- package/client/components/sftp/transport-action-store.jsx +7 -15
- package/client/components/shortcuts/shortcut-control.jsx +72 -3
- package/client/components/shortcuts/shortcut-handler.js +0 -1
- package/client/components/side-panel-r/side-panel-r.jsx +7 -4
- package/client/components/sidebar/history.jsx +3 -0
- package/client/components/sidebar/index.jsx +1 -1
- package/client/components/sidebar/info-modal.jsx +3 -0
- package/client/components/sidebar/side-panel.jsx +7 -4
- package/client/components/sidebar/sidebar-panel.jsx +1 -1
- package/client/components/sidebar/sidebar.styl +3 -3
- package/client/components/sys-menu/icons-map.jsx +52 -0
- package/client/components/{context-menu → sys-menu}/menu-btn.jsx +33 -45
- package/client/components/sys-menu/sys-menu.jsx +163 -0
- package/client/components/{context-menu/context-menu.styl → sys-menu/sys-menu.styl} +2 -11
- package/client/components/tabs/index.jsx +5 -97
- package/client/components/tabs/tab.jsx +121 -73
- package/client/components/tabs/tabs.styl +4 -1
- package/client/components/terminal/term-search.jsx +16 -28
- package/client/components/terminal/terminal-interactive.jsx +0 -2
- package/client/components/terminal/{index.jsx → terminal.jsx} +126 -248
- package/client/components/terminal-info/base.jsx +21 -46
- package/client/components/terminal-info/terminal-info.jsx +3 -0
- package/client/components/text-editor/text-editor.jsx +38 -53
- package/client/components/theme/theme-form.jsx +0 -2
- package/client/components/tree-list/bookmark-toolbar.jsx +23 -47
- package/client/components/tree-list/bookmark-transport.jsx +2 -90
- package/client/components/tree-list/move-item-modal.jsx +101 -0
- package/client/components/tree-list/tree-list-item.jsx +6 -8
- package/client/components/tree-list/tree-list.jsx +48 -273
- package/client/components/vnc/vnc-session.jsx +5 -3
- package/client/store/app-upgrade.js +2 -5
- package/client/store/bookmark-group.js +74 -28
- package/client/store/common.js +36 -54
- package/client/store/event.js +4 -37
- package/client/store/init-state.js +9 -12
- package/client/store/item.js +34 -39
- package/client/store/load-data.js +5 -1
- package/client/store/quick-command.js +2 -12
- package/client/store/session.js +6 -7
- package/client/store/setting.js +3 -7
- package/client/store/sidebar.js +2 -8
- package/client/store/store.js +0 -20
- package/client/store/system-menu.js +1 -2
- package/client/store/tab.js +29 -1
- package/client/store/terminal-theme.js +0 -4
- package/client/store/watch.js +26 -4
- package/package.json +1 -1
- package/client/common/post-msg.js +0 -3
- package/client/components/common/native-input.jsx +0 -30
- package/client/components/context-menu/context-menu.jsx +0 -339
- package/client/components/sftp/file-props-modal.jsx +0 -210
- package/client/store/context-menu.js +0 -23
- /package/client/components/{context-menu → sys-menu}/boomarks.jsx +0 -0
- /package/client/components/{context-menu → sys-menu}/history.jsx +0 -0
- /package/client/components/{context-menu → sys-menu}/icon-holder.jsx +0 -0
- /package/client/components/{context-menu → sys-menu}/sub-tab-menu.jsx +0 -0
- /package/client/components/{context-menu → sys-menu}/tabs.jsx +0 -0
- /package/client/components/{context-menu → sys-menu}/zoom.jsx +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* file list table
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { Component } from 'react'
|
|
6
|
+
import classnames from 'classnames'
|
|
7
|
+
import {
|
|
8
|
+
DownOutlined,
|
|
9
|
+
UpOutlined
|
|
10
|
+
} from '@ant-design/icons'
|
|
11
|
+
import {
|
|
12
|
+
Dropdown,
|
|
13
|
+
Splitter
|
|
14
|
+
} from 'antd'
|
|
15
|
+
|
|
16
|
+
const e = window.translate
|
|
17
|
+
const { Panel } = Splitter
|
|
18
|
+
|
|
19
|
+
export default class FileListTableHeader extends Component {
|
|
20
|
+
renderHeaderItem = (item) => {
|
|
21
|
+
const {
|
|
22
|
+
id,
|
|
23
|
+
size,
|
|
24
|
+
max,
|
|
25
|
+
min
|
|
26
|
+
} = item
|
|
27
|
+
const isHandle = !id
|
|
28
|
+
const { sortDirection, sortProp } = this.props
|
|
29
|
+
const isSorting = !isHandle && sortProp === id
|
|
30
|
+
const cls = classnames(
|
|
31
|
+
'sftp-header-item',
|
|
32
|
+
isHandle ? `shi-${id}` : `sftp-header-box shi-${id}`,
|
|
33
|
+
{
|
|
34
|
+
'sftp-header-handle': isHandle
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
'sftp-header-name': !isHandle
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
'is-sorting': isSorting
|
|
41
|
+
},
|
|
42
|
+
isSorting ? sortDirection : ''
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
const panelProps = {
|
|
46
|
+
min: min + '%',
|
|
47
|
+
max: max + '%',
|
|
48
|
+
size: size + '%'
|
|
49
|
+
}
|
|
50
|
+
const text = e(id || '')
|
|
51
|
+
const directionIcon = isSorting
|
|
52
|
+
? (sortDirection === 'asc' ? <DownOutlined /> : <UpOutlined />)
|
|
53
|
+
: null
|
|
54
|
+
const itemProps = {
|
|
55
|
+
onClick: this.props.onClickName,
|
|
56
|
+
className: cls,
|
|
57
|
+
'data-id': id,
|
|
58
|
+
title: text
|
|
59
|
+
}
|
|
60
|
+
return (
|
|
61
|
+
<Panel {...panelProps} key={id}>
|
|
62
|
+
<div
|
|
63
|
+
{...itemProps}
|
|
64
|
+
>
|
|
65
|
+
{directionIcon} {text}
|
|
66
|
+
</div>
|
|
67
|
+
</Panel>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
render () {
|
|
72
|
+
const { properties } = this.props
|
|
73
|
+
const dropdownProps = {
|
|
74
|
+
menu: {
|
|
75
|
+
items: this.props.renderContextMenu(),
|
|
76
|
+
onClick: this.props.onContextMenu
|
|
77
|
+
},
|
|
78
|
+
trigger: ['contextMenu']
|
|
79
|
+
}
|
|
80
|
+
const spliterProps = {
|
|
81
|
+
onResizeEnd: this.props.onResize,
|
|
82
|
+
onResize: this.props.onResize
|
|
83
|
+
}
|
|
84
|
+
return (
|
|
85
|
+
<Dropdown {...dropdownProps}>
|
|
86
|
+
<div
|
|
87
|
+
className='sftp-file-table-header relative'
|
|
88
|
+
>
|
|
89
|
+
<Splitter {...spliterProps}>
|
|
90
|
+
{
|
|
91
|
+
properties.map(this.renderHeaderItem)
|
|
92
|
+
}
|
|
93
|
+
</Splitter>
|
|
94
|
+
</div>
|
|
95
|
+
</Dropdown>
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
}
|