@electerm/electerm-react 1.37.121 → 1.37.126
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/components/common/input-auto-focus.jsx +2 -1
- package/client/components/common/native-input.jsx +30 -0
- package/client/components/common/native-input.styl +7 -0
- package/client/components/setting-panel/tree-list.jsx +2 -0
- package/client/components/sftp/file-item.jsx +2 -3
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { Input } from 'antd'
|
|
6
|
+
import InputNative from './native-input'
|
|
6
7
|
import React from 'react'
|
|
7
8
|
import { findLastIndex } from 'lodash-es'
|
|
8
9
|
import uid from '../../common/uid'
|
|
@@ -57,7 +58,7 @@ export default class InputAutoFocus extends React.PureComponent {
|
|
|
57
58
|
const { type, ...rest } = this.props
|
|
58
59
|
const Dom = type === 'password'
|
|
59
60
|
? Input.Password
|
|
60
|
-
: Input
|
|
61
|
+
: type === 'native' ? InputNative : Input
|
|
61
62
|
return (
|
|
62
63
|
<Dom
|
|
63
64
|
{...rest}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* input with auto focus
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import React from 'react'
|
|
6
|
+
import './native-input.styl'
|
|
7
|
+
|
|
8
|
+
export default function InputNative (props) {
|
|
9
|
+
const { value, type, onChange, onPressEnter, addonAfter = null, ...rest } = props
|
|
10
|
+
return (
|
|
11
|
+
<span
|
|
12
|
+
className='ant-input-group-wrapper'
|
|
13
|
+
data-id={props['data-id']}
|
|
14
|
+
>
|
|
15
|
+
<span className='ant-input-wrapper ant-input-group'>
|
|
16
|
+
<input
|
|
17
|
+
class='ant-input native-input'
|
|
18
|
+
type='text'
|
|
19
|
+
value={value}
|
|
20
|
+
onChange={onChange}
|
|
21
|
+
onPressEnter={onPressEnter}
|
|
22
|
+
{...rest}
|
|
23
|
+
/>
|
|
24
|
+
</span>
|
|
25
|
+
<span class='ant-input-group-addon'>
|
|
26
|
+
{addonAfter}
|
|
27
|
+
</span>
|
|
28
|
+
</span>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
@@ -590,6 +590,7 @@ export default class ItemListTree extends Component {
|
|
|
590
590
|
onChange={this.handleChangeEdit}
|
|
591
591
|
onPressEnter={this.handleSubmitEdit}
|
|
592
592
|
addonAfter={confirm}
|
|
593
|
+
type='native'
|
|
593
594
|
/>
|
|
594
595
|
)
|
|
595
596
|
}
|
|
@@ -902,6 +903,7 @@ export default class ItemListTree extends Component {
|
|
|
902
903
|
onPressEnter={this.handleSubmitSub}
|
|
903
904
|
onChange={this.handleChangeBookmarkGroupTitleSub}
|
|
904
905
|
addonAfter={confirm}
|
|
906
|
+
type='native'
|
|
905
907
|
/>
|
|
906
908
|
)}
|
|
907
909
|
/>
|
|
@@ -295,7 +295,6 @@ export default class FileSection extends React.Component {
|
|
|
295
295
|
} = toFile
|
|
296
296
|
|
|
297
297
|
let operation = ''
|
|
298
|
-
|
|
299
298
|
// same side and drop to file = drop to folder
|
|
300
299
|
if (!fromFileManager && fromType === toType && !isDirectoryTo) {
|
|
301
300
|
return
|
|
@@ -331,9 +330,9 @@ export default class FileSection extends React.Component {
|
|
|
331
330
|
filterFiles = async (files) => {
|
|
332
331
|
const res = []
|
|
333
332
|
for (const file of files) {
|
|
334
|
-
const {
|
|
333
|
+
const { name, path } = file
|
|
335
334
|
const info = await getLocalFileInfo(
|
|
336
|
-
resolve(path,
|
|
335
|
+
resolve(path, name)
|
|
337
336
|
)
|
|
338
337
|
if (info) {
|
|
339
338
|
res.push(info)
|