@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
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* info content module
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { PureComponent } from 'react'
|
|
6
|
-
import TerminalInfoBase from './base'
|
|
7
|
-
import TerminalInfoUp from './up'
|
|
8
|
-
import TerminalInfoNetwork from './network'
|
|
9
|
-
import TerminalInfoResource from './resource'
|
|
10
|
-
import TerminalInfoActivities from './activity'
|
|
11
|
-
import TerminalInfoDisk from './disk'
|
|
12
|
-
import RunCmd from './run-cmd'
|
|
13
|
-
import {
|
|
14
|
-
termControlHeight
|
|
15
|
-
} from '../../common/constants'
|
|
16
|
-
import { runCmd } from '../terminal/terminal-apis'
|
|
17
|
-
import {
|
|
18
|
-
CloseCircleOutlined,
|
|
19
|
-
PushpinOutlined
|
|
20
|
-
} from '@ant-design/icons'
|
|
21
|
-
import classNames from 'classnames'
|
|
22
|
-
import './terminal-info.styl'
|
|
23
|
-
|
|
24
|
-
export default class TerminalInfoContent extends PureComponent {
|
|
25
|
-
state = {
|
|
26
|
-
uptime: '',
|
|
27
|
-
cpu: '',
|
|
28
|
-
mem: {},
|
|
29
|
-
swap: {},
|
|
30
|
-
activities: [],
|
|
31
|
-
disks: [],
|
|
32
|
-
network: {}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
setStateRef = (...args) => {
|
|
36
|
-
this.setState(...args)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
togglePin = () => {
|
|
40
|
-
this.props.toggleInfoPinned()
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
handleMousedown = (e) => {
|
|
44
|
-
this.dragStart = true
|
|
45
|
-
this.clientX = e.clientX
|
|
46
|
-
document.body.addEventListener('mouseup', this.handleMouseup)
|
|
47
|
-
document.body.addEventListener('mousemove', this.handleMousemove)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
handleMouseup = (e) => {
|
|
51
|
-
this.dragStart = false
|
|
52
|
-
const {
|
|
53
|
-
clientX
|
|
54
|
-
} = e
|
|
55
|
-
let nw = this.clientX - clientX + this.props.rightSidebarWidth
|
|
56
|
-
if (nw < 400) {
|
|
57
|
-
nw = 400
|
|
58
|
-
} else if (nw > 1000) {
|
|
59
|
-
nw = 1000
|
|
60
|
-
}
|
|
61
|
-
window.store.setRightSidePanelWidth(nw)
|
|
62
|
-
document.body.removeEventListener('mouseup', this.handleMouseup)
|
|
63
|
-
document.body.removeEventListener('mousemove', this.handleMousemove)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
handleMousemove = (e) => {
|
|
67
|
-
const {
|
|
68
|
-
clientX
|
|
69
|
-
} = e
|
|
70
|
-
const el = document.getElementById('info-panel-wrap')
|
|
71
|
-
let nw = this.clientX - clientX + this.props.rightSidebarWidth
|
|
72
|
-
if (nw < 400) {
|
|
73
|
-
nw = 400
|
|
74
|
-
} else if (nw > 1000) {
|
|
75
|
-
nw = 1000
|
|
76
|
-
}
|
|
77
|
-
el.style.width = nw + 'px'
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
killProcess = async (id) => {
|
|
81
|
-
const {
|
|
82
|
-
pid,
|
|
83
|
-
sessionId
|
|
84
|
-
} = this.props
|
|
85
|
-
const cmd = `kill ${id}`
|
|
86
|
-
runCmd(pid, sessionId, cmd)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
render () {
|
|
90
|
-
const { props, state } = this
|
|
91
|
-
if (!props.showInfo) {
|
|
92
|
-
return null
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const pops = {
|
|
96
|
-
onClick: props.hideInfoPanel,
|
|
97
|
-
className: 'pointer font20 hide-info-panel-wrap'
|
|
98
|
-
}
|
|
99
|
-
const pops2 = {
|
|
100
|
-
onClick: this.togglePin,
|
|
101
|
-
className: 'pointer font20 toggle-info-panel-wrap mg1l'
|
|
102
|
-
}
|
|
103
|
-
const pops1 = {
|
|
104
|
-
className: classNames(
|
|
105
|
-
'info-panel-wrap',
|
|
106
|
-
{
|
|
107
|
-
'info-panel-wrap-pin': props.infoPanelPinned
|
|
108
|
-
}
|
|
109
|
-
),
|
|
110
|
-
id: 'info-panel-wrap',
|
|
111
|
-
draggable: false,
|
|
112
|
-
style: {
|
|
113
|
-
width: props.rightSidebarWidth,
|
|
114
|
-
top: props.topMenuHeight + props.tabsHeight + termControlHeight
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return (
|
|
118
|
-
<div
|
|
119
|
-
{...pops1}
|
|
120
|
-
>
|
|
121
|
-
<div
|
|
122
|
-
className='drag-handle'
|
|
123
|
-
onMouseDown={this.handleMousedown}
|
|
124
|
-
draggable={false}
|
|
125
|
-
/>
|
|
126
|
-
<div className='pd2t pd2x'>
|
|
127
|
-
<CloseCircleOutlined
|
|
128
|
-
{...pops}
|
|
129
|
-
/>
|
|
130
|
-
<PushpinOutlined
|
|
131
|
-
{...pops2}
|
|
132
|
-
/>
|
|
133
|
-
</div>
|
|
134
|
-
<div className='pd2'>
|
|
135
|
-
<TerminalInfoBase {...props} {...state} />
|
|
136
|
-
<TerminalInfoUp {...props} {...state} />
|
|
137
|
-
<TerminalInfoResource
|
|
138
|
-
{...props} {...state}
|
|
139
|
-
/>
|
|
140
|
-
<TerminalInfoActivities
|
|
141
|
-
{...props}
|
|
142
|
-
{...state}
|
|
143
|
-
killProcess={this.killProcess}
|
|
144
|
-
/>
|
|
145
|
-
<TerminalInfoNetwork {...props} {...state} />
|
|
146
|
-
<TerminalInfoDisk {...props} {...state} />
|
|
147
|
-
<RunCmd {...props} setState={this.setStateRef} />
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
}
|