@electerm/electerm-react 1.39.88 → 1.39.103
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 +6 -3
- 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 +8 -3
- package/client/components/auth/login.styl +7 -1
- package/client/components/batch-op/batch-op.jsx +18 -36
- package/client/components/bookmark-form/form-ssh-common.jsx +6 -9
- 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 +4 -7
- 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 +3 -5
- package/client/components/bookmark-form/render-auth-ssh.jsx +2 -3
- package/client/components/bookmark-form/render-connection-hopping.jsx +9 -11
- package/client/components/bookmark-form/render-delayed-scripts.jsx +2 -3
- package/client/components/bookmark-form/render-ssh-tunnel.jsx +9 -12
- package/client/components/bookmark-form/serial-form-ui.jsx +5 -9
- 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 +3 -5
- package/client/components/bookmark-form/web-form-ui.jsx +3 -5
- 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 +2 -3
- 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 +6 -7
- 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 +17 -6
- package/client/components/session/session.styl +5 -1
- 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 +71 -48
- 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 +32 -22
- 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 +32 -5
- package/client/store/sync.js +10 -6
- package/client/store/system-menu.js +4 -6
- package/client/store/terminal-theme.js +2 -4
- package/package.json +1 -1
|
@@ -22,12 +22,7 @@ import {
|
|
|
22
22
|
} from '../../common/constants'
|
|
23
23
|
import './info.styl'
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
const e = prefix('control')
|
|
27
|
-
const m = prefix('menu')
|
|
28
|
-
const c = prefix('common')
|
|
29
|
-
const a = prefix('app')
|
|
30
|
-
const s = prefix('setting')
|
|
25
|
+
const e = window.translate
|
|
31
26
|
|
|
32
27
|
export default class InfoModal extends Component {
|
|
33
28
|
handleChangeTab = key => {
|
|
@@ -103,14 +98,14 @@ export default class InfoModal extends Component {
|
|
|
103
98
|
}
|
|
104
99
|
const title = (
|
|
105
100
|
<div className='ant-modal-confirm-title font16'>
|
|
106
|
-
<InfoCircleOutlined className='font20 mg1r' /> {
|
|
101
|
+
<InfoCircleOutlined className='font20 mg1r' /> {e('about')} {name}
|
|
107
102
|
</div>
|
|
108
103
|
)
|
|
109
104
|
const attrs = {
|
|
110
105
|
title,
|
|
111
106
|
width: window.innerWidth - 100,
|
|
112
107
|
maskClosable: true,
|
|
113
|
-
okText:
|
|
108
|
+
okText: e('ok'),
|
|
114
109
|
onCancel: onCloseAbout,
|
|
115
110
|
footer: null,
|
|
116
111
|
open: true,
|
|
@@ -119,11 +114,11 @@ export default class InfoModal extends Component {
|
|
|
119
114
|
const items = [
|
|
120
115
|
{
|
|
121
116
|
key: infoTabs.info,
|
|
122
|
-
label:
|
|
117
|
+
label: e('about'),
|
|
123
118
|
children: (
|
|
124
119
|
<div>
|
|
125
120
|
<LogoElem />
|
|
126
|
-
<p className='mg2b'>{
|
|
121
|
+
<p className='mg2b'>{e('desc')}</p>
|
|
127
122
|
<p className='mg1b'>
|
|
128
123
|
<UserOutlined /> <b className='mg1r'>{e('author')} ➾</b>
|
|
129
124
|
<Link to={authorUrl} className='mg1l'>
|
|
@@ -143,7 +138,7 @@ export default class InfoModal extends Component {
|
|
|
143
138
|
</Link>
|
|
144
139
|
</p>
|
|
145
140
|
<p className='mg1b'>
|
|
146
|
-
<GlobalOutlined /> <b className='mg1r'>{
|
|
141
|
+
<GlobalOutlined /> <b className='mg1r'>{e('language')} repo ➾</b>
|
|
147
142
|
<Link to={langugeRepo} className='mg1l'>
|
|
148
143
|
{langugeRepo}
|
|
149
144
|
</Link>
|
|
@@ -155,25 +150,25 @@ export default class InfoModal extends Component {
|
|
|
155
150
|
</Link>
|
|
156
151
|
</p>
|
|
157
152
|
<p className='mg1b'>
|
|
158
|
-
<HighlightOutlined /> <b className='mg1r'>{
|
|
153
|
+
<HighlightOutlined /> <b className='mg1r'>{e('changeLog')} ➾</b>
|
|
159
154
|
<Link to={releaseLink} className='mg1l'>
|
|
160
155
|
{releaseLink}
|
|
161
156
|
</Link>
|
|
162
157
|
</p>
|
|
163
158
|
<p className='mg1b'>
|
|
164
|
-
<AlignLeftOutlined /> <b className='mg1r'>{
|
|
159
|
+
<AlignLeftOutlined /> <b className='mg1r'>{e('knownIssues')} ➾</b>
|
|
165
160
|
<Link to={knownIssuesLink} className='mg1l'>
|
|
166
161
|
{knownIssuesLink}
|
|
167
162
|
</Link>
|
|
168
163
|
</p>
|
|
169
164
|
<p className='mg1b'>
|
|
170
|
-
<WarningOutlined /> <b className='mg1r'>{
|
|
165
|
+
<WarningOutlined /> <b className='mg1r'>{e('privacyNotice')} ➾</b>
|
|
171
166
|
<Link to={privacyNoticeLink} className='mg1l'>
|
|
172
167
|
{privacyNoticeLink}
|
|
173
168
|
</Link>
|
|
174
169
|
</p>
|
|
175
170
|
<p className='mg1b'>
|
|
176
|
-
<HeartOutlined /> <b className='mg1r'>{
|
|
171
|
+
<HeartOutlined /> <b className='mg1r'>{e('sponsorElecterm')} ➾</b>
|
|
177
172
|
<Link to={sponsorLink} className='mg1l'>
|
|
178
173
|
{sponsorLink}
|
|
179
174
|
</Link>
|
|
@@ -11,10 +11,7 @@ import './transfer-history.styl'
|
|
|
11
11
|
import { get as _get } from 'lodash-es'
|
|
12
12
|
import { filesize } from 'filesize'
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
const e = prefix('transferHistory')
|
|
16
|
-
const f = prefix('sftp')
|
|
17
|
-
const m = prefix('menu')
|
|
14
|
+
const e = window.translate
|
|
18
15
|
const timeRender = t => time(t)
|
|
19
16
|
const sorterFactory = prop => {
|
|
20
17
|
return (a, b) => {
|
|
@@ -59,7 +56,7 @@ export default class TransferHistoryModal extends Component {
|
|
|
59
56
|
)
|
|
60
57
|
}
|
|
61
58
|
}, {
|
|
62
|
-
title:
|
|
59
|
+
title: e('host'),
|
|
63
60
|
dataIndex: 'host',
|
|
64
61
|
key: 'host',
|
|
65
62
|
sorter: sorterFactory('host')
|
|
@@ -80,7 +77,7 @@ export default class TransferHistoryModal extends Component {
|
|
|
80
77
|
},
|
|
81
78
|
sorter: sorterFactory('toPath')
|
|
82
79
|
}, {
|
|
83
|
-
title:
|
|
80
|
+
title: e('size'),
|
|
84
81
|
dataIndex: 'size',
|
|
85
82
|
key: 'size',
|
|
86
83
|
sorter: sorterFactory('size'),
|
|
@@ -5,9 +5,7 @@ import {
|
|
|
5
5
|
import Transports from './transfer-list-control'
|
|
6
6
|
import TransportHistory from './transfer-history-modal'
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
const e = prefix('sftp')
|
|
10
|
-
const t = prefix('transferHistory')
|
|
8
|
+
const e = window.translate
|
|
11
9
|
|
|
12
10
|
export default class TransferModal extends Component {
|
|
13
11
|
renderTransfer = () => {
|
|
@@ -46,7 +44,7 @@ export default class TransferModal extends Component {
|
|
|
46
44
|
}
|
|
47
45
|
if (transferHistory.length) {
|
|
48
46
|
tabs.push({
|
|
49
|
-
title:
|
|
47
|
+
title: e('transferHistory'),
|
|
50
48
|
id: 'history',
|
|
51
49
|
render: this.renderHistory
|
|
52
50
|
})
|
|
@@ -31,16 +31,16 @@ import BookmarksList from '../sidebar/bookmark-select'
|
|
|
31
31
|
import AppDrag from './app-drag'
|
|
32
32
|
import classNames from 'classnames'
|
|
33
33
|
|
|
34
|
-
const
|
|
35
|
-
const e = prefix('tabs')
|
|
36
|
-
const c = prefix('control')
|
|
37
|
-
const t = prefix('tabs')
|
|
34
|
+
const e = window.translate
|
|
38
35
|
const MenuItem = Menu.Item
|
|
39
36
|
|
|
40
37
|
export default class Tabs extends React.Component {
|
|
41
38
|
constructor (props) {
|
|
42
39
|
super(props)
|
|
43
40
|
this.tabsRef = React.createRef()
|
|
41
|
+
this.state = {
|
|
42
|
+
overflow: false
|
|
43
|
+
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
componentDidMount () {
|
|
@@ -53,11 +53,10 @@ export default class Tabs extends React.Component {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
componentDidUpdate (prevProps) {
|
|
56
|
-
prevProps = prevProps || {}
|
|
57
56
|
if (
|
|
58
57
|
prevProps.currentTabId !== this.props.currentTabId ||
|
|
59
58
|
prevProps.width !== this.props.width ||
|
|
60
|
-
prevProps.tabs.
|
|
59
|
+
prevProps.tabs.length !== this.props.tabs.length
|
|
61
60
|
) {
|
|
62
61
|
this.adjustScroll()
|
|
63
62
|
}
|
|
@@ -72,12 +71,17 @@ export default class Tabs extends React.Component {
|
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
isOverflow = () => {
|
|
75
|
-
const { tabs = []
|
|
74
|
+
const { tabs = [] } = this.props
|
|
76
75
|
const len = tabs.length
|
|
77
76
|
const addBtnWidth = 22
|
|
78
|
-
const tabsWidth = this.tabsWidth()
|
|
79
|
-
const
|
|
80
|
-
return
|
|
77
|
+
const tabsWidth = this.tabsWidth() + tabMargin * len + addBtnWidth
|
|
78
|
+
const tabsInnerWidth = this.getInnerWidth()
|
|
79
|
+
return tabsWidth > tabsInnerWidth
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
getInnerWidth = () => {
|
|
83
|
+
const inner = document.querySelector('.tabs-inner')
|
|
84
|
+
return inner ? inner.clientWidth : 0
|
|
81
85
|
}
|
|
82
86
|
|
|
83
87
|
handleClickEvent = (e) => {
|
|
@@ -98,7 +102,7 @@ export default class Tabs extends React.Component {
|
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
adjustScroll = () => {
|
|
101
|
-
const {
|
|
105
|
+
const { tabs, currentTabId } = this.props
|
|
102
106
|
const index = findIndex(tabs, t => t.id === currentTabId)
|
|
103
107
|
const tabsDomWith = Array.from(
|
|
104
108
|
document.querySelectorAll('.tab')
|
|
@@ -106,10 +110,14 @@ export default class Tabs extends React.Component {
|
|
|
106
110
|
return prev + c.clientWidth
|
|
107
111
|
}, 0)
|
|
108
112
|
const w = (index + 1) * tabMargin + 5 + tabsDomWith
|
|
109
|
-
const
|
|
110
|
-
|
|
113
|
+
const tabsInnerWidth = this.getInnerWidth()
|
|
114
|
+
const scrollLeft = w > tabsInnerWidth
|
|
115
|
+
? w - tabsInnerWidth
|
|
111
116
|
: 0
|
|
112
117
|
this.dom.scrollLeft = scrollLeft
|
|
118
|
+
this.setState({
|
|
119
|
+
overflow: this.isOverflow()
|
|
120
|
+
})
|
|
113
121
|
}
|
|
114
122
|
|
|
115
123
|
handleScrollLeft = () => {
|
|
@@ -178,13 +186,13 @@ export default class Tabs extends React.Component {
|
|
|
178
186
|
className={cls}
|
|
179
187
|
onClick={onNewSsh}
|
|
180
188
|
>
|
|
181
|
-
<CodeFilled /> {
|
|
189
|
+
<CodeFilled /> {e('newBookmark')}
|
|
182
190
|
</div>
|
|
183
191
|
<div
|
|
184
192
|
className={cls}
|
|
185
193
|
onClick={() => addTab()}
|
|
186
194
|
>
|
|
187
|
-
<RightSquareFilled /> {
|
|
195
|
+
<RightSquareFilled /> {e('newTab')}
|
|
188
196
|
</div>
|
|
189
197
|
<BookmarksList
|
|
190
198
|
store={window.store}
|
|
@@ -249,14 +257,16 @@ export default class Tabs extends React.Component {
|
|
|
249
257
|
}
|
|
250
258
|
|
|
251
259
|
renderContentInner () {
|
|
252
|
-
const { tabs = [], width } = this.props
|
|
260
|
+
const { tabs = [], width, config } = this.props
|
|
253
261
|
const len = tabs.length
|
|
254
262
|
const tabsWidthAll = tabMargin * len + 10 + this.tabsWidth()
|
|
255
|
-
const overflow = this.
|
|
263
|
+
const { overflow } = this.state
|
|
256
264
|
const left = overflow
|
|
257
265
|
? '100%'
|
|
258
266
|
: tabsWidthAll
|
|
259
|
-
const w1 = isMacJs && window.et.isWebApp
|
|
267
|
+
const w1 = isMacJs && (config.useSystemTitleBar || window.et.isWebApp)
|
|
268
|
+
? 30
|
|
269
|
+
: windowControlWidth
|
|
260
270
|
const style = {
|
|
261
271
|
width: width - w1 - 166
|
|
262
272
|
}
|
|
@@ -291,9 +301,9 @@ export default class Tabs extends React.Component {
|
|
|
291
301
|
})
|
|
292
302
|
}
|
|
293
303
|
{
|
|
294
|
-
|
|
295
|
-
?
|
|
296
|
-
:
|
|
304
|
+
overflow
|
|
305
|
+
? null
|
|
306
|
+
: this.renderAddBtn()
|
|
297
307
|
}
|
|
298
308
|
</div>
|
|
299
309
|
</div>
|
|
@@ -301,7 +311,7 @@ export default class Tabs extends React.Component {
|
|
|
301
311
|
}
|
|
302
312
|
|
|
303
313
|
render () {
|
|
304
|
-
const overflow = this.
|
|
314
|
+
const { overflow } = this.state
|
|
305
315
|
return (
|
|
306
316
|
<div className='tabs' ref={this.tabsRef}>
|
|
307
317
|
{this.renderContent()}
|
|
@@ -23,10 +23,7 @@ import {
|
|
|
23
23
|
} from '../../common/constants'
|
|
24
24
|
import { shortcutDescExtend } from '../shortcuts/shortcut-handler.js'
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
const e = prefix('tabs')
|
|
28
|
-
const m = prefix('menu')
|
|
29
|
-
const s = prefix('sftp')
|
|
26
|
+
const e = window.translate
|
|
30
27
|
const onDragCls = 'ondrag-tab'
|
|
31
28
|
const onDragOverCls = 'dragover-tab'
|
|
32
29
|
|
|
@@ -40,7 +37,6 @@ class Tab extends Component {
|
|
|
40
37
|
}
|
|
41
38
|
|
|
42
39
|
componentDidMount () {
|
|
43
|
-
console.log(this.props)
|
|
44
40
|
this.dom = document.getElementById('id' + this.state.tab.id)
|
|
45
41
|
window.addEventListener('message', this.onEvent)
|
|
46
42
|
}
|
|
@@ -316,7 +312,7 @@ class Tab extends Component {
|
|
|
316
312
|
res.push({
|
|
317
313
|
func: 'handleReloadTab',
|
|
318
314
|
icon: 'Loading3QuartersOutlined',
|
|
319
|
-
text:
|
|
315
|
+
text: e('reload'),
|
|
320
316
|
subText: reloadShortcut
|
|
321
317
|
})
|
|
322
318
|
return res
|
|
@@ -389,8 +385,8 @@ class Tab extends Component {
|
|
|
389
385
|
tunnel = `sock5://${sshTunnelLocalHost}:${sshTunnelLocalPort}`
|
|
390
386
|
} else {
|
|
391
387
|
tunnel = sshTunnel === 'forwardRemoteToLocal'
|
|
392
|
-
? `-> ${
|
|
393
|
-
: `-> ${
|
|
388
|
+
? `-> ${e('remote')}:${sshTunnelRemoteHost}:${sshTunnelRemotePort} -> ${sshTunnelLocalHost}:${sshTunnelLocalPort}`
|
|
389
|
+
: `-> ${e('local')}:${sshTunnelLocalHost}:${sshTunnelLocalPort} -> ${sshTunnelRemoteHost}:${sshTunnelRemotePort}`
|
|
394
390
|
}
|
|
395
391
|
if (error) {
|
|
396
392
|
tunnel = `error: ${tunnel}`
|
|
@@ -488,7 +484,7 @@ class Tab extends Component {
|
|
|
488
484
|
<Loading3QuartersOutlined
|
|
489
485
|
className='pointer tab-reload mg1r'
|
|
490
486
|
onClick={this.handleReloadTab}
|
|
491
|
-
title={
|
|
487
|
+
title={e('reload')}
|
|
492
488
|
/>
|
|
493
489
|
<span className='tab-title'>
|
|
494
490
|
{tabCount}. {title}
|
|
@@ -8,8 +8,7 @@ import {
|
|
|
8
8
|
isMacJs
|
|
9
9
|
} from '../../common/constants'
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
const m = prefix('menu')
|
|
11
|
+
const e = window.translate
|
|
13
12
|
|
|
14
13
|
export default class WindowControl extends Component {
|
|
15
14
|
render () {
|
|
@@ -35,7 +34,7 @@ export default class WindowControl extends Component {
|
|
|
35
34
|
return (
|
|
36
35
|
<div className='window-controls'>
|
|
37
36
|
<div className='window-control-box window-control-minimize' onClick={minimize}>
|
|
38
|
-
<MinusOutlined title={
|
|
37
|
+
<MinusOutlined title={e('minimize')} className='iblock font12 widnow-control-icon' />
|
|
39
38
|
</div>
|
|
40
39
|
<div
|
|
41
40
|
className='window-control-box window-control-maximize'
|
|
@@ -45,7 +44,7 @@ export default class WindowControl extends Component {
|
|
|
45
44
|
>
|
|
46
45
|
<span
|
|
47
46
|
title={
|
|
48
|
-
isMaximized ?
|
|
47
|
+
isMaximized ? e('unmaximize') : e('maximize')
|
|
49
48
|
}
|
|
50
49
|
className={
|
|
51
50
|
'iblock font12 icon-maximize widnow-control-icon ' +
|
|
@@ -54,7 +53,7 @@ export default class WindowControl extends Component {
|
|
|
54
53
|
/>
|
|
55
54
|
</div>
|
|
56
55
|
<div className='window-control-box window-control-close' onClick={closeApp}>
|
|
57
|
-
<CloseOutlined title={
|
|
56
|
+
<CloseOutlined title={e('close')} className='iblock font12 widnow-control-icon' />
|
|
58
57
|
</div>
|
|
59
58
|
</div>
|
|
60
59
|
)
|
|
@@ -53,9 +53,7 @@ import strip from '@electerm/strip-ansi'
|
|
|
53
53
|
import { formatBytes } from '../../common/byte-format.js'
|
|
54
54
|
import * as fs from './fs.js'
|
|
55
55
|
|
|
56
|
-
const
|
|
57
|
-
const e = prefix('ssh')
|
|
58
|
-
const m = prefix('menu')
|
|
56
|
+
const e = window.translate
|
|
59
57
|
|
|
60
58
|
const computePos = (e) => {
|
|
61
59
|
return {
|
|
@@ -837,14 +835,14 @@ class Term extends Component {
|
|
|
837
835
|
{
|
|
838
836
|
func: 'onCopy',
|
|
839
837
|
icon: 'CopyOutlined',
|
|
840
|
-
text:
|
|
838
|
+
text: e('copy'),
|
|
841
839
|
disabled: !hasSlected,
|
|
842
840
|
subText: copyShortcut
|
|
843
841
|
},
|
|
844
842
|
{
|
|
845
843
|
func: 'onPaste',
|
|
846
844
|
icon: 'SwitcherOutlined',
|
|
847
|
-
text:
|
|
845
|
+
text: e('paste'),
|
|
848
846
|
disabled: !copyed,
|
|
849
847
|
subText: pasteShortcut
|
|
850
848
|
},
|
|
@@ -1256,7 +1254,7 @@ class Term extends Component {
|
|
|
1256
1254
|
this.props.delSplit(this.state.id)
|
|
1257
1255
|
}}
|
|
1258
1256
|
>
|
|
1259
|
-
{
|
|
1257
|
+
{e('close')}
|
|
1260
1258
|
</Button>
|
|
1261
1259
|
<Button
|
|
1262
1260
|
icon={<ReloadOutlined />}
|
|
@@ -1267,7 +1265,7 @@ class Term extends Component {
|
|
|
1267
1265
|
)
|
|
1268
1266
|
}}
|
|
1269
1267
|
>
|
|
1270
|
-
{
|
|
1268
|
+
{e('reload')}
|
|
1271
1269
|
</Button>
|
|
1272
1270
|
</div>
|
|
1273
1271
|
)
|
|
@@ -18,8 +18,7 @@ import copy from 'json-deep-copy'
|
|
|
18
18
|
import { shortcutExtend } from '../shortcuts/shortcut-handler.js'
|
|
19
19
|
import './term-search.styl'
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
const s = prefix('ssh')
|
|
21
|
+
const e = window.translate
|
|
23
22
|
|
|
24
23
|
class TermSearch extends Component {
|
|
25
24
|
searchControls = [{
|
|
@@ -171,7 +170,7 @@ class TermSearch extends Component {
|
|
|
171
170
|
return (
|
|
172
171
|
<Tooltip
|
|
173
172
|
key={id}
|
|
174
|
-
title={
|
|
173
|
+
title={e(id)}
|
|
175
174
|
>
|
|
176
175
|
<Icon
|
|
177
176
|
className={cls}
|
|
@@ -9,9 +9,7 @@ import { tabActions } from '../../common/constants'
|
|
|
9
9
|
import wait from '../../common/wait'
|
|
10
10
|
import postMsg from '../../common/post-msg'
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
const e = prefix('sftp')
|
|
14
|
-
const c = prefix('common')
|
|
12
|
+
const e = window.translate
|
|
15
13
|
const FormItem = Form.Item
|
|
16
14
|
|
|
17
15
|
export default function TermInteractive () {
|
|
@@ -153,7 +151,7 @@ export default function TermInteractive () {
|
|
|
153
151
|
className='mg1l'
|
|
154
152
|
onClick={onIgnore}
|
|
155
153
|
>
|
|
156
|
-
{
|
|
154
|
+
{e('ignore')}
|
|
157
155
|
</Button>
|
|
158
156
|
<Button
|
|
159
157
|
className='mg1l'
|
|
@@ -7,8 +7,7 @@ import { isEmpty } from 'lodash-es'
|
|
|
7
7
|
import { CloseCircleOutlined, BarsOutlined } from '@ant-design/icons'
|
|
8
8
|
import colsParser from './data-cols-parser'
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
const m = prefix('menu')
|
|
10
|
+
const e = window.translate
|
|
12
11
|
|
|
13
12
|
export default function TerminalInfoActivities (props) {
|
|
14
13
|
const { activities, isRemote, terminalInfos } = props
|
|
@@ -19,14 +18,14 @@ export default function TerminalInfoActivities (props) {
|
|
|
19
18
|
col.unshift({
|
|
20
19
|
dataIndex: 'kill',
|
|
21
20
|
key: 'kill',
|
|
22
|
-
title:
|
|
21
|
+
title: e('close'),
|
|
23
22
|
render: (txt, inst) => {
|
|
24
23
|
return (
|
|
25
24
|
<Tooltip
|
|
26
|
-
title={
|
|
25
|
+
title={e('close')}
|
|
27
26
|
>
|
|
28
27
|
<Popconfirm
|
|
29
|
-
title={
|
|
28
|
+
title={e('close') + ' pid:' + inst.pid + ' ?'}
|
|
30
29
|
onConfirm={() => props.killProcess(inst.pid)}
|
|
31
30
|
>
|
|
32
31
|
<CloseCircleOutlined
|
|
@@ -17,8 +17,7 @@ import postMsg from '../../common/post-msg'
|
|
|
17
17
|
import { toggleTerminalLog, toggleTerminalLogTimestamp } from '../terminal/terminal-apis'
|
|
18
18
|
import { ClockCircleOutlined, BorderlessTableOutlined, DatabaseOutlined, BarsOutlined, ApiOutlined, PartitionOutlined } from '@ant-design/icons'
|
|
19
19
|
|
|
20
|
-
const
|
|
21
|
-
const st = prefix('setting')
|
|
20
|
+
const e = window.translate
|
|
22
21
|
|
|
23
22
|
const mapper = {
|
|
24
23
|
uptime: <ClockCircleOutlined />,
|
|
@@ -136,7 +135,7 @@ export default class TerminalInfoBase extends Component {
|
|
|
136
135
|
if (!saveTerminalLogToFile) {
|
|
137
136
|
return null
|
|
138
137
|
}
|
|
139
|
-
const name =
|
|
138
|
+
const name = e('addTimeStampToTermLog')
|
|
140
139
|
return (
|
|
141
140
|
<Switch
|
|
142
141
|
checkedChildren={name}
|
|
@@ -186,7 +185,7 @@ export default class TerminalInfoBase extends Component {
|
|
|
186
185
|
? osResolve(appPath, 'electerm', 'session_logs')
|
|
187
186
|
: window.et.sessionLogPath
|
|
188
187
|
const path = osResolve(base, logName + '.log')
|
|
189
|
-
const name =
|
|
188
|
+
const name = e('saveTerminalLogToFile')
|
|
190
189
|
const to = saveTerminalLogToFile
|
|
191
190
|
? <ShowItem disabled={!saveTerminalLogToFile} to={path}>{path}</ShowItem>
|
|
192
191
|
: path
|
|
@@ -8,10 +8,7 @@ import InputAutoFocus from '../common/input-auto-focus'
|
|
|
8
8
|
|
|
9
9
|
const { TextArea } = Input
|
|
10
10
|
const FormItem = Form.Item
|
|
11
|
-
const
|
|
12
|
-
const e = prefix('form')
|
|
13
|
-
const s = prefix('setting')
|
|
14
|
-
const t = prefix('terminalThemes')
|
|
11
|
+
const e = window.translate
|
|
15
12
|
|
|
16
13
|
export default function ThemeForm (props) {
|
|
17
14
|
const [form] = Form.useForm()
|
|
@@ -115,7 +112,7 @@ export default function ThemeForm (props) {
|
|
|
115
112
|
formData.id || update1.id
|
|
116
113
|
)
|
|
117
114
|
}
|
|
118
|
-
message.success(
|
|
115
|
+
message.success(e('saved'))
|
|
119
116
|
action.current = 'submit'
|
|
120
117
|
}
|
|
121
118
|
|
|
@@ -157,7 +154,7 @@ export default function ThemeForm (props) {
|
|
|
157
154
|
type='dashed'
|
|
158
155
|
onClick={exporter}
|
|
159
156
|
>
|
|
160
|
-
{
|
|
157
|
+
{e('export')}
|
|
161
158
|
</Button>
|
|
162
159
|
</FormItem>
|
|
163
160
|
)
|
|
@@ -187,7 +184,7 @@ export default function ThemeForm (props) {
|
|
|
187
184
|
>
|
|
188
185
|
{renderFuncs(id)}
|
|
189
186
|
<FormItem
|
|
190
|
-
label={
|
|
187
|
+
label={e('themeName')}
|
|
191
188
|
hasFeedback
|
|
192
189
|
name='themeName'
|
|
193
190
|
rules={[{
|
|
@@ -203,7 +200,7 @@ export default function ThemeForm (props) {
|
|
|
203
200
|
/>
|
|
204
201
|
</FormItem>
|
|
205
202
|
<FormItem
|
|
206
|
-
label={
|
|
203
|
+
label={e('themeConfig')}
|
|
207
204
|
>
|
|
208
205
|
<div className='pd1b'>
|
|
209
206
|
<Upload
|
|
@@ -245,7 +242,7 @@ export default function ThemeForm (props) {
|
|
|
245
242
|
type='primary'
|
|
246
243
|
htmlType='submit'
|
|
247
244
|
className='mg1r mg1b'
|
|
248
|
-
>{
|
|
245
|
+
>{e('saveAndApply')}
|
|
249
246
|
</Button>
|
|
250
247
|
<Button
|
|
251
248
|
type='dashed'
|
|
@@ -10,8 +10,7 @@ import { defaultTheme } from '../../common/constants'
|
|
|
10
10
|
import highlight from '../common/highlight'
|
|
11
11
|
import './terminal-theme-list.styl'
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
const e = prefix('terminalThemes')
|
|
13
|
+
const e = window.translate
|
|
15
14
|
|
|
16
15
|
export default class ThemeList extends List {
|
|
17
16
|
del = (item, e) => {
|
|
@@ -6,11 +6,7 @@ import { useEffect } from 'react'
|
|
|
6
6
|
import { Input, Form, Button } from 'antd'
|
|
7
7
|
|
|
8
8
|
const FormItem = Form.Item
|
|
9
|
-
|
|
10
|
-
const { prefix } = window
|
|
11
|
-
const e = prefix('form')
|
|
12
|
-
const c = prefix('common')
|
|
13
|
-
const s = prefix('sftp')
|
|
9
|
+
const e = window.translate
|
|
14
10
|
|
|
15
11
|
export default function TextEditorForm (props) {
|
|
16
12
|
const [form] = Form.useForm()
|
|
@@ -71,7 +67,7 @@ export default function TextEditorForm (props) {
|
|
|
71
67
|
<div className='pd1t pd2b'>
|
|
72
68
|
<Button
|
|
73
69
|
{...popsEdit}
|
|
74
|
-
>{
|
|
70
|
+
>{e('editWithSystemEditor')}
|
|
75
71
|
</Button>
|
|
76
72
|
<Button
|
|
77
73
|
type='primary'
|
|
@@ -85,11 +81,11 @@ export default function TextEditorForm (props) {
|
|
|
85
81
|
className='mg1r mg1b'
|
|
86
82
|
disabled={loading}
|
|
87
83
|
onClick={reset}
|
|
88
|
-
>{
|
|
84
|
+
>{e('reset')}
|
|
89
85
|
</Button>
|
|
90
86
|
<Button
|
|
91
87
|
{...popsCancel}
|
|
92
|
-
>{
|
|
88
|
+
>{e('cancel')}
|
|
93
89
|
</Button>
|
|
94
90
|
</div>
|
|
95
91
|
</Form>
|
|
@@ -9,8 +9,7 @@ import resolve from '../../common/resolve'
|
|
|
9
9
|
import { commonActions } from '../../common/constants'
|
|
10
10
|
import postMsg from '../../common/post-msg'
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
const s = prefix('sftp')
|
|
12
|
+
const e = window.translate
|
|
14
13
|
|
|
15
14
|
export default class TextEditor extends PureComponent {
|
|
16
15
|
state = {
|
|
@@ -152,7 +151,7 @@ export default class TextEditor extends PureComponent {
|
|
|
152
151
|
if (!file) {
|
|
153
152
|
return null
|
|
154
153
|
}
|
|
155
|
-
const title = `${
|
|
154
|
+
const title = `${e('edit')} ${e('remote')} ${e('file')}: ${path}`
|
|
156
155
|
const propsAll = {
|
|
157
156
|
footer: null,
|
|
158
157
|
title,
|