@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.
Files changed (33) hide show
  1. package/client/common/constants.js +3 -3
  2. package/client/common/pre.js +1 -120
  3. package/client/components/bookmark-form/ai-bookmark-form.jsx +324 -0
  4. package/client/components/bookmark-form/bookmark-form.styl +1 -1
  5. package/client/components/bookmark-form/bookmark-schema.js +179 -0
  6. package/client/components/bookmark-form/common/ai-category-select.jsx +32 -0
  7. package/client/components/bookmark-form/common/category-select.jsx +2 -4
  8. package/client/components/bookmark-form/common/fields.jsx +0 -10
  9. package/client/components/bookmark-form/config/rdp.js +0 -1
  10. package/client/components/bookmark-form/config/session-config.js +3 -1
  11. package/client/components/bookmark-form/config/spice.js +44 -0
  12. package/client/components/bookmark-form/config/vnc.js +1 -2
  13. package/client/components/bookmark-form/fix-bookmark-default.js +134 -0
  14. package/client/components/bookmark-form/index.jsx +74 -13
  15. package/client/components/session/session.jsx +13 -3
  16. package/client/components/setting-panel/keywords-transport.jsx +0 -1
  17. package/client/components/shortcuts/shortcut-handler.js +11 -5
  18. package/client/components/sidebar/index.jsx +11 -1
  19. package/client/components/spice/spice-session.jsx +276 -0
  20. package/client/components/tabs/add-btn-menu.jsx +9 -2
  21. package/client/components/terminal/attach-addon-custom.js +20 -76
  22. package/client/components/terminal/terminal.jsx +34 -28
  23. package/client/components/terminal/transfer-client-base.js +232 -0
  24. package/client/components/terminal/trzsz-client.js +306 -0
  25. package/client/components/terminal/xterm-loader.js +109 -0
  26. package/client/components/terminal/zmodem-client.js +13 -166
  27. package/client/components/text-editor/simple-editor.jsx +1 -2
  28. package/client/entry/electerm.jsx +0 -2
  29. package/client/store/system-menu.js +10 -0
  30. package/package.json +1 -1
  31. package/client/common/trzsz.js +0 -46
  32. package/client/components/bookmark-form/common/wiki-alert.jsx +0 -9
  33. package/client/components/terminal/fs.js +0 -59
@@ -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,9 +0,0 @@
1
- import Link from '../../common/external-link'
2
-
3
- export default function WikiAlert ({ wikiUrl }) {
4
- return (
5
- <div className='alignright bold pd2'>
6
- <Link to={wikiUrl}>WIKI: {wikiUrl}</Link>
7
- </div>
8
- )
9
- }
@@ -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
- }