@electerm/electerm-react 1.80.6 → 1.80.18
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/default-setting.js +1 -1
- package/client/components/file-transfer/conflict-resolve.jsx +11 -1
- package/client/components/main/upgrade.jsx +3 -0
- package/client/components/sftp/file-icon.jsx +1 -1
- package/client/components/sftp/file-item.jsx +2 -2
- package/client/components/sftp/file-table-header.jsx +1 -1
- package/client/components/sidebar/bookmark.jsx +27 -7
- package/client/components/sidebar/info-modal.jsx +1 -1
- package/client/components/sidebar/sidebar.styl +2 -0
- package/client/components/terminal/term-search.jsx +5 -2
- package/client/components/terminal/terminal.jsx +7 -5
- package/client/entry/electerm.jsx +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
scrollback: 3000,
|
|
9
9
|
onStartSessions: [],
|
|
10
10
|
fontSize: 16,
|
|
11
|
-
fontFamily: '
|
|
11
|
+
fontFamily: 'Maple Mono, mono, courier-new, courier, monospace',
|
|
12
12
|
execWindows: 'System32/WindowsPowerShell/v1.0/powershell.exe',
|
|
13
13
|
execMac: 'zsh',
|
|
14
14
|
execLinux: 'bash',
|
|
@@ -153,7 +153,7 @@ export default class ConfirmModalStore extends Component {
|
|
|
153
153
|
<Button
|
|
154
154
|
type='dashed'
|
|
155
155
|
className='mg1l'
|
|
156
|
-
onClick={() => this.act(fileActions.
|
|
156
|
+
onClick={() => this.act(fileActions.skipAll)}
|
|
157
157
|
>
|
|
158
158
|
{e('cancel')}
|
|
159
159
|
</Button>
|
|
@@ -208,6 +208,16 @@ export default class ConfirmModalStore extends Component {
|
|
|
208
208
|
>
|
|
209
209
|
{e('renameAll')}
|
|
210
210
|
</Button>
|
|
211
|
+
<Button
|
|
212
|
+
type='primary'
|
|
213
|
+
className='mg1l'
|
|
214
|
+
title={e('skipAll')}
|
|
215
|
+
onClick={
|
|
216
|
+
() => this.act(fileActions.skipAll)
|
|
217
|
+
}
|
|
218
|
+
>
|
|
219
|
+
{e('skipAll')}
|
|
220
|
+
</Button>
|
|
211
221
|
</div>
|
|
212
222
|
</div>
|
|
213
223
|
)
|
|
@@ -671,7 +671,7 @@ export default class FileSection extends React.Component {
|
|
|
671
671
|
const {
|
|
672
672
|
path, name
|
|
673
673
|
} = this.state.file
|
|
674
|
-
const rp = resolve(path, name)
|
|
674
|
+
const rp = path ? resolve(path, name) : this.props[`${this.props.type}Path`]
|
|
675
675
|
this.props.tab.pane = paneMap.terminal
|
|
676
676
|
refs.get('term-' + this.props.tab.id)?.cd(rp)
|
|
677
677
|
}
|
|
@@ -953,7 +953,7 @@ export default class FileSection extends React.Component {
|
|
|
953
953
|
})
|
|
954
954
|
}
|
|
955
955
|
if (
|
|
956
|
-
isDirectory &&
|
|
956
|
+
isDirectory &&
|
|
957
957
|
(
|
|
958
958
|
(hasHost && enableSsh !== false && isRemote) ||
|
|
959
959
|
(isLocal && !hasHost)
|
|
@@ -49,7 +49,7 @@ export default class FileListTableHeader extends Component {
|
|
|
49
49
|
}
|
|
50
50
|
const text = e(id || '')
|
|
51
51
|
const directionIcon = isSorting
|
|
52
|
-
? (sortDirection === 'asc' ? <
|
|
52
|
+
? (sortDirection === 'asc' ? <UpOutlined /> : <DownOutlined />)
|
|
53
53
|
: null
|
|
54
54
|
const itemProps = {
|
|
55
55
|
onClick: this.props.onClickName,
|
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
|
|
1
|
+
import { refsStatic } from '../common/ref'
|
|
2
|
+
import { useEffect, useRef } from 'react'
|
|
5
3
|
import BookmarkSelect from './bookmark-select'
|
|
4
|
+
import { debounce } from 'lodash-es'
|
|
6
5
|
|
|
7
6
|
export default function BookmarkPanel (props) {
|
|
8
7
|
const { store } = window
|
|
8
|
+
const bookmarksPanelRef = useRef(null)
|
|
9
|
+
const SCROLL_REF_ID = 'bookmarks-scroll-position'
|
|
10
|
+
|
|
11
|
+
// On component mount, restore scroll position
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (store.openedSideBar) {
|
|
14
|
+
const savedPosition = refsStatic.get(SCROLL_REF_ID)
|
|
15
|
+
if (savedPosition) {
|
|
16
|
+
setTimeout(() => {
|
|
17
|
+
bookmarksPanelRef.current.scrollTop = savedPosition
|
|
18
|
+
}, 100)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}, [store.openedSideBar])
|
|
22
|
+
|
|
23
|
+
// Save scroll position when scrolling
|
|
24
|
+
const handleScroll = debounce((e) => {
|
|
25
|
+
const top = e.target.scrollTop
|
|
26
|
+
if (top > 0) {
|
|
27
|
+
refsStatic.add(SCROLL_REF_ID, e.target.scrollTop)
|
|
28
|
+
}
|
|
29
|
+
}, 100)
|
|
30
|
+
|
|
9
31
|
return (
|
|
10
|
-
<div
|
|
11
|
-
className='sidebar-panel-bookmarks'
|
|
12
|
-
>
|
|
32
|
+
<div className='sidebar-panel-bookmarks' ref={bookmarksPanelRef} onScroll={handleScroll}>
|
|
13
33
|
<div className='pd2l sidebar-inner'>
|
|
14
34
|
<BookmarkSelect store={store} from='sidebar' />
|
|
15
35
|
</div>
|
|
@@ -32,7 +32,7 @@ export default auto(function InfoModal (props) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const renderCheckUpdate = () => {
|
|
35
|
-
if (srcsSkipUpgradeCheck.includes(props.installSrc)) {
|
|
35
|
+
if (window.et.isWebApp || srcsSkipUpgradeCheck.includes(props.installSrc)) {
|
|
36
36
|
return null
|
|
37
37
|
}
|
|
38
38
|
const {
|
|
@@ -53,11 +53,14 @@ export default class TermSearch extends PureComponent {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
toggleSearch = () => {
|
|
56
|
-
|
|
56
|
+
const isClosing = this.props.termSearchOpen
|
|
57
|
+
if (isClosing) {
|
|
57
58
|
this.clearSearch()
|
|
58
59
|
}
|
|
59
60
|
window.store.toggleTerminalSearch()
|
|
60
|
-
|
|
61
|
+
if (isClosing) {
|
|
62
|
+
setTimeout(window.store.focus, 200)
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
prev = (v = this.props.termSearch) => {
|
|
@@ -336,6 +336,7 @@ clear\r`
|
|
|
336
336
|
try {
|
|
337
337
|
const fileData = JSON.parse(fromFile)
|
|
338
338
|
const filePath = resolve(fileData.path, fileData.name)
|
|
339
|
+
console.log('filePath', filePath)
|
|
339
340
|
if (this.isUnsafeFilename(filePath)) {
|
|
340
341
|
message.error(notSafeMsg)
|
|
341
342
|
return
|
|
@@ -350,14 +351,15 @@ clear\r`
|
|
|
350
351
|
// Handle regular file drop
|
|
351
352
|
const files = dt.files
|
|
352
353
|
if (files && files.length) {
|
|
353
|
-
const
|
|
354
|
-
|
|
354
|
+
const arr = Array.from(files)
|
|
355
|
+
// Check each file path individually
|
|
356
|
+
const hasUnsafeFilename = arr.some(f => this.isUnsafeFilename(f.path))
|
|
357
|
+
if (hasUnsafeFilename) {
|
|
355
358
|
message.error(notSafeMsg)
|
|
356
359
|
return
|
|
357
360
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
)
|
|
361
|
+
const filesAll = arr.map(f => `"${f.path}"`).join(' ')
|
|
362
|
+
this.attachAddon._sendData(filesAll)
|
|
361
363
|
}
|
|
362
364
|
}
|
|
363
365
|
|
|
@@ -2,7 +2,7 @@ import { createRoot } from 'react-dom/client'
|
|
|
2
2
|
import 'antd/dist/reset.css'
|
|
3
3
|
import '@xterm/xterm/css/xterm.css'
|
|
4
4
|
import '../common/trzsz.js'
|
|
5
|
-
import '
|
|
5
|
+
import '@fontsource/maple-mono/index.css'
|
|
6
6
|
import Main from '../components/main/index.jsx'
|
|
7
7
|
|
|
8
8
|
const rootElement = createRoot(document.getElementById('container'))
|