@electerm/electerm-react 1.37.126 → 1.38.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 (38) hide show
  1. package/client/common/constants.js +2 -1
  2. package/client/common/default-setting.js +1 -1
  3. package/client/common/pre.js +1 -1
  4. package/client/components/batch-op/batch-op.jsx +7 -1
  5. package/client/components/common/logo-elem.jsx +4 -3
  6. package/client/components/common/logo.styl +9 -0
  7. package/client/components/footer/footer-entry.jsx +1 -1
  8. package/client/components/footer/footer.styl +11 -2
  9. package/client/components/main/main.jsx +1 -0
  10. package/client/components/main/wrapper.styl +0 -2
  11. package/client/components/quick-commands/qm.styl +3 -0
  12. package/client/components/quick-commands/quick-commands-box.jsx +1 -1
  13. package/client/components/quick-commands/quick-commands-select.jsx +3 -1
  14. package/client/components/session/session.jsx +7 -1
  15. package/client/components/session/sessions.jsx +7 -0
  16. package/client/components/setting-panel/setting-common.jsx +5 -5
  17. package/client/components/setting-panel/setting-modal.jsx +3 -1
  18. package/client/components/setting-panel/setting-wrap.jsx +10 -0
  19. package/client/components/setting-panel/setting-wrap.styl +28 -1
  20. package/client/components/setting-panel/setting.styl +8 -1
  21. package/client/components/shortcuts/shortcut-handler.js +11 -0
  22. package/client/components/shortcuts/shortcuts-defaults.js +5 -0
  23. package/client/components/sidebar/sidebar.styl +4 -1
  24. package/client/components/tabs/index.jsx +9 -2
  25. package/client/components/tabs/tab.jsx +17 -6
  26. package/client/components/tabs/tabs.styl +13 -6
  27. package/client/components/tabs/window-control.jsx +4 -1
  28. package/client/components/terminal/attach-addon-custom.js +11 -2
  29. package/client/components/terminal/fs.js +59 -0
  30. package/client/components/terminal/index.jsx +245 -126
  31. package/client/components/terminal/xterm-zmodem.js +40 -33
  32. package/client/css/basic.styl +1 -1
  33. package/client/css/mobile.styl +8 -0
  34. package/client/entry/basic.js +1 -0
  35. package/client/store/index.js +0 -5
  36. package/client/store/init-state.js +2 -1
  37. package/package.json +1 -1
  38. package/client/components/terminal/zmodem-transfer.jsx +0 -98
@@ -187,6 +187,7 @@ export default () => {
187
187
  height: 500,
188
188
  isMaximized: window.pre.runSync('isMaximized'),
189
189
  terminalFullScreen: false,
190
- hideDelKeyTip: ls.getItem(dismissDelKeyTipLsKey) === 'y'
190
+ hideDelKeyTip: ls.getItem(dismissDelKeyTipLsKey) === 'y',
191
+ tabsHeight: 36
191
192
  }
192
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.37.126",
3
+ "version": "1.38.6",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",
@@ -1,98 +0,0 @@
1
- /**
2
- * zmodem transfer UI module
3
- * then run rz to send from your browser or
4
- * sz <file> to send from the remote peer.
5
- */
6
-
7
- import { memo } from 'react'
8
- import { Progress, Button, Upload, Tag } from 'antd'
9
- import { transferTypeMap } from '../../common/constants'
10
- import Link from '../common/external-link'
11
- import './zmodem.styl'
12
-
13
- const { prefix } = window
14
- const s = prefix('sftp')
15
- const c = prefix('common')
16
-
17
- export default memo((props) => {
18
- const { zmodemTransfer, cancelZmodem, beforeZmodemUpload } = props
19
- if (!zmodemTransfer) {
20
- return null
21
- }
22
- const {
23
- fileInfo,
24
- type,
25
- transferedSize,
26
- percent
27
- // options
28
- } = zmodemTransfer
29
- let btn = null
30
- let progress = null
31
- const recm = (
32
- <Tag color='success'>
33
- <div className='pd1y'>
34
- <b className='mg1r'>Recommend Use trzsz instead:</b>
35
- <Link to='https://github.com/trzsz/trzsz'>https://github.com/trzsz/trzsz</Link>
36
- </div>
37
- </Tag>
38
- )
39
- const cancelBtn = (
40
- <Button
41
- type='danger'
42
- className='iblock mg2l'
43
- onClick={cancelZmodem}
44
- >{c('cancel')}
45
- </Button>
46
- )
47
- if (type === transferTypeMap.upload) {
48
- btn = (
49
- <div className={fileInfo ? 'hide' : 'mg2b'}>
50
- <div className='iblock'>
51
- <Upload
52
- showUploadList={false}
53
- beforeUpload={beforeZmodemUpload}
54
- className={fileInfo ? 'hide' : 'iblock'}
55
- >
56
- <Button>
57
- {s(type)}
58
- </Button>
59
- </Upload>
60
- </div>
61
- {cancelBtn}
62
- </div>
63
- )
64
- }
65
- if (fileInfo) {
66
- const {
67
- size,
68
- name
69
- } = fileInfo
70
- progress = (
71
- <div className='pd1b'>
72
- <Progress
73
- percent={percent}
74
- size='small'
75
- status='active'
76
- format={() => {
77
- return `%${percent}(${transferedSize}/${size})`
78
- }}
79
- />
80
- <h2 className='pd2y'>
81
- <span className='iblock'>
82
- {s(type)}: {name}
83
- </span>
84
- </h2>
85
- <h4 className='pd2t pd2x'>Upload file(❯1M) may not show progress and may not end properly, but still would finish uploading in background.</h4>
86
- </div>
87
- )
88
- }
89
- return (
90
- <div className='zmodem-transfer'>
91
- <div className='zmodem-transfer-inner'>
92
- {btn}
93
- {progress}
94
- {recm}
95
- </div>
96
- </div>
97
- )
98
- })