@electerm/electerm-react 2.4.18 → 2.4.28

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.
@@ -65,10 +65,6 @@ export function shortcutExtend (Cls) {
65
65
  if (isInAntdInput()) {
66
66
  return
67
67
  }
68
- if (this.cmdAddon) {
69
- this.cmdAddon.handleKey(event)
70
- }
71
-
72
68
  if (
73
69
  this.term &&
74
70
  key === 'Backspace' &&
@@ -247,6 +247,14 @@ class Term extends Component {
247
247
  }
248
248
  }
249
249
  }
250
+ if (
251
+ !prevSftpFollow &&
252
+ currSftpFollow &&
253
+ this.isLocal() &&
254
+ isWin
255
+ ) {
256
+ return this.warnSftpFollowUnsupported()
257
+ }
250
258
  }
251
259
 
252
260
  timers = {}
@@ -325,6 +333,14 @@ class Term extends Component {
325
333
  })
326
334
  }
327
335
 
336
+ warnSftpFollowUnsupported = () => {
337
+ message.warning(
338
+ <span>
339
+ Fish shell/windows shell is not supported for SFTP follow SSH path feature. See: <ExternalLink to='https://github.com/electerm/electerm/wiki/Warning-about-sftp-follow-ssh-path-function'>wiki</ExternalLink>
340
+ </span>
341
+ , 7)
342
+ }
343
+
328
344
  pasteShortcut = (e) => {
329
345
  if (this.pasteTextTooLong()) {
330
346
  this.askUserConfirm()
@@ -1080,6 +1096,7 @@ class Term extends Component {
1080
1096
  term.onData(this.onData)
1081
1097
  this.term = term
1082
1098
  term.onSelectionChange(this.onSelectionChange)
1099
+ term.attachCustomKeyEventHandler(this.handleKeyboardEvent.bind(this))
1083
1100
  await this.remoteInit(term)
1084
1101
  }
1085
1102
 
@@ -1221,11 +1238,7 @@ class Term extends Component {
1221
1238
  this.shellType = shellType
1222
1239
  if (shellType === 'fish') {
1223
1240
  if (this.props.sftpPathFollowSsh) {
1224
- message.warning(
1225
- <span>
1226
- Fish shell is not supported for SFTP follow SSH path. See: <ExternalLink to='https://github.com/electerm/electerm/wiki/Warning-about-sftp-follow-ssh-path-function'>wiki</ExternalLink>
1227
- </span>
1228
- , 7)
1241
+ this.warnSftpFollowUnsupported()
1229
1242
  }
1230
1243
  return Promise.resolve()
1231
1244
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "2.4.18",
3
+ "version": "2.4.28",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",