@electerm/electerm-react 1.39.68 → 1.39.76
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/bookmark-form/render-auth-ssh.jsx +8 -1
- package/client/components/bookmark-form/ssh-form.jsx +0 -9
- package/client/components/footer/footer-entry.jsx +1 -1
- package/client/components/quick-commands/quick-commands-box.jsx +13 -4
- package/client/components/tree-list/tree-list.jsx +2 -1
- package/package.json +1 -1
|
@@ -24,6 +24,13 @@ export default function renderAuth (props) {
|
|
|
24
24
|
form,
|
|
25
25
|
authType
|
|
26
26
|
} = props
|
|
27
|
+
const beforeUpload = async (file) => {
|
|
28
|
+
const privateKey = await window.fs.readFile(file.path)
|
|
29
|
+
form.setFieldsValue({
|
|
30
|
+
privateKey
|
|
31
|
+
})
|
|
32
|
+
return false
|
|
33
|
+
}
|
|
27
34
|
if (authType === 'password') {
|
|
28
35
|
const opts = {
|
|
29
36
|
options: uniqBy(
|
|
@@ -101,7 +108,7 @@ export default function renderAuth (props) {
|
|
|
101
108
|
/>
|
|
102
109
|
</FormItem>
|
|
103
110
|
<Upload
|
|
104
|
-
beforeUpload={
|
|
111
|
+
beforeUpload={beforeUpload}
|
|
105
112
|
fileList={[]}
|
|
106
113
|
>
|
|
107
114
|
<Button
|
|
@@ -307,17 +307,8 @@ export default class BookmarkForm extends PureComponent {
|
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
beforeUpload = async (file, form) => {
|
|
311
|
-
const privateKey = await window.fs.readFile(file.path)
|
|
312
|
-
form.setFieldsValue({
|
|
313
|
-
privateKey
|
|
314
|
-
})
|
|
315
|
-
return false
|
|
316
|
-
}
|
|
317
|
-
|
|
318
310
|
getProps = () => {
|
|
319
311
|
const funcs = pick(this, [
|
|
320
|
-
'beforeUpload',
|
|
321
312
|
'handleFinish',
|
|
322
313
|
'testConnection',
|
|
323
314
|
'connect',
|
|
@@ -17,7 +17,7 @@ const {
|
|
|
17
17
|
const { prefix } = window
|
|
18
18
|
const f = prefix('form')
|
|
19
19
|
|
|
20
|
-
export default class
|
|
20
|
+
export default class FooterEntry extends Component {
|
|
21
21
|
handleInfoPanel = () => {
|
|
22
22
|
const { activeTerminalId } = this.props.store
|
|
23
23
|
postMessage({
|
|
@@ -167,7 +167,9 @@ export default class QuickCommandsFooterBox extends Component {
|
|
|
167
167
|
openQuickCommandBar,
|
|
168
168
|
pinnedQuickCommandBar,
|
|
169
169
|
qmSortByFrequency,
|
|
170
|
-
inActiveTerminal
|
|
170
|
+
inActiveTerminal,
|
|
171
|
+
leftSidebarWidth,
|
|
172
|
+
openedSideBar
|
|
171
173
|
} = this.props.store
|
|
172
174
|
if ((!openQuickCommandBar && !pinnedQuickCommandBar) || !inActiveTerminal) {
|
|
173
175
|
return null
|
|
@@ -205,11 +207,18 @@ export default class QuickCommandsFooterBox extends Component {
|
|
|
205
207
|
{ 'fil-keyword': !!keyword }
|
|
206
208
|
)
|
|
207
209
|
const type = qmSortByFrequency ? 'primary' : 'default'
|
|
210
|
+
const w = openedSideBar ? 43 + leftSidebarWidth : 43
|
|
211
|
+
const qmProps = {
|
|
212
|
+
className: 'qm-wrap-tooltip',
|
|
213
|
+
style: {
|
|
214
|
+
left: w
|
|
215
|
+
},
|
|
216
|
+
onMouseLeave: this.handleMouseLeave,
|
|
217
|
+
onMouseEnter: this.handleMouseEnter
|
|
218
|
+
}
|
|
208
219
|
return (
|
|
209
220
|
<div
|
|
210
|
-
|
|
211
|
-
onMouseLeave={this.handleMouseLeave}
|
|
212
|
-
onMouseEnter={this.handleMouseEnter}
|
|
221
|
+
{...qmProps}
|
|
213
222
|
>
|
|
214
223
|
<div className='pd2'>
|
|
215
224
|
<div className='pd2b fix'>
|
|
@@ -997,7 +997,8 @@ export default class ItemListTree extends Component {
|
|
|
997
997
|
bookmarkGroupIds = [],
|
|
998
998
|
id
|
|
999
999
|
} = group
|
|
1000
|
-
|
|
1000
|
+
const shouldRender = this.state.keyword || this.state.expandedKeys.includes(id)
|
|
1001
|
+
if (!shouldRender) {
|
|
1001
1002
|
return null
|
|
1002
1003
|
}
|
|
1003
1004
|
return [
|