@electerm/electerm-react 2.5.6 → 2.5.9
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/auth/login.jsx +1 -1
- package/client/components/bookmark-form/common/fields.jsx +1 -1
- package/client/components/bookmark-form/common/hex-input.jsx +6 -1
- package/client/components/bookmark-form/common/run-scripts.jsx +10 -8
- package/client/components/bookmark-form/common/ssh-host-selector.jsx +1 -1
- package/client/components/bookmark-form/common/ssh-tunnels.jsx +0 -1
- package/client/components/common/input-confirm-common.jsx +7 -5
- package/client/components/common/input-confirm.jsx +1 -3
- package/client/components/common/input-number-confirm.jsx +1 -3
- package/client/components/common/password.jsx +0 -4
- package/client/components/quick-commands/quick-commands-list-form.jsx +24 -21
- package/client/components/setting-panel/keywords-form.jsx +9 -8
- package/client/components/setting-panel/setting-common.jsx +1 -1
- package/client/components/setting-panel/setting-terminal.jsx +8 -5
- package/client/components/setting-panel/terminal-bg-config.jsx +1 -1
- package/client/components/sftp/address-bar.jsx +3 -2
- package/client/components/sftp/address-bookmark.jsx +1 -1
- package/client/components/sftp/file-item.jsx +2 -2
- package/client/components/sftp/keyword-filter.jsx +2 -2
- package/client/components/shortcuts/shortcut-editor.jsx +1 -1
- package/client/components/sys-menu/zoom.jsx +6 -4
- package/client/components/terminal/term-search.jsx +1 -2
- package/client/components/terminal/terminal.jsx +10 -1
- package/client/components/text-editor/simple-editor.jsx +1 -1
- package/client/components/tree-list/tree-list.jsx +4 -4
- package/client/components/tree-list/tree-list.styl +1 -0
- package/client/components/web/address-bar.jsx +2 -2
- package/package.json +1 -1
|
@@ -90,7 +90,7 @@ export function renderFormItem (item, formItemLayout, form, ctxProps, index) {
|
|
|
90
90
|
)
|
|
91
91
|
break
|
|
92
92
|
case 'colorTitle':
|
|
93
|
-
control = <InputAutoFocus
|
|
93
|
+
control = <InputAutoFocus prefix={<ColorPickerItem />} {...item.props} />
|
|
94
94
|
break
|
|
95
95
|
case 'password':
|
|
96
96
|
control = <Password {...item.props} />
|
|
@@ -17,6 +17,11 @@ export const HexInput = (props) => {
|
|
|
17
17
|
return <CheckOutlined className='pointer' onClick={submit} />
|
|
18
18
|
}
|
|
19
19
|
return (
|
|
20
|
-
<Input
|
|
20
|
+
<Input
|
|
21
|
+
prefix='#' {...props}
|
|
22
|
+
value={v}
|
|
23
|
+
onChange={handleChange}
|
|
24
|
+
suffix={renderAfter()}
|
|
25
|
+
/>
|
|
21
26
|
)
|
|
22
27
|
}
|
|
@@ -25,14 +25,16 @@ export default function renderRunScripts () {
|
|
|
25
25
|
name={[field.name, 'delay']}
|
|
26
26
|
required
|
|
27
27
|
>
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
<Space.Compact>
|
|
29
|
+
<Space.Addon>{e('loginScriptDelay')}</Space.Addon>
|
|
30
|
+
<InputNumber
|
|
31
|
+
min={1}
|
|
32
|
+
step={1}
|
|
33
|
+
max={65535}
|
|
34
|
+
rules={[{ required: true, message: e('loginScriptDelay') + ' required' }]}
|
|
35
|
+
className='compact-input'
|
|
36
|
+
/>
|
|
37
|
+
</Space.Compact>
|
|
36
38
|
</FormItem>
|
|
37
39
|
<FormItem
|
|
38
40
|
label=''
|
|
@@ -53,7 +53,7 @@ export default function SshHostSelector ({ ips = [], useIp, form, onBlur, onPast
|
|
|
53
53
|
name='host'
|
|
54
54
|
onBlur={props.onBlur}
|
|
55
55
|
onPaste={e => onPaste(e, form)}
|
|
56
|
-
|
|
56
|
+
prefix={<ColorPickerItem />}
|
|
57
57
|
/>
|
|
58
58
|
</FormItem>
|
|
59
59
|
</FormItem>
|
|
@@ -7,8 +7,8 @@ export default function InputConfirmCommon ({
|
|
|
7
7
|
value,
|
|
8
8
|
onChange,
|
|
9
9
|
inputComponent: InputComponent,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
addonBefore,
|
|
11
|
+
addonAfter,
|
|
12
12
|
...rest
|
|
13
13
|
}) {
|
|
14
14
|
const [localValue, setLocalValue] = useState(value)
|
|
@@ -50,10 +50,11 @@ export default function InputConfirmCommon ({
|
|
|
50
50
|
: null
|
|
51
51
|
const { className, ...restProps } = rest
|
|
52
52
|
const cls = className ? `${className} input-confirm` : 'input-confirm'
|
|
53
|
-
const
|
|
53
|
+
const beforeAddon = addonBefore || null
|
|
54
|
+
const afterAddon = addonAfter || icons
|
|
54
55
|
? (
|
|
55
56
|
<Space.Addon>
|
|
56
|
-
{
|
|
57
|
+
{addonAfter}
|
|
57
58
|
{icons}
|
|
58
59
|
</Space.Addon>
|
|
59
60
|
)
|
|
@@ -70,8 +71,9 @@ export default function InputConfirmCommon ({
|
|
|
70
71
|
return (
|
|
71
72
|
<div>
|
|
72
73
|
<Space.Compact className={cls}>
|
|
74
|
+
{beforeAddon}
|
|
73
75
|
{inputElement}
|
|
74
|
-
{
|
|
76
|
+
{afterAddon}
|
|
75
77
|
</Space.Compact>
|
|
76
78
|
</div>
|
|
77
79
|
)
|
|
@@ -2,12 +2,10 @@ import { Input } from 'antd'
|
|
|
2
2
|
import InputConfirmCommon from './input-confirm-common'
|
|
3
3
|
|
|
4
4
|
export default function InputConfirm (props) {
|
|
5
|
-
const { extraAddonAfter, ...rest } = props
|
|
6
5
|
return (
|
|
7
6
|
<InputConfirmCommon
|
|
8
|
-
{...
|
|
7
|
+
{...props}
|
|
9
8
|
inputComponent={Input}
|
|
10
|
-
extraAddonAfter={extraAddonAfter}
|
|
11
9
|
/>
|
|
12
10
|
)
|
|
13
11
|
}
|
|
@@ -2,12 +2,10 @@ import { InputNumber } from 'antd'
|
|
|
2
2
|
import InputConfirmCommon from './input-confirm-common'
|
|
3
3
|
|
|
4
4
|
export default function InputNumberConfirm (props) {
|
|
5
|
-
const { addonAfter, ...rest } = props
|
|
6
5
|
return (
|
|
7
6
|
<InputConfirmCommon
|
|
8
|
-
{...
|
|
7
|
+
{...props}
|
|
9
8
|
inputComponent={InputNumber}
|
|
10
|
-
extraAddonAfter={addonAfter}
|
|
11
9
|
/>
|
|
12
10
|
)
|
|
13
11
|
}
|
|
@@ -49,9 +49,6 @@ export default forwardRef(function Password (props, ref) {
|
|
|
49
49
|
}
|
|
50
50
|
}, [props.onBlur])
|
|
51
51
|
|
|
52
|
-
// Keep addonBefore as-is from props; must be null when caps lock is off
|
|
53
|
-
const addonBefore = props.addonBefore ?? null
|
|
54
|
-
|
|
55
52
|
// Show caps lock indicator inside prefix to avoid remounting the input wrapper
|
|
56
53
|
let capsPrefix = null
|
|
57
54
|
if (isCapsLockOn) {
|
|
@@ -75,7 +72,6 @@ export default forwardRef(function Password (props, ref) {
|
|
|
75
72
|
<Input.Password
|
|
76
73
|
{...props}
|
|
77
74
|
ref={ref}
|
|
78
|
-
addonBefore={addonBefore}
|
|
79
75
|
prefix={prefix}
|
|
80
76
|
onKeyDown={handleKeyEvent}
|
|
81
77
|
onKeyUp={handleKeyEvent}
|
|
@@ -29,14 +29,16 @@ export default function renderQm () {
|
|
|
29
29
|
name={[field.name, 'delay']}
|
|
30
30
|
required
|
|
31
31
|
>
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
<Space.Compact>
|
|
33
|
+
<Space.Addon>{e('delay')}</Space.Addon>
|
|
34
|
+
<InputNumber
|
|
35
|
+
min={1}
|
|
36
|
+
step={1}
|
|
37
|
+
max={65535}
|
|
38
|
+
placeholder={100}
|
|
39
|
+
className='compact-input'
|
|
40
|
+
/>
|
|
41
|
+
</Space.Compact>
|
|
40
42
|
</FormItem>
|
|
41
43
|
<FormItem
|
|
42
44
|
label=''
|
|
@@ -44,20 +46,21 @@ export default function renderQm () {
|
|
|
44
46
|
required
|
|
45
47
|
className='mg2x'
|
|
46
48
|
>
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
<Space.Compact>
|
|
50
|
+
<Input.TextArea
|
|
51
|
+
autoSize={{ minRows: 1 }}
|
|
52
|
+
placeholder={e('quickCommand')}
|
|
53
|
+
className='compact-input qm-input'
|
|
54
|
+
onFocus={() => {
|
|
55
|
+
focused.current = i
|
|
56
|
+
}}
|
|
57
|
+
/>
|
|
58
|
+
<Button
|
|
59
|
+
icon={<MinusCircleOutlined />}
|
|
60
|
+
onClick={() => remove(field.name)}
|
|
61
|
+
/>
|
|
62
|
+
</Space.Compact>
|
|
55
63
|
</FormItem>
|
|
56
|
-
<Button
|
|
57
|
-
icon={<MinusCircleOutlined />}
|
|
58
|
-
onClick={() => remove(field.name)}
|
|
59
|
-
className='mg24b'
|
|
60
|
-
/>
|
|
61
64
|
</Space>
|
|
62
65
|
)
|
|
63
66
|
}
|
|
@@ -55,16 +55,17 @@ export default function KeywordForm (props) {
|
|
|
55
55
|
name={[field.name, 'keyword']}
|
|
56
56
|
rules={[{ validator: checker }]}
|
|
57
57
|
>
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
<Space.Compact>
|
|
59
|
+
<InputConfirm
|
|
60
|
+
addonBefore={renderBefore(field.name)}
|
|
61
|
+
/>
|
|
62
|
+
<Button
|
|
63
|
+
icon={<MinusCircleOutlined />}
|
|
64
|
+
onClick={() => remove(field.name)}
|
|
65
|
+
/>
|
|
66
|
+
</Space.Compact>
|
|
61
67
|
</FormItem>
|
|
62
68
|
</FormItem>
|
|
63
|
-
<Button
|
|
64
|
-
icon={<MinusCircleOutlined />}
|
|
65
|
-
onClick={() => remove(field.name)}
|
|
66
|
-
className='mg24b'
|
|
67
|
-
/>
|
|
68
69
|
</Space>
|
|
69
70
|
)
|
|
70
71
|
}
|
|
@@ -442,7 +442,7 @@ export default class SettingCommon extends Component {
|
|
|
442
442
|
onFocus: this.handleLoginPassFocus,
|
|
443
443
|
onBlur: this.handleLoginPassBlur,
|
|
444
444
|
onChange: this.handleChangeLoginPass,
|
|
445
|
-
|
|
445
|
+
suffix: this.renderLoginPassAfter(),
|
|
446
446
|
placeholder: placeholderLogin
|
|
447
447
|
}
|
|
448
448
|
return (
|
|
@@ -11,7 +11,8 @@ import {
|
|
|
11
11
|
Button,
|
|
12
12
|
AutoComplete,
|
|
13
13
|
Tooltip,
|
|
14
|
-
Flex
|
|
14
|
+
Flex,
|
|
15
|
+
Space
|
|
15
16
|
} from 'antd'
|
|
16
17
|
import deepCopy from 'json-deep-copy'
|
|
17
18
|
import {
|
|
@@ -176,23 +177,25 @@ export default class SettingTerminal extends Component {
|
|
|
176
177
|
<Button
|
|
177
178
|
onClick={this.handleChooseFolder}
|
|
178
179
|
className='mg1r'
|
|
180
|
+
type='text'
|
|
179
181
|
size='small'
|
|
180
182
|
>
|
|
181
183
|
{e('chooseFolder')}
|
|
182
184
|
</Button>
|
|
183
185
|
<Button
|
|
184
186
|
size='small'
|
|
187
|
+
type='text'
|
|
185
188
|
onClick={() => this.handleLogChange('')}
|
|
186
189
|
>
|
|
187
190
|
{e('reset')}
|
|
188
191
|
</Button>
|
|
189
192
|
</>
|
|
190
193
|
),
|
|
194
|
+
prefix: e('terminalLogPath'),
|
|
191
195
|
addonBefore: (
|
|
192
|
-
|
|
193
|
-
<span className='mg1r'>{e('terminalLogPath')}</span>
|
|
196
|
+
<Space.Addon>
|
|
194
197
|
<ShowItem to={path} />
|
|
195
|
-
|
|
198
|
+
</Space.Addon>
|
|
196
199
|
)
|
|
197
200
|
}
|
|
198
201
|
return (
|
|
@@ -340,7 +343,7 @@ export default class SettingTerminal extends Component {
|
|
|
340
343
|
options={dataSource.map(this.renderBgOption)}
|
|
341
344
|
>
|
|
342
345
|
<InputConfirm
|
|
343
|
-
|
|
346
|
+
addonAfter={after}
|
|
344
347
|
/>
|
|
345
348
|
</AutoComplete>
|
|
346
349
|
</Tooltip>
|
|
@@ -66,6 +66,7 @@ function renderAddonBefore (props, realPath) {
|
|
|
66
66
|
realPath={realPath}
|
|
67
67
|
host={host}
|
|
68
68
|
type={type}
|
|
69
|
+
className='mg1r'
|
|
69
70
|
onClickHistory={props.onClickHistory}
|
|
70
71
|
/>
|
|
71
72
|
</>
|
|
@@ -134,11 +135,11 @@ export default function AddressBar (props) {
|
|
|
134
135
|
value={path}
|
|
135
136
|
onChange={e => props.onChange(e, n)}
|
|
136
137
|
onPressEnter={e => props.onGoto(type, e)}
|
|
137
|
-
|
|
138
|
+
prefix={renderAddonBefore(props, realPath)}
|
|
138
139
|
onFocus={() => props.onInputFocus(type)}
|
|
139
140
|
onBlur={() => props.onInputBlur(type)}
|
|
140
141
|
disabled={loadingSftp}
|
|
141
|
-
|
|
142
|
+
suffix={
|
|
142
143
|
renderAddonAfter(isLoadingRemote, onGoto, GoIcon, type)
|
|
143
144
|
}
|
|
144
145
|
/>
|
|
@@ -74,6 +74,7 @@ export default class FileSection extends React.Component {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
componentWillUnmount () {
|
|
77
|
+
filesRef.remove(this.id)
|
|
77
78
|
clearTimeout(this.timer)
|
|
78
79
|
this.timer = null
|
|
79
80
|
this.domRef = null
|
|
@@ -82,7 +83,6 @@ export default class FileSection extends React.Component {
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
clearRef = () => {
|
|
85
|
-
filesRef.remove(this.id)
|
|
86
86
|
refs.remove(this.id)
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -1112,7 +1112,7 @@ export default class FileSection extends React.Component {
|
|
|
1112
1112
|
<div className='sftp-item'>
|
|
1113
1113
|
<Input
|
|
1114
1114
|
value={nameTemp}
|
|
1115
|
-
|
|
1115
|
+
prefix={pre}
|
|
1116
1116
|
onChange={this.handleChange}
|
|
1117
1117
|
onBlur={this.handleBlur}
|
|
1118
1118
|
onPressEnter={this.handleBlur}
|
|
@@ -37,11 +37,11 @@ export default function KeywordFilter ({ keyword, type, updateKeyword }) {
|
|
|
37
37
|
const inputProps = {
|
|
38
38
|
value: text,
|
|
39
39
|
onChange: handleInputChange,
|
|
40
|
-
|
|
40
|
+
prefix: <FilterOutlined />,
|
|
41
41
|
onKeyPress: handleKeyPress,
|
|
42
42
|
placeholder: e('keyword'),
|
|
43
43
|
className: 'keyword-filter-input',
|
|
44
|
-
|
|
44
|
+
suffix: <CheckOutlined onClick={applyFilter} />
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const tooltipContent = (
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import InputNumberConfirm from '../common/input-number-confirm'
|
|
2
|
-
|
|
2
|
+
import {
|
|
3
|
+
Space
|
|
4
|
+
} from 'antd'
|
|
3
5
|
import {
|
|
4
6
|
MinusCircleOutlined,
|
|
5
7
|
PlusCircleOutlined
|
|
@@ -18,9 +20,9 @@ export default function ZoomMenu (props) {
|
|
|
18
20
|
step={1}
|
|
19
21
|
min={25}
|
|
20
22
|
max={500}
|
|
21
|
-
|
|
23
|
+
suffix='%'
|
|
22
24
|
addonBefore={
|
|
23
|
-
|
|
25
|
+
<Space.Addon>
|
|
24
26
|
<PlusCircleOutlined
|
|
25
27
|
onClick={() => store.zoom(0.25, true)}
|
|
26
28
|
className='mg1r pointer font16'
|
|
@@ -29,7 +31,7 @@ export default function ZoomMenu (props) {
|
|
|
29
31
|
onClick={() => store.zoom(-0.25, true)}
|
|
30
32
|
className='pointer font16'
|
|
31
33
|
/>
|
|
32
|
-
|
|
34
|
+
</Space.Addon>
|
|
33
35
|
}
|
|
34
36
|
/>
|
|
35
37
|
)
|
|
@@ -206,9 +206,8 @@ export default class TermSearch extends PureComponent {
|
|
|
206
206
|
value: termSearch,
|
|
207
207
|
className: 'iblock',
|
|
208
208
|
onChange: this.handleChange,
|
|
209
|
-
suffix: this.renderSuffix()
|
|
209
|
+
suffix: <>{this.renderSuffix()} {this.renderAfter()}</>,
|
|
210
210
|
onPressEnter: this.next,
|
|
211
|
-
addonAfter: this.renderAfter(),
|
|
212
211
|
selectall: true
|
|
213
212
|
}
|
|
214
213
|
return (
|
|
@@ -239,12 +239,21 @@ class Term extends Component {
|
|
|
239
239
|
type: 'shell_integration',
|
|
240
240
|
execute: async () => {
|
|
241
241
|
await this.injectShellIntegration()
|
|
242
|
+
if (currSftpFollow) {
|
|
243
|
+
this.attachAddon._sendData('\r')
|
|
244
|
+
}
|
|
242
245
|
}
|
|
243
246
|
})
|
|
244
247
|
} else {
|
|
245
248
|
// No active queue, inject directly
|
|
246
|
-
this.injectShellIntegration()
|
|
249
|
+
this.injectShellIntegration().then(() => {
|
|
250
|
+
if (currSftpFollow) {
|
|
251
|
+
this.attachAddon._sendData('\r')
|
|
252
|
+
}
|
|
253
|
+
})
|
|
247
254
|
}
|
|
255
|
+
} else if (this.shellInjected && currSftpFollow) {
|
|
256
|
+
this.getCwd()
|
|
248
257
|
}
|
|
249
258
|
}
|
|
250
259
|
if (
|
|
@@ -570,8 +570,8 @@ export default class ItemListTree extends Component {
|
|
|
570
570
|
value={categoryTitle}
|
|
571
571
|
onChange={this.handleChangeEdit}
|
|
572
572
|
onPressEnter={this.handleSubmitEdit}
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
prefix={colorPicker}
|
|
574
|
+
suffix={confirm}
|
|
575
575
|
/>
|
|
576
576
|
)
|
|
577
577
|
}
|
|
@@ -757,8 +757,8 @@ export default class ItemListTree extends Component {
|
|
|
757
757
|
value={bookmarkGroupTitle}
|
|
758
758
|
onPressEnter={this.handleSubmit}
|
|
759
759
|
onChange={this.handleChangeBookmarkGroupTitle}
|
|
760
|
-
|
|
761
|
-
|
|
760
|
+
prefix={colorPicker}
|
|
761
|
+
suffix={confirm}
|
|
762
762
|
onBlur={this.handleBlurBookmarkGroupTitle}
|
|
763
763
|
/>
|
|
764
764
|
</div>
|
|
@@ -33,12 +33,12 @@ export default function AddressBar (props) {
|
|
|
33
33
|
<Input
|
|
34
34
|
value={url}
|
|
35
35
|
onClick={handleClick}
|
|
36
|
-
|
|
36
|
+
prefix={
|
|
37
37
|
<ReloadOutlined
|
|
38
38
|
onClick={onReload}
|
|
39
39
|
/>
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
suffix={
|
|
42
42
|
<GlobalOutlined
|
|
43
43
|
onClick={onOpen}
|
|
44
44
|
/>
|