@electerm/electerm-react 1.34.48 → 1.34.50
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/new-terminal.js +4 -2
- package/client/components/bookmark-form/ssh-form.jsx +1 -1
- package/client/components/main/upgrade.jsx +1 -1
- package/client/components/session/session.jsx +5 -3
- package/client/components/session/session.styl +5 -2
- package/client/components/terminal/index.jsx +6 -2
- package/client/store/setting.js +2 -2
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ export function updateCount (tab) {
|
|
|
16
16
|
window.et.tabCount++
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export default (removeTitle) => {
|
|
19
|
+
export default (removeTitle, noUpdateCount) => {
|
|
20
20
|
const res = {
|
|
21
21
|
id: generate(),
|
|
22
22
|
status: 'processing',
|
|
@@ -26,6 +26,8 @@ export default (removeTitle) => {
|
|
|
26
26
|
if (removeTitle) {
|
|
27
27
|
delete res.title
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
if (!noUpdateCount) {
|
|
30
|
+
updateCount(res)
|
|
31
|
+
}
|
|
30
32
|
return res
|
|
31
33
|
}
|
|
@@ -80,7 +80,7 @@ export default class SessionWrapper extends Component {
|
|
|
80
80
|
key: Math.random(),
|
|
81
81
|
sessionOptions: null,
|
|
82
82
|
sessionId: generate(),
|
|
83
|
-
terminals,
|
|
83
|
+
terminals: terminals.slice(0, 1),
|
|
84
84
|
showInfo: false,
|
|
85
85
|
infoPanelProps: {}
|
|
86
86
|
}
|
|
@@ -437,8 +437,10 @@ export default class SessionWrapper extends Component {
|
|
|
437
437
|
key={type + '_' + i}
|
|
438
438
|
onClick={() => this.onChangePane(types[i])}
|
|
439
439
|
>
|
|
440
|
-
|
|
441
|
-
|
|
440
|
+
<span className='type-tab-txt'>
|
|
441
|
+
{e(type)}
|
|
442
|
+
<span className='type-tab-line' />
|
|
443
|
+
</span>
|
|
442
444
|
</span>
|
|
443
445
|
)
|
|
444
446
|
})
|
|
@@ -12,14 +12,17 @@
|
|
|
12
12
|
height 1px
|
|
13
13
|
background text-dark
|
|
14
14
|
display none
|
|
15
|
+
.type-tab-txt
|
|
16
|
+
position relative
|
|
17
|
+
display inline-block
|
|
15
18
|
|
|
16
19
|
.type-tab
|
|
17
|
-
position relative
|
|
18
20
|
display inline-block
|
|
19
21
|
vertical-align middle
|
|
20
22
|
line-height 30px
|
|
21
23
|
color text-dark
|
|
22
|
-
|
|
24
|
+
padding 0 20px 0 0
|
|
25
|
+
margin-right 0px
|
|
23
26
|
font-size 14px
|
|
24
27
|
cursor pointer
|
|
25
28
|
&:hover
|
|
@@ -932,7 +932,7 @@ export default class Term extends Component {
|
|
|
932
932
|
})
|
|
933
933
|
const { cols, rows } = term
|
|
934
934
|
const { config } = this.props
|
|
935
|
-
const { host, port, tokenElecterm } = config
|
|
935
|
+
const { host, port, tokenElecterm, server = '' } = config
|
|
936
936
|
const { sessionId, terminalIndex, id, logName } = this.props
|
|
937
937
|
const tab = deepCopy(this.props.tab || {})
|
|
938
938
|
const {
|
|
@@ -1013,7 +1013,11 @@ export default class Term extends Component {
|
|
|
1013
1013
|
this.setState({
|
|
1014
1014
|
pid
|
|
1015
1015
|
})
|
|
1016
|
-
const
|
|
1016
|
+
const hs = server
|
|
1017
|
+
? server.replace(/https?:\/\//, '')
|
|
1018
|
+
: `${host}:${port}`
|
|
1019
|
+
const pre = server.startsWith('https') ? 'wss' : 'ws'
|
|
1020
|
+
const wsUrl = `${pre}://${hs}/terminals/${pid}?sessionId=${sessionId}&token=${tokenElecterm}`
|
|
1017
1021
|
const socket = new WebSocket(wsUrl)
|
|
1018
1022
|
socket.onclose = this.oncloseSocket
|
|
1019
1023
|
socket.onerror = this.onerrorSocket
|
package/client/store/setting.js
CHANGED
|
@@ -79,7 +79,7 @@ export default Store => {
|
|
|
79
79
|
...copy(item),
|
|
80
80
|
from: 'history',
|
|
81
81
|
srcId: item.id,
|
|
82
|
-
...newTerm(true)
|
|
82
|
+
...newTerm(true, true)
|
|
83
83
|
})
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -98,7 +98,7 @@ export default Store => {
|
|
|
98
98
|
...item,
|
|
99
99
|
from: 'bookmarks',
|
|
100
100
|
srcId: item.id,
|
|
101
|
-
...newTerm(true)
|
|
101
|
+
...newTerm(true, true)
|
|
102
102
|
})
|
|
103
103
|
item.id = generate()
|
|
104
104
|
if (store.config.disableSshHistory) {
|