@electerm/electerm-react 2.8.16 → 2.10.6
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 +3 -3
- package/client/common/pre.js +1 -120
- package/client/components/bookmark-form/ai-bookmark-form.jsx +324 -0
- package/client/components/bookmark-form/bookmark-form.styl +1 -1
- package/client/components/bookmark-form/bookmark-schema.js +179 -0
- package/client/components/bookmark-form/common/ai-category-select.jsx +32 -0
- package/client/components/bookmark-form/common/category-select.jsx +2 -4
- package/client/components/bookmark-form/common/fields.jsx +0 -10
- package/client/components/bookmark-form/config/rdp.js +0 -1
- package/client/components/bookmark-form/config/session-config.js +3 -1
- package/client/components/bookmark-form/config/spice.js +44 -0
- package/client/components/bookmark-form/config/vnc.js +1 -2
- package/client/components/bookmark-form/fix-bookmark-default.js +134 -0
- package/client/components/bookmark-form/index.jsx +74 -13
- package/client/components/session/session.jsx +13 -3
- package/client/components/setting-panel/keywords-transport.jsx +0 -1
- package/client/components/shortcuts/shortcut-handler.js +11 -5
- package/client/components/sidebar/index.jsx +11 -1
- package/client/components/spice/spice-session.jsx +276 -0
- package/client/components/tabs/add-btn-menu.jsx +9 -2
- package/client/components/terminal/attach-addon-custom.js +20 -76
- package/client/components/terminal/terminal.jsx +34 -28
- package/client/components/terminal/transfer-client-base.js +232 -0
- package/client/components/terminal/trzsz-client.js +306 -0
- package/client/components/terminal/xterm-loader.js +109 -0
- package/client/components/terminal/zmodem-client.js +13 -166
- package/client/components/text-editor/simple-editor.jsx +1 -2
- package/client/entry/electerm.jsx +0 -2
- package/client/store/system-menu.js +10 -0
- package/package.json +1 -1
- package/client/common/trzsz.js +0 -46
- package/client/components/bookmark-form/common/wiki-alert.jsx +0 -9
- package/client/components/terminal/fs.js +0 -59
package/client/common/trzsz.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { TrzszFilter } from 'trzsz'
|
|
2
|
-
import { chooseSaveDirectory } from './choose-save-folder'
|
|
3
|
-
|
|
4
|
-
const {
|
|
5
|
-
openDialog
|
|
6
|
-
} = window.api
|
|
7
|
-
|
|
8
|
-
window.newTrzsz = function (
|
|
9
|
-
writeToTerminal,
|
|
10
|
-
sendToServer,
|
|
11
|
-
terminalColumns,
|
|
12
|
-
isWindowsShell
|
|
13
|
-
) {
|
|
14
|
-
// create a trzsz filter
|
|
15
|
-
return new TrzszFilter({
|
|
16
|
-
// write the server output to the terminal
|
|
17
|
-
writeToTerminal,
|
|
18
|
-
// send the user input to the server
|
|
19
|
-
sendToServer,
|
|
20
|
-
// choose some files to be sent to the server
|
|
21
|
-
chooseSendFiles: async (directory) => {
|
|
22
|
-
const properties = [
|
|
23
|
-
'openFile',
|
|
24
|
-
'multiSelections',
|
|
25
|
-
'showHiddenFiles',
|
|
26
|
-
'noResolveAliases',
|
|
27
|
-
'treatPackageAsDirectory',
|
|
28
|
-
'dontAddToRecent'
|
|
29
|
-
]
|
|
30
|
-
if (directory) {
|
|
31
|
-
properties.push('openDirectory')
|
|
32
|
-
}
|
|
33
|
-
return openDialog({
|
|
34
|
-
title: 'Choose some files to send',
|
|
35
|
-
message: 'Choose some files to send',
|
|
36
|
-
properties
|
|
37
|
-
})
|
|
38
|
-
},
|
|
39
|
-
// choose a directory to save the received files
|
|
40
|
-
chooseSaveDirectory,
|
|
41
|
-
// the terminal columns
|
|
42
|
-
terminalColumns,
|
|
43
|
-
// there is a windows shell
|
|
44
|
-
isWindowsShell
|
|
45
|
-
})
|
|
46
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export const open = (filePath, flag) => {
|
|
2
|
-
const fs = window.require('fs')
|
|
3
|
-
return new Promise((resolve, reject) => {
|
|
4
|
-
fs.open(filePath, flag, (err, fd) => {
|
|
5
|
-
if (err) {
|
|
6
|
-
return reject(err)
|
|
7
|
-
}
|
|
8
|
-
return resolve(fd)
|
|
9
|
-
})
|
|
10
|
-
})
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const close = (fd) => {
|
|
14
|
-
const fs = window.require('fs')
|
|
15
|
-
return new Promise((resolve, reject) => {
|
|
16
|
-
fs.close(fd, (err) => {
|
|
17
|
-
if (err) {
|
|
18
|
-
return reject(err)
|
|
19
|
-
}
|
|
20
|
-
return resolve(true)
|
|
21
|
-
})
|
|
22
|
-
})
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const exists = (filePath) => {
|
|
26
|
-
const fs = window.require('fs')
|
|
27
|
-
return new Promise((resolve, reject) => {
|
|
28
|
-
fs.access(filePath, (err) => {
|
|
29
|
-
if (err) {
|
|
30
|
-
return reject(err)
|
|
31
|
-
}
|
|
32
|
-
return resolve(true)
|
|
33
|
-
})
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const read = (fd, buffer, offset, length, position) => {
|
|
38
|
-
const fs = window.require('fs')
|
|
39
|
-
return new Promise((resolve, reject) => {
|
|
40
|
-
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
|
|
41
|
-
if (err) {
|
|
42
|
-
return reject(err)
|
|
43
|
-
}
|
|
44
|
-
return resolve(buffer.subarray(0, bytesRead))
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const write = (fd, buffer) => {
|
|
50
|
-
const fs = window.require('fs')
|
|
51
|
-
return new Promise((resolve, reject) => {
|
|
52
|
-
fs.write(fd, buffer, (err, buffer) => {
|
|
53
|
-
if (err) {
|
|
54
|
-
return reject(err)
|
|
55
|
-
}
|
|
56
|
-
return resolve(buffer)
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
}
|