@electerm/electerm-react 1.34.46 → 1.34.49

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.
@@ -221,8 +221,11 @@ export default class InfoModal extends Component {
221
221
  </div>
222
222
  )
223
223
  })
224
- },
225
- {
224
+ }
225
+ ]
226
+
227
+ if (!window.et.isWebApp) {
228
+ items.push({
226
229
  key: infoTabs.cmd,
227
230
  label: e('commandLineUsage'),
228
231
  children: (
@@ -230,8 +233,8 @@ export default class InfoModal extends Component {
230
233
  <code>{commandLineHelp}</code>
231
234
  </pre>
232
235
  )
233
- }
234
- ]
236
+ })
237
+ }
235
238
 
236
239
  return (
237
240
  <Modal
@@ -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 wsUrl = `ws://${host}:${port}/terminals/${pid}?sessionId=${sessionId}&token=${tokenElecterm}`
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
@@ -1,6 +1,5 @@
1
1
  @require '../../css/includes/theme-default'
2
2
  .terms-box
3
- .term-wrap
4
3
  background main
5
4
  position relative
6
5
  .loading-wrapper
@@ -43,6 +42,7 @@
43
42
  .terms-box
44
43
  position relative
45
44
  .term-wrap
45
+ background main
46
46
  position absolute
47
47
 
48
48
  .vertical
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.34.46",
3
+ "version": "1.34.49",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",