@electerm/electerm-react 2.11.16 → 2.12.0
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/default-setting.js +1 -0
- package/client/components/setting-panel/setting-common.jsx +4 -0
- package/client/components/sftp/sftp-entry.jsx +1 -1
- package/client/components/shortcuts/shortcut-control.jsx +21 -0
- package/client/components/shortcuts/shortcuts-defaults.js +5 -0
- package/client/components/terminal/terminal.jsx +1 -0
- package/package.json +1 -1
|
@@ -32,6 +32,7 @@ export default {
|
|
|
32
32
|
enableSixel: true,
|
|
33
33
|
terminalType: 'xterm-256color',
|
|
34
34
|
keepaliveCountMax: 10,
|
|
35
|
+
keyword2FA: 'verification code,otp,one-time,two-factor,2fa,totp,authenticator,duo,yubikey,security code,mfa,passcode',
|
|
35
36
|
saveTerminalLogToFile: false,
|
|
36
37
|
checkUpdateOnStart: true,
|
|
37
38
|
cursorBlink: false,
|
|
@@ -219,6 +219,27 @@ class ShortcutControl extends React.PureComponent {
|
|
|
219
219
|
}
|
|
220
220
|
}, 1000)
|
|
221
221
|
|
|
222
|
+
clickSftpIcon = () => {
|
|
223
|
+
const icon = document.querySelector('.session-current .sftp-follow-ssh-icon')
|
|
224
|
+
if (!icon) return
|
|
225
|
+
icon.click()
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
syncSftpPathShortcut = throttle((e) => {
|
|
229
|
+
e.stopPropagation()
|
|
230
|
+
const { activeTabId } = window.store
|
|
231
|
+
if (!activeTabId) return
|
|
232
|
+
// Get the SFTP component which can sync the path
|
|
233
|
+
const sftp = refs.get('sftp-' + activeTabId)
|
|
234
|
+
if (!sftp) return
|
|
235
|
+
this.clickSftpIcon()
|
|
236
|
+
// Wait for the path to be synced
|
|
237
|
+
setTimeout(() => {
|
|
238
|
+
this.clickSftpIcon()
|
|
239
|
+
sftp.updateCwd()
|
|
240
|
+
}, 100)
|
|
241
|
+
}, 1000)
|
|
242
|
+
|
|
222
243
|
render () {
|
|
223
244
|
return null
|
|
224
245
|
}
|