@electerm/electerm-react 2.3.65 → 2.3.85
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 +1 -0
- package/client/components/bookmark-form/common/fields.jsx +8 -2
- package/client/components/bookmark-form/common/wiki-alert.jsx +9 -0
- package/client/components/bookmark-form/config/vnc.js +1 -0
- package/client/components/bookmark-form/index.jsx +5 -1
- package/client/components/sidebar/transfer-history-modal.jsx +8 -2
- package/client/components/sidebar/transfer.styl +8 -1
- package/client/components/tabs/app-drag.jsx +15 -2
- package/client/components/tabs/tab.jsx +4 -2
- package/client/components/tabs/tabs.styl +5 -0
- package/client/components/tree-list/tree-list-item.jsx +2 -5
- package/client/components/tree-list/tree-list.styl +4 -2
- package/client/css/includes/box.styl +2 -40
- package/package.json +1 -1
- package/client/components/bookmark-form/common/rdp-alert.jsx +0 -13
|
@@ -239,6 +239,7 @@ export const regexHelpLink = 'https://github.com/electerm/electerm/wiki/Terminal
|
|
|
239
239
|
export const connectionHoppingWikiLink = 'https://github.com/electerm/electerm/wiki/Connection-Hopping-Behavior-Change-in-electerm-since-v1.50.65'
|
|
240
240
|
export const aiConfigWikiLink = 'https://github.com/electerm/electerm/wiki/AI-model-config-guide'
|
|
241
241
|
export const rdpWikiLink = 'https://github.com/electerm/electerm/wiki/RDP-session-known-issues'
|
|
242
|
+
export const vncWikiLink = 'https://github.com/electerm/electerm/wiki/VNC-session-known-issues'
|
|
242
243
|
export const modals = {
|
|
243
244
|
hide: 0,
|
|
244
245
|
setting: 1,
|
|
@@ -20,7 +20,11 @@ import SshHostSelector from './ssh-host-selector.jsx'
|
|
|
20
20
|
import SshAuthTypeSelector from './ssh-auth-type-selector.jsx'
|
|
21
21
|
import SshAuthSelector from './ssh-auth-selector.jsx'
|
|
22
22
|
import CategorySelect from './category-select.jsx'
|
|
23
|
-
import
|
|
23
|
+
import WikiAlert from './wiki-alert.jsx'
|
|
24
|
+
import {
|
|
25
|
+
rdpWikiLink,
|
|
26
|
+
vncWikiLink
|
|
27
|
+
} from '../../../common/constants.js'
|
|
24
28
|
|
|
25
29
|
const Fragment = React.Fragment
|
|
26
30
|
const FormItem = Form.Item
|
|
@@ -122,7 +126,9 @@ export function renderFormItem (item, formItemLayout, form, ctxProps, index) {
|
|
|
122
126
|
case 'warning':
|
|
123
127
|
return <Alert key={name} type='warning' {...item.props} />
|
|
124
128
|
case 'rdpWarning':
|
|
125
|
-
return <
|
|
129
|
+
return <WikiAlert key={name} wikiUrl={rdpWikiLink} />
|
|
130
|
+
case 'vncWarning':
|
|
131
|
+
return <WikiAlert key={name} wikiUrl={vncWikiLink} />
|
|
126
132
|
case 'categorySelect':
|
|
127
133
|
return (
|
|
128
134
|
<CategorySelect
|
|
@@ -24,6 +24,7 @@ const vncConfig = {
|
|
|
24
24
|
key: 'auth',
|
|
25
25
|
label: e('auth'),
|
|
26
26
|
fields: [
|
|
27
|
+
{ type: 'vncWarning', name: 'vncWarning' },
|
|
27
28
|
commonFields.category,
|
|
28
29
|
commonFields.colorTitle,
|
|
29
30
|
{ type: 'input', name: 'host', label: e('host'), rules: [{ required: true, message: e('host') + ' required' }] },
|
|
@@ -66,7 +66,11 @@ export default class BookmarkIndex2 extends PureComponent {
|
|
|
66
66
|
>
|
|
67
67
|
{keys.map(v => {
|
|
68
68
|
const txt = v === 'ssh' ? 'Ssh/Sftp' : e(v)
|
|
69
|
-
|
|
69
|
+
let sup = null
|
|
70
|
+
if (v === connectionMap.vnc || v === connectionMap.rdp) {
|
|
71
|
+
sup = <sup className='color-red'>Beta</sup>
|
|
72
|
+
}
|
|
73
|
+
return (<Radio.Button key={v} value={v}>{txt}{sup}</Radio.Button>)
|
|
70
74
|
})}
|
|
71
75
|
</Radio.Group>
|
|
72
76
|
)
|
|
@@ -61,7 +61,10 @@ export default memo(function TransferHistoryModal (props) {
|
|
|
61
61
|
dataIndex: 'fromPath',
|
|
62
62
|
key: 'fromPath',
|
|
63
63
|
render: (txt, inst) => {
|
|
64
|
-
|
|
64
|
+
const t = inst.fromPathReal || txt
|
|
65
|
+
return (
|
|
66
|
+
<div className='sftp-file history-file' title={t}>{t}</div>
|
|
67
|
+
)
|
|
65
68
|
},
|
|
66
69
|
sorter: sorterFactory('fromPath')
|
|
67
70
|
}, {
|
|
@@ -69,7 +72,10 @@ export default memo(function TransferHistoryModal (props) {
|
|
|
69
72
|
dataIndex: 'toPath',
|
|
70
73
|
key: 'toPath',
|
|
71
74
|
render: (txt, inst) => {
|
|
72
|
-
|
|
75
|
+
const t = inst.toPathReal || txt
|
|
76
|
+
return (
|
|
77
|
+
<div className='sftp-file history-file' title={t}>{t}</div>
|
|
78
|
+
)
|
|
73
79
|
},
|
|
74
80
|
sorter: sorterFactory('toPath')
|
|
75
81
|
}, {
|
|
@@ -4,4 +4,11 @@
|
|
|
4
4
|
.ant-badge-multiple-words
|
|
5
5
|
padding 0 3px
|
|
6
6
|
.transfer-list-card
|
|
7
|
-
width calc(
|
|
7
|
+
width calc(100vw - 48px)
|
|
8
|
+
.sftp-file
|
|
9
|
+
max-width calc(50vw - 250px)
|
|
10
|
+
overflow hidden
|
|
11
|
+
text-overflow ellipsis
|
|
12
|
+
white-space nowrap
|
|
13
|
+
&.history-file
|
|
14
|
+
max-width calc(50vw - 440px)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { useEffect } from 'react'
|
|
1
|
+
import { useEffect, useRef } from 'react'
|
|
2
2
|
|
|
3
3
|
export default function AppDrag (props) {
|
|
4
|
+
const isDraggingRef = useRef(false)
|
|
5
|
+
|
|
4
6
|
function canOperate (e) {
|
|
5
7
|
const {
|
|
6
8
|
target
|
|
@@ -20,12 +22,16 @@ export default function AppDrag (props) {
|
|
|
20
22
|
function onMouseDown (e) {
|
|
21
23
|
// e.stopPropagation()
|
|
22
24
|
if (canOperate(e)) {
|
|
25
|
+
isDraggingRef.current = true
|
|
23
26
|
window.pre.runSync('windowMove', true)
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
function onMouseUp (e) {
|
|
28
|
-
|
|
31
|
+
if (isDraggingRef.current) {
|
|
32
|
+
isDraggingRef.current = false
|
|
33
|
+
window.pre.runSync('windowMove', false)
|
|
34
|
+
}
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
function onDoubleClick (e) {
|
|
@@ -44,7 +50,14 @@ export default function AppDrag (props) {
|
|
|
44
50
|
}
|
|
45
51
|
|
|
46
52
|
useEffect(() => {
|
|
53
|
+
// Listen for mouseup at document level to catch mouseup outside window
|
|
54
|
+
document.addEventListener('mouseup', onMouseUp)
|
|
47
55
|
window.addEventListener('contextmenu', onMouseUp)
|
|
56
|
+
|
|
57
|
+
return () => {
|
|
58
|
+
document.removeEventListener('mouseup', onMouseUp)
|
|
59
|
+
window.removeEventListener('contextmenu', onMouseUp)
|
|
60
|
+
}
|
|
48
61
|
}, [])
|
|
49
62
|
return (
|
|
50
63
|
<div
|
|
@@ -367,12 +367,14 @@ class Tab extends Component {
|
|
|
367
367
|
if (name) {
|
|
368
368
|
tunnel = `[${name}] ${tunnel}`
|
|
369
369
|
}
|
|
370
|
-
return <div key={tunnel}>{tunnel}</div>
|
|
370
|
+
return <div key={tunnel + '-' + i} className='ssh-tunnel-item'>{tunnel}</div>
|
|
371
371
|
})
|
|
372
372
|
return (
|
|
373
373
|
<>
|
|
374
374
|
<div>{title}</div>
|
|
375
|
-
|
|
375
|
+
<div className='ssh-tunnel-list-wrapper'>
|
|
376
|
+
{list}
|
|
377
|
+
</div>
|
|
376
378
|
</>
|
|
377
379
|
)
|
|
378
380
|
}
|
|
@@ -188,7 +188,7 @@ export default function TreeListItem (props) {
|
|
|
188
188
|
{
|
|
189
189
|
selected: selectedItemId === item.id
|
|
190
190
|
},
|
|
191
|
-
'tree-item
|
|
191
|
+
'tree-item',
|
|
192
192
|
{
|
|
193
193
|
'is-category': isGroup,
|
|
194
194
|
level2: item.level === 2
|
|
@@ -232,10 +232,7 @@ export default function TreeListItem (props) {
|
|
|
232
232
|
onClick: onSelect,
|
|
233
233
|
'data-item-id': item.id,
|
|
234
234
|
'data-is-group': isGroup ? 'true' : 'false',
|
|
235
|
-
'data-parent-id': props.parentId
|
|
236
|
-
style: props.staticList
|
|
237
|
-
? { maxWidth: (props.leftSidebarWidth - 110) + 'px' }
|
|
238
|
-
: undefined
|
|
235
|
+
'data-parent-id': props.parentId
|
|
239
236
|
}
|
|
240
237
|
const key = item.id || uid()
|
|
241
238
|
return (
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
line-height 26px
|
|
12
12
|
padding-left 5px
|
|
13
13
|
border-radius 3px
|
|
14
|
+
overflow hidden
|
|
15
|
+
white-space nowrap
|
|
16
|
+
text-overflow ellipsis
|
|
14
17
|
&.is-category
|
|
15
18
|
.tree-item-title
|
|
16
19
|
font-weight bold
|
|
@@ -30,13 +33,12 @@
|
|
|
30
33
|
.tree-item-title
|
|
31
34
|
flex-grow 1
|
|
32
35
|
line-height 26px
|
|
33
|
-
max-width 300px
|
|
34
36
|
overflow hidden
|
|
35
37
|
white-space nowrap
|
|
36
38
|
text-overflow ellipsis
|
|
37
39
|
|
|
38
40
|
.sidebar-panel .tree-item-title
|
|
39
|
-
|
|
41
|
+
max-width calc(100% - 40px)
|
|
40
42
|
.with-plus
|
|
41
43
|
&:after
|
|
42
44
|
content '+'
|
|
@@ -67,45 +67,7 @@ for $i, $index in 5 16 32
|
|
|
67
67
|
display inline-block
|
|
68
68
|
vertical-align middle
|
|
69
69
|
|
|
70
|
-
.
|
|
71
|
-
display inline-block
|
|
72
|
-
vertical-align baseline
|
|
73
|
-
|
|
74
|
-
.itblock
|
|
75
|
-
display inline-block
|
|
76
|
-
vertical-align top
|
|
77
|
-
|
|
78
|
-
.border
|
|
79
|
-
border 1px solid #e4e4e4
|
|
80
|
-
|
|
81
|
-
.borderl
|
|
82
|
-
border-left 1px solid #e4e4e4
|
|
83
|
-
|
|
84
|
-
.borderr
|
|
85
|
-
border-right 1px solid #e4e4e4
|
|
86
|
-
|
|
87
|
-
.borderb
|
|
88
|
-
border-bottom 1px solid #e4e4e4
|
|
89
|
-
&.dashed
|
|
90
|
-
border-bottom 1px dashed #e4e4e4
|
|
91
|
-
|
|
92
|
-
.bordert
|
|
93
|
-
border-top 1px solid #e4e4e4
|
|
94
|
-
|
|
95
|
-
.borderr
|
|
96
|
-
border-right 1px solid #e4e4e4
|
|
97
|
-
|
|
98
|
-
.borderl
|
|
99
|
-
border-left 1px solid #e4e4e4
|
|
100
|
-
|
|
101
|
-
.border-dashed
|
|
102
|
-
border-style dashed
|
|
103
|
-
.border-dotted
|
|
104
|
-
border-style dotted
|
|
105
|
-
|
|
106
|
-
.hide,
|
|
107
|
-
.hide1,
|
|
108
|
-
.hide2
|
|
70
|
+
.hide
|
|
109
71
|
display none
|
|
110
72
|
|
|
111
73
|
.hidden
|
|
@@ -128,7 +90,7 @@ for $i, $index in 5 16 32
|
|
|
128
90
|
.fix
|
|
129
91
|
&:after
|
|
130
92
|
clear both
|
|
131
|
-
|
|
93
|
+
|
|
132
94
|
.overhide
|
|
133
95
|
overflow hidden
|
|
134
96
|
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Alert } from 'antd'
|
|
2
|
-
import { rdpWikiLink } from '../../../common/constants'
|
|
3
|
-
import Link from '../../common/external-link'
|
|
4
|
-
|
|
5
|
-
export default function RdpAlert () {
|
|
6
|
-
return (
|
|
7
|
-
<Alert
|
|
8
|
-
message={<Link to={rdpWikiLink}>WIKI: {rdpWikiLink}</Link>}
|
|
9
|
-
type='warning'
|
|
10
|
-
className='mg2y'
|
|
11
|
-
/>
|
|
12
|
-
)
|
|
13
|
-
}
|