@electerm/electerm-react 1.38.19 → 1.38.40

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 (34) hide show
  1. package/client/common/build-ssh-tunnel.js +2 -1
  2. package/client/common/choose-save-folder.js +22 -0
  3. package/client/common/constants.js +1 -1
  4. package/client/common/default-setting.js +9 -1
  5. package/client/common/download.jsx +31 -0
  6. package/client/common/trzsz.js +2 -18
  7. package/client/components/bookmark-form/render-ssh-tunnel.jsx +32 -14
  8. package/client/components/main/main.jsx +4 -0
  9. package/client/components/quick-commands/quick-commands-box.jsx +20 -5
  10. package/client/components/quick-commands/quick-commands-form-elem.jsx +14 -17
  11. package/client/components/quick-commands/quick-commands-list-form.jsx +89 -0
  12. package/client/components/session/session.jsx +5 -4
  13. package/client/components/setting-panel/list.styl +3 -0
  14. package/client/components/setting-panel/setting-terminal.jsx +1 -0
  15. package/client/components/setting-panel/tree-list.styl +4 -0
  16. package/client/components/sftp/file-item.jsx +27 -20
  17. package/client/components/sftp/sftp-entry.jsx +65 -45
  18. package/client/components/shortcuts/shortcuts-defaults.js +7 -7
  19. package/client/components/tabs/index.jsx +12 -1
  20. package/client/components/terminal/attach-addon-custom.js +2 -2
  21. package/client/components/terminal/index.jsx +18 -15
  22. package/client/components/terminal-info/activity.jsx +4 -4
  23. package/client/components/terminal-info/base.jsx +58 -2
  24. package/client/components/terminal-info/disk.jsx +4 -3
  25. package/client/components/terminal-info/network.jsx +4 -3
  26. package/client/components/terminal-info/resource.jsx +20 -10
  27. package/client/components/terminal-info/up.jsx +5 -3
  28. package/client/css/basic.styl +3 -0
  29. package/client/store/common.js +51 -0
  30. package/client/store/index.js +2 -2
  31. package/client/store/sync.js +15 -2
  32. package/client/store/system-menu.js +6 -16
  33. package/package.json +1 -1
  34. package/client/common/download.js +0 -16
@@ -91,30 +91,20 @@ export default Store => {
91
91
  }
92
92
 
93
93
  Store.prototype.exit = function () {
94
- const { store } = window
95
- if (
96
- !store.isTransporting &&
97
- !store.config.confirmBeforeExit
98
- ) {
99
- return store.doExit()
100
- }
101
- store.confirmExit()
94
+ window.exitFunction = 'doExit'
95
+ window.store.doExit()
102
96
  }
103
97
 
104
98
  Store.prototype.restart = function () {
105
- const { store } = window
106
- if (store.isTransporting) {
107
- store.confirmExit('doRestart')
108
- } else {
109
- store.doRestart()
110
- }
99
+ window.exitFunction = 'doRestart'
100
+ window.store.doRestart()
111
101
  }
112
102
 
113
103
  Store.prototype.doExit = function () {
114
- window.pre.runGlobalAsync('closeApp')
104
+ window.pre.runGlobalAsync('closeApp', 'exit')
115
105
  }
116
106
 
117
107
  Store.prototype.doRestart = function () {
118
- window.pre.runGlobalAsync('restart')
108
+ window.pre.runGlobalAsync('restart', 'restart')
119
109
  }
120
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.38.19",
3
+ "version": "1.38.40",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",
@@ -1,16 +0,0 @@
1
- /**
2
- * simulate download
3
- */
4
-
5
- export default function download (filename, text) {
6
- const pom = document.createElement('a')
7
- pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text))
8
- pom.setAttribute('download', filename)
9
- if (document.createEvent) {
10
- const event = document.createEvent('MouseEvents')
11
- event.initEvent('click', true, true)
12
- pom.dispatchEvent(event)
13
- } else {
14
- pom.click()
15
- }
16
- }