@electerm/electerm-react 2.3.198 → 2.4.16

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 (72) hide show
  1. package/client/common/clipboard.js +1 -1
  2. package/client/common/constants.js +2 -2
  3. package/client/common/download.jsx +3 -2
  4. package/client/common/error-handler.jsx +5 -9
  5. package/client/common/fetch-from-server.js +1 -1
  6. package/client/common/fetch.jsx +5 -5
  7. package/client/common/icon-helpers.jsx +16 -0
  8. package/client/common/parse-json-safe.js +1 -1
  9. package/client/common/pre.js +0 -7
  10. package/client/common/sftp.js +1 -1
  11. package/client/common/terminal-theme.js +1 -1
  12. package/client/common/transfer.js +2 -2
  13. package/client/common/upgrade.js +2 -2
  14. package/client/components/ai/ai-chat.jsx +10 -1
  15. package/client/components/auth/login.jsx +1 -1
  16. package/client/components/bg/css-overwrite.jsx +1 -1
  17. package/client/components/bookmark-form/form-renderer.jsx +3 -2
  18. package/client/components/common/input-auto-focus.jsx +1 -1
  19. package/client/components/common/message.jsx +131 -0
  20. package/client/components/common/message.styl +58 -0
  21. package/client/components/common/modal.jsx +176 -0
  22. package/client/components/common/modal.styl +22 -0
  23. package/client/components/common/notification-with-details.jsx +1 -1
  24. package/client/components/common/notification.jsx +94 -0
  25. package/client/components/common/notification.styl +51 -0
  26. package/client/components/main/connection-hopping-warnning.jsx +1 -3
  27. package/client/components/main/error-wrapper.jsx +3 -2
  28. package/client/components/main/main.jsx +4 -11
  29. package/client/components/main/upgrade.jsx +6 -4
  30. package/client/components/profile/profile-form-elem.jsx +1 -1
  31. package/client/components/quick-commands/quick-commands-box.jsx +5 -2
  32. package/client/components/quick-commands/quick-commands-form-elem.jsx +1 -1
  33. package/client/components/rdp/rdp-session.jsx +2 -2
  34. package/client/components/session/session.jsx +4 -9
  35. package/client/components/setting-panel/deep-link-control.jsx +2 -1
  36. package/client/components/setting-panel/keyword-input.jsx +60 -0
  37. package/client/components/setting-panel/keywords-form.jsx +2 -7
  38. package/client/components/setting-panel/setting-common.jsx +1 -1
  39. package/client/components/setting-panel/setting-terminal.jsx +1 -1
  40. package/client/components/setting-panel/tab-settings.jsx +1 -1
  41. package/client/components/setting-sync/setting-sync-form.jsx +53 -3
  42. package/client/components/setting-sync/setting-sync.jsx +2 -1
  43. package/client/components/sftp/owner-list.js +6 -6
  44. package/client/components/sftp/sftp-entry.jsx +6 -4
  45. package/client/components/shortcuts/shortcut-editor.jsx +2 -2
  46. package/client/components/ssh-config/ssh-config-load-notify.jsx +3 -2
  47. package/client/components/tabs/tab.jsx +1 -1
  48. package/client/components/tabs/workspace-save-modal.jsx +2 -1
  49. package/client/components/terminal/attach-addon-custom.js +142 -26
  50. package/client/components/terminal/command-tracker-addon.js +164 -53
  51. package/client/components/terminal/highlight-addon.js +84 -43
  52. package/client/components/terminal/shell.js +138 -0
  53. package/client/components/terminal/terminal-command-dropdown.jsx +3 -0
  54. package/client/components/terminal/terminal.jsx +165 -103
  55. package/client/components/theme/theme-form.jsx +2 -1
  56. package/client/components/tree-list/bookmark-transport.jsx +27 -5
  57. package/client/components/vnc/vnc-session.jsx +1 -1
  58. package/client/components/widgets/widget-notification-with-details.jsx +1 -1
  59. package/client/store/common.js +5 -2
  60. package/client/store/db-upgrade.js +1 -1
  61. package/client/store/init-state.js +2 -1
  62. package/client/store/load-data.js +2 -2
  63. package/client/store/mcp-handler.js +9 -50
  64. package/client/store/setting.js +1 -3
  65. package/client/store/store.js +2 -1
  66. package/client/store/sync.js +14 -8
  67. package/client/store/system-menu.js +2 -1
  68. package/client/store/tab.js +1 -1
  69. package/client/store/widgets.js +1 -3
  70. package/package.json +1 -1
  71. package/client/common/track.js +0 -7
  72. package/client/components/batch-op/batch-op-entry.jsx +0 -13
@@ -2,9 +2,7 @@
2
2
  * setting modal
3
3
  */
4
4
 
5
- import {
6
- message
7
- } from 'antd'
5
+ import message from '../components/common/message'
8
6
  import copy from 'json-deep-copy'
9
7
  import {
10
8
  settingMap,
@@ -234,7 +234,8 @@ class Store {
234
234
  colorSuccess: themeConf.success,
235
235
  colorWarning: themeConf.warn,
236
236
  colorTextBase: themeConf.text,
237
- colorLink: themeConf['text-light']
237
+ colorLink: themeConf['text-light'],
238
+ motion: false
238
239
  },
239
240
  algorithm: isColorDark(themeConf.main) ? theme.darkAlgorithm : theme.defaultAlgorithm
240
241
  }
@@ -80,6 +80,10 @@ export default (Store) => {
80
80
  return get(window.store.config, 'syncSetting.' + type + 'GistId')
81
81
  }
82
82
 
83
+ Store.prototype.getSyncProxy = function (type) {
84
+ return get(window.store.config, 'syncSetting.' + type + 'Proxy')
85
+ }
86
+
83
87
  Store.prototype.testSyncToken = async function (type) {
84
88
  const { store } = window
85
89
  store.isSyncingSetting = true
@@ -89,12 +93,14 @@ export default (Store) => {
89
93
  'test',
90
94
  [],
91
95
  token,
92
- store.getProxySetting()
93
- ).catch(
94
- log.error
96
+ store.getSyncProxy(type)
95
97
  )
98
+ .catch(err => {
99
+ console.error(err)
100
+ return err
101
+ })
96
102
  store.isSyncingSetting = false
97
- return !!gist
103
+ return gist
98
104
  }
99
105
 
100
106
  Store.prototype.createGist = async function (type) {
@@ -111,7 +117,7 @@ export default (Store) => {
111
117
  public: false
112
118
  }
113
119
  const res = await fetchData(
114
- type, 'create', [data], token, store.getProxySetting()
120
+ type, 'create', [data], token, store.getSyncProxy(type)
115
121
  ).catch(
116
122
  store.onError
117
123
  )
@@ -184,7 +190,7 @@ export default (Store) => {
184
190
  'getOne',
185
191
  [gistId],
186
192
  token,
187
- store.getProxySetting()
193
+ store.getSyncProxy(type)
188
194
  )
189
195
  updateSyncServerStatusFromGist(store, gist, type)
190
196
  }
@@ -254,7 +260,7 @@ export default (Store) => {
254
260
  'update',
255
261
  [gistId, gistData],
256
262
  token,
257
- store.getProxySetting()
263
+ store.getSyncProxy(type)
258
264
  )
259
265
  if (res) {
260
266
  store.updateSyncSetting({
@@ -290,7 +296,7 @@ export default (Store) => {
290
296
  'getOne',
291
297
  [gistId],
292
298
  token,
293
- store.getProxySetting()
299
+ store.getSyncProxy(type)
294
300
  )
295
301
  if (gist) {
296
302
  updateSyncServerStatusFromGist(store, gist, type)
@@ -2,7 +2,7 @@
2
2
  * system menu functions
3
3
  */
4
4
 
5
- import { Modal } from 'antd'
5
+ import Modal from '../components/common/modal'
6
6
  import { isString } from 'lodash-es'
7
7
  import getInitItem from '../common/init-setting-item'
8
8
  import {
@@ -64,6 +64,7 @@ export default Store => {
64
64
  Store.prototype.confirmExit = function (type) {
65
65
  const { store } = window
66
66
  let mod = null
67
+ console.log('confirmExit called')
67
68
  mod = Modal.confirm({
68
69
  onCancel: () => mod.destroy(),
69
70
  onOk: store.doExit,
@@ -10,7 +10,7 @@ import {
10
10
  maxHistory
11
11
  } from '../common/constants'
12
12
  import { refs, refsTabs } from '../components/common/ref'
13
- import { message } from 'antd'
13
+ import message from '../components/common/message'
14
14
  import * as ls from '../common/safe-local-storage'
15
15
  import deepCopy from 'json-deep-copy'
16
16
  import generate from '../common/id-with-stamp'
@@ -2,9 +2,7 @@
2
2
  * widgets related functions
3
3
  */
4
4
 
5
- import {
6
- message
7
- } from 'antd'
5
+ import message from '../components/common/message'
8
6
  import {
9
7
  settingMap
10
8
  } from '../common/constants'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "2.3.198",
3
+ "version": "2.4.16",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",
@@ -1,7 +0,0 @@
1
- export default (eventName, value) => {
2
- if (!window.gtag) {
3
- return
4
- }
5
- log.debug('track data', eventName, value)
6
- window.gtag('event', eventName, value)
7
- }
@@ -1,13 +0,0 @@
1
- import { lazy, Suspense } from 'react'
2
-
3
- // Lazy load BatchOp
4
- export const BatchOp = lazy(() => import('./batch-op'))
5
-
6
- // Wrap BatchOp with Suspense
7
- export default function BatchOpEntry (props) {
8
- return (
9
- <Suspense fallback={<>Loading...</>}>
10
- <BatchOp {...props} />
11
- </Suspense>
12
- )
13
- }