@electerm/electerm-react 1.40.20 → 1.50.31

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 (104) hide show
  1. package/client/common/constants.js +57 -7
  2. package/client/common/new-terminal.js +2 -2
  3. package/client/components/auth/login.jsx +34 -57
  4. package/client/components/batch-op/batch-op.jsx +12 -11
  5. package/client/components/bookmark-form/index.jsx +2 -2
  6. package/client/components/bookmark-form/ssh-form.jsx +4 -1
  7. package/client/components/bookmark-form/tree-delete.jsx +5 -5
  8. package/client/components/context-menu/boomarks.jsx +8 -12
  9. package/client/components/context-menu/context-menu.jsx +10 -10
  10. package/client/components/context-menu/history.jsx +21 -24
  11. package/client/components/context-menu/menu-btn.jsx +11 -11
  12. package/client/components/context-menu/tabs.jsx +15 -19
  13. package/client/components/context-menu/zoom.jsx +25 -29
  14. package/client/components/footer/footer-entry.jsx +56 -56
  15. package/client/components/icons/split-icons.jsx +77 -0
  16. package/client/components/layout/layout-alg.js +260 -0
  17. package/client/components/layout/layout-item.jsx +94 -0
  18. package/client/components/layout/layout.jsx +167 -0
  19. package/client/components/layout/layout.styl +8 -0
  20. package/client/components/layout/layouts.jsx +72 -0
  21. package/client/components/layout/session-size-alg.js +31 -0
  22. package/client/components/main/custom-css.jsx +1 -1
  23. package/client/components/main/main.jsx +184 -110
  24. package/client/components/main/ui-theme.jsx +1 -1
  25. package/client/components/main/wrapper.styl +2 -4
  26. package/client/components/profile/profile-list.jsx +1 -3
  27. package/client/components/profile/profile-transport-mod.jsx +1 -1
  28. package/client/components/profile/profile-transport.jsx +6 -9
  29. package/client/components/quick-commands/quick-command-transport.jsx +6 -9
  30. package/client/components/quick-commands/quick-commands-box.jsx +144 -153
  31. package/client/components/quick-commands/quick-commands-select.jsx +10 -3
  32. package/client/components/rdp/rdp-session.jsx +3 -23
  33. package/client/components/rdp/resolution-edit.jsx +40 -42
  34. package/client/components/session/session.jsx +63 -328
  35. package/client/components/session/session.styl +1 -5
  36. package/client/components/session/sessions.jsx +140 -111
  37. package/client/components/setting-panel/bookmark-tree-list.jsx +1 -1
  38. package/client/components/setting-panel/setting-common.jsx +6 -4
  39. package/client/components/setting-panel/setting-modal.jsx +31 -31
  40. package/client/components/setting-panel/start-session-select.jsx +4 -4
  41. package/client/components/setting-panel/tab-settings.jsx +27 -5
  42. package/client/components/setting-sync/data-import.jsx +36 -39
  43. package/client/components/setting-sync/setting-sync-form.jsx +10 -10
  44. package/client/components/setting-sync/setting-sync.jsx +50 -52
  45. package/client/components/sftp/address-bookmark.jsx +57 -58
  46. package/client/components/sftp/confirm-modal-store.jsx +34 -40
  47. package/client/components/sftp/file-item.jsx +14 -3
  48. package/client/components/sftp/file-mode-modal.jsx +3 -0
  49. package/client/components/sftp/list-table-ui.jsx +4 -4
  50. package/client/components/sftp/sftp-entry.jsx +2 -2
  51. package/client/components/sftp/transfer-conflict-store.jsx +13 -17
  52. package/client/components/sftp/transport-action-store.jsx +38 -31
  53. package/client/components/sftp/transports-action-store.jsx +3 -3
  54. package/client/components/sftp/transports-ui-store.jsx +18 -23
  55. package/client/components/shortcuts/shortcut-handler.js +1 -0
  56. package/client/components/shortcuts/shortcuts-defaults.js +5 -5
  57. package/client/components/shortcuts/shortcuts.jsx +9 -12
  58. package/client/components/side-panel-r/right-side-panel.styl +40 -0
  59. package/client/components/side-panel-r/side-panel-r.jsx +102 -0
  60. package/client/components/sidebar/bookmark-select.jsx +40 -40
  61. package/client/components/sidebar/bookmark.jsx +63 -65
  62. package/client/components/sidebar/history.jsx +53 -50
  63. package/client/components/sidebar/index.jsx +195 -184
  64. package/client/components/sidebar/info-modal.jsx +202 -202
  65. package/client/components/sidebar/sidebar.styl +8 -2
  66. package/client/components/sidebar/transfer-history-modal.jsx +95 -100
  67. package/client/components/sidebar/transfer-list-control.jsx +2 -2
  68. package/client/components/sidebar/transfer-list.jsx +45 -42
  69. package/client/components/sidebar/transfer-modal.jsx +49 -52
  70. package/client/components/sidebar/transport-ui.jsx +1 -1
  71. package/client/components/tabs/index.jsx +261 -49
  72. package/client/components/tabs/tab.jsx +48 -66
  73. package/client/components/tabs/tabs.styl +6 -1
  74. package/client/components/tabs/window-control.jsx +46 -48
  75. package/client/components/terminal/attach-addon-custom.js +1 -1
  76. package/client/components/terminal/index.jsx +111 -113
  77. package/client/components/terminal/term-search.jsx +26 -24
  78. package/client/components/terminal-info/run-cmd.jsx +0 -25
  79. package/client/components/terminal-info/terminal-info.jsx +60 -0
  80. package/client/components/terminal-info/terminal-info.styl +1 -1
  81. package/client/components/tree-list/bookmark-transport.jsx +8 -9
  82. package/client/components/tree-list/tree-list.jsx +36 -26
  83. package/client/components/vnc/vnc-session.jsx +1 -6
  84. package/client/components/web/address-bar.jsx +50 -0
  85. package/client/components/web/web-session.jsx +32 -10
  86. package/client/entry/index.jsx +5 -6
  87. package/client/store/common.js +1 -1
  88. package/client/store/db-upgrade.js +1 -1
  89. package/client/store/event.js +2 -2
  90. package/client/store/index.js +21 -32
  91. package/client/store/init-state.js +15 -3
  92. package/client/store/load-data.js +1 -1
  93. package/client/store/quick-command.js +4 -4
  94. package/client/store/session.js +1 -1
  95. package/client/store/setting.js +10 -6
  96. package/client/store/system-menu.js +1 -10
  97. package/client/store/tab.js +91 -1
  98. package/client/store/transfer-list.js +5 -6
  99. package/client/store/watch.js +11 -6
  100. package/package.json +1 -1
  101. package/client/components/common/react-subx.jsx +0 -1
  102. package/client/components/common/resize-wrap.jsx +0 -222
  103. package/client/components/common/resize-wrap.styl +0 -9
  104. package/client/components/terminal-info/content.jsx +0 -152
@@ -2,7 +2,7 @@
2
2
  * history select
3
3
  */
4
4
 
5
- import { Component } from '../common/react-subx'
5
+ import { memo } from 'react'
6
6
  import BookmarkSelect from './bookmark-select'
7
7
  import { pick } from 'lodash-es'
8
8
  import { ArrowsAltOutlined, EditOutlined, PlusCircleOutlined, ShrinkOutlined, PushpinOutlined } from '@ant-design/icons'
@@ -10,70 +10,68 @@ import { Tooltip } from 'antd'
10
10
 
11
11
  const e = window.translate
12
12
 
13
- export default class BookmarkPanel extends Component {
14
- render () {
15
- const { props } = this
16
- const { store } = props
17
- const prps = {
18
- className: 'font16 mg1x mg2l pointer iblock control-icon'
19
- }
20
- const prps1 = {
21
- className: prps.className + (store.pinned ? ' pinned' : '')
22
- }
23
- const pop1 = {
24
- ...prps,
25
- onClick: store.onNewSsh
26
- }
27
- const pop2 = {
28
- ...prps,
29
- onClick: store.expandBookmarks
30
- }
31
- const pop3 = {
32
- ...prps,
33
- onClick: store.collapseBookmarks
34
- }
35
- return (
36
- <div
37
- className='sidebar-panel bookmarks-panel animate-fast'
38
- {...pick(props, ['onMouseEnter', 'onMouseLeave'])}
39
- >
40
- <div className='pd1y pd2t pd2x'>
41
- <div className='fix'>
42
- <div className='fleft'>{e('bookmarks')}</div>
43
- <div className='fright'>
44
- <Tooltip title={e('newBookmark')}>
45
- <PlusCircleOutlined
46
- {...pop1}
47
- />
48
- </Tooltip>
49
- <Tooltip title={`${e('edit')} ${e('bookmarks')}`}>
50
- <EditOutlined
51
- {...pop1}
52
- />
53
- </Tooltip>
54
- <Tooltip title={e('expandAll')}>
55
- <ArrowsAltOutlined
56
- {...pop2}
57
- />
58
- </Tooltip>
59
- <Tooltip title={e('collapseAll')}>
60
- <ShrinkOutlined
61
- {...pop3}
62
- />
63
- </Tooltip>
64
- <Tooltip title={e('pin')}>
65
- <PushpinOutlined
66
- {...prps1}
67
- onClick={store.handlePin}
68
- />
69
- </Tooltip>
70
- </div>
13
+ export default memo(function BookmarkPanel (props) {
14
+ const { pinned } = props
15
+ const prps = {
16
+ className: 'font16 mg1x mg2l pointer iblock control-icon'
17
+ }
18
+ const prps1 = {
19
+ className: prps.className + (pinned ? ' pinned' : '')
20
+ }
21
+ const { store } = window
22
+ const pop1 = {
23
+ ...prps,
24
+ onClick: store.onNewSsh
25
+ }
26
+ const pop2 = {
27
+ ...prps,
28
+ onClick: store.expandBookmarks
29
+ }
30
+ const pop3 = {
31
+ ...prps,
32
+ onClick: store.collapseBookmarks
33
+ }
34
+ return (
35
+ <div
36
+ className='sidebar-panel bookmarks-panel animate-fast'
37
+ {...pick(props, ['onMouseEnter', 'onMouseLeave'])}
38
+ >
39
+ <div className='pd1y pd2t pd2x'>
40
+ <div className='fix'>
41
+ <div className='fleft'>{e('bookmarks')}</div>
42
+ <div className='fright'>
43
+ <Tooltip title={e('newBookmark')}>
44
+ <PlusCircleOutlined
45
+ {...pop1}
46
+ />
47
+ </Tooltip>
48
+ <Tooltip title={`${e('edit')} ${e('bookmarks')}`}>
49
+ <EditOutlined
50
+ {...pop1}
51
+ />
52
+ </Tooltip>
53
+ <Tooltip title={e('expandAll')}>
54
+ <ArrowsAltOutlined
55
+ {...pop2}
56
+ />
57
+ </Tooltip>
58
+ <Tooltip title={e('collapseAll')}>
59
+ <ShrinkOutlined
60
+ {...pop3}
61
+ />
62
+ </Tooltip>
63
+ <Tooltip title={e('pin')}>
64
+ <PushpinOutlined
65
+ {...prps1}
66
+ onClick={store.handlePin}
67
+ />
68
+ </Tooltip>
71
69
  </div>
72
70
  </div>
73
- <div className='pd2l sidebar-inner'>
74
- <BookmarkSelect store={store} from='sidebar' />
75
- </div>
76
71
  </div>
77
- )
78
- }
79
- }
72
+ <div className='pd2l sidebar-inner'>
73
+ <BookmarkSelect store={store} from='sidebar' />
74
+ </div>
75
+ </div>
76
+ )
77
+ })
@@ -2,7 +2,7 @@
2
2
  * history select
3
3
  */
4
4
 
5
- import { Component } from '../common/react-subx'
5
+ import { memo } from 'react'
6
6
  import ItemList from '../setting-panel/list'
7
7
  import { pick } from 'lodash-es'
8
8
  import { EditOutlined, PushpinOutlined } from '@ant-design/icons'
@@ -10,55 +10,58 @@ import { Tooltip } from 'antd'
10
10
 
11
11
  const e = window.translate
12
12
 
13
- export default class HistoryPanel extends Component {
14
- render () {
15
- const { props } = this
16
- const { store } = props
17
- const {
18
- openedSideBar
19
- } = store
20
- if (openedSideBar !== 'history') {
21
- return null
22
- }
23
- const prps = {
24
- className: 'font16 mg1x mg2l pointer iblock control-icon'
25
- }
26
- const prps1 = {
27
- className: prps.className + (store.pinned ? ' pinned' : '')
28
- }
29
- return (
30
- <div
31
- className='sidebar-panel history-panel animate-fast'
32
- {...pick(props, ['onMouseEnter', 'onMouseLeave'])}
33
- >
34
- <div className='pd1y pd2t pd2x'>
35
- <div className='fix'>
36
- <div className='fleft'>{e('history')}</div>
37
- <div className='fleft'>
38
- <Tooltip title={`${e('edit')} ${e('history')}`}>
39
- <EditOutlined
40
- className='font16 mg1x mg2l pointer iblock control-icon icon-do-edit'
41
- onClick={store.handleEditHistory}
42
- />
43
- </Tooltip>
44
- <Tooltip title={e('pin')}>
45
- <PushpinOutlined
46
- {...prps1}
47
- onClick={store.handlePin}
48
- />
49
- </Tooltip>
50
- </div>
13
+ export default memo(function HistoryPanel (props) {
14
+ const { store } = window
15
+ const {
16
+ openedSideBar,
17
+ pinned,
18
+ history,
19
+ activeItemId
20
+ } = props
21
+ if (openedSideBar !== 'history') {
22
+ return null
23
+ }
24
+ const prps = {
25
+ className: 'font16 mg1x mg2l pointer iblock control-icon'
26
+ }
27
+ const prps1 = {
28
+ className: prps.className + (pinned ? ' pinned' : '')
29
+ }
30
+ function handleClickItem (item) {
31
+ store.onSelectHistory(item.id)
32
+ }
33
+ return (
34
+ <div
35
+ className='sidebar-panel history-panel animate-fast'
36
+ {...pick(props, ['onMouseEnter', 'onMouseLeave'])}
37
+ >
38
+ <div className='pd1y pd2t pd2x'>
39
+ <div className='fix'>
40
+ <div className='fleft'>{e('history')}</div>
41
+ <div className='fleft'>
42
+ <Tooltip title={`${e('edit')} ${e('history')}`}>
43
+ <EditOutlined
44
+ className='font16 mg1x mg2l pointer iblock control-icon icon-do-edit'
45
+ onClick={store.handleEditHistory}
46
+ />
47
+ </Tooltip>
48
+ <Tooltip title={e('pin')}>
49
+ <PushpinOutlined
50
+ {...prps1}
51
+ onClick={store.handlePin}
52
+ />
53
+ </Tooltip>
51
54
  </div>
52
55
  </div>
53
- <div className='pd2x'>
54
- <ItemList
55
- type='history'
56
- list={store.history || []}
57
- onClickItem={item => store.onSelectHistory(item.id)}
58
- activeItemId={store.activeItemId}
59
- />
60
- </div>
61
56
  </div>
62
- )
63
- }
64
- }
57
+ <div className='pd2x'>
58
+ <ItemList
59
+ type='history'
60
+ list={history || []}
61
+ onClickItem={handleClickItem}
62
+ activeItemId={activeItemId}
63
+ />
64
+ </div>
65
+ </div>
66
+ )
67
+ })
@@ -9,14 +9,12 @@ import {
9
9
  UpCircleOutlined,
10
10
  BarsOutlined
11
11
  } from '@ant-design/icons'
12
-
12
+ import { useRef, memo } from 'react'
13
13
  import { Tooltip } from 'antd'
14
- import { Component } from '../common/react-subx'
15
14
  import BookMarksWrap from './bookmark'
16
15
  import HistoryWrap from './history'
17
16
  import TransferList from './transfer-list'
18
17
  import MenuBtn from '../context-menu/menu-btn'
19
- import InfoModal from './info-modal'
20
18
  import {
21
19
  sidebarWidth,
22
20
  settingMap,
@@ -28,212 +26,225 @@ import './sidebar.styl'
28
26
 
29
27
  const e = window.translate
30
28
 
31
- export default class Sidebar extends Component {
32
- handler = null
29
+ export default memo(function Sidebar (props) {
30
+ const handler = useRef(null)
31
+
32
+ const {
33
+ height,
34
+ upgradeInfo,
35
+ settingTab,
36
+ settingItem,
37
+ isSyncingSetting,
38
+ leftSidebarWidth,
39
+ pinned,
40
+ fileTransfers,
41
+ openedSideBar,
42
+ transferHistory,
43
+ transferTab,
44
+ showModal,
45
+ showInfoModal,
46
+ activeItemId
47
+ } = props
48
+
49
+ const { store } = window
33
50
 
34
- handleMouseLeave = () => {
35
- if (this.props.store.pinned) {
51
+ const handleMouseLeave = () => {
52
+ if (pinned) {
36
53
  return false
37
54
  }
38
- const interval = 400
39
- this.handler = setTimeout(
40
- () => this.props.store.setOpenedSideBar(''),
41
- interval
55
+ handler.current = setTimeout(
56
+ () => store.setOpenedSideBar(''),
57
+ 400
42
58
  )
43
59
  }
44
60
 
45
- handleMouseEnterBookmark = () => {
46
- if (this.props.store.pinned) {
61
+ const handleMouseEnterBookmark = () => {
62
+ if (pinned) {
47
63
  return false
48
64
  }
49
- clearTimeout(this.handler)
50
- this.props.store.setOpenedSideBar('bookmarks')
65
+ clearTimeout(handler.current)
66
+ store.setOpenedSideBar('bookmarks')
51
67
  }
52
68
 
53
- handleMouseEnterHistory = () => {
54
- if (this.props.store.pinned) {
69
+ const handleMouseEnterHistory = () => {
70
+ if (pinned) {
55
71
  return false
56
72
  }
57
- clearTimeout(this.handler)
58
- this.props.store.setOpenedSideBar('history')
73
+ clearTimeout(handler.current)
74
+ store.setOpenedSideBar('history')
59
75
  }
60
76
 
61
- handleShowUpgrade = () => {
62
- this.props.store.storeAssign({
77
+ const handleShowUpgrade = () => {
78
+ store.storeAssign({
63
79
  _upgradeInfo: JSON.stringify({
64
- ...this.props.store.upgradeInfo,
80
+ ...props.store.upgradeInfo,
65
81
  showUpgradeModal: true
66
82
  })
67
83
  })
68
84
  }
69
85
 
70
- render () {
71
- const { store } = this.props
72
- const {
73
- openedSideBar,
74
- onNewSsh,
75
- openSetting,
76
- openAbout,
77
- openSettingSync,
78
- height,
79
- openTerminalThemes,
80
- upgradeInfo,
81
- onClickBookmark,
82
- onClickHistory,
83
- toggleBatchOp,
84
- settingTab,
85
- showModal,
86
- showInfoModal,
87
- settingItem,
88
- isSyncingSetting,
89
- leftSidebarWidth,
90
- setLeftSidePanelWidth
91
- } = store
92
- const {
93
- showUpgradeModal,
94
- upgradePercent,
95
- checkingRemoteVersion,
96
- shouldUpgrade
97
- } = upgradeInfo
98
- const showSetting = showModal === modals.setting
99
- const showBatchOp = showModal === modals.batchOps
100
- const settingActive = showSetting && settingTab === settingMap.setting && settingItem.id === 'setting-common'
101
- const syncActive = showSetting && settingTab === settingMap.setting && settingItem.id === 'setting-sync'
102
- const themeActive = showSetting && settingTab === settingMap.terminalThemes
103
- const historyActive = showSetting && settingTab === settingMap.history
104
- const bookmarksActive = showSetting && settingTab === settingMap.bookmarks
105
- const sideProps = openedSideBar
106
- ? {
107
- className: 'sidebar-list',
108
- style: {
109
- width: `${leftSidebarWidth}px`
110
- }
86
+ const {
87
+ onNewSsh,
88
+ openSetting,
89
+ openAbout,
90
+ openSettingSync,
91
+ openTerminalThemes,
92
+ onClickBookmark,
93
+ onClickHistory,
94
+ toggleBatchOp,
95
+ setLeftSidePanelWidth
96
+ } = store
97
+ const {
98
+ showUpgradeModal,
99
+ upgradePercent,
100
+ checkingRemoteVersion,
101
+ shouldUpgrade
102
+ } = upgradeInfo
103
+ const showSetting = showModal === modals.setting
104
+ const showBatchOp = showModal === modals.batchOps
105
+ const settingActive = showSetting && settingTab === settingMap.setting && settingItem.id === 'setting-common'
106
+ const syncActive = showSetting && settingTab === settingMap.setting && settingItem.id === 'setting-sync'
107
+ const themeActive = showSetting && settingTab === settingMap.terminalThemes
108
+ const historyActive = showSetting && settingTab === settingMap.history
109
+ const bookmarksActive = showSetting && settingTab === settingMap.bookmarks
110
+ const sideProps = openedSideBar
111
+ ? {
112
+ className: 'sidebar-list',
113
+ style: {
114
+ width: `${leftSidebarWidth}px`
111
115
  }
112
- : {
113
- className: 'sidebar-list'
114
- }
115
- const sidebarProps = {
116
- className: `sidebar type-${openedSideBar}`,
117
- style: {
118
- width: sidebarWidth,
119
- height
120
116
  }
117
+ : {
118
+ className: 'sidebar-list'
119
+ }
120
+ const sidebarProps = {
121
+ className: `sidebar type-${openedSideBar}`,
122
+ style: {
123
+ width: sidebarWidth,
124
+ height
121
125
  }
122
- return (
123
- <div {...sidebarProps}>
124
- <div className='sidebar-bar btns'>
125
- <div className='control-icon-wrap'>
126
- <MenuBtn store={store} config={store.config} />
127
- </div>
128
- <SideIcon
129
- title={e('newBookmark')}
130
- >
131
- <PlusCircleOutlined
132
- className='font22 iblock control-icon'
133
- onClick={onNewSsh}
134
- />
135
- </SideIcon>
136
- <SideIcon
137
- title={e(settingMap.bookmarks)}
138
- active={bookmarksActive}
139
- >
140
- <BookOutlined
141
- onMouseEnter={this.handleMouseEnterBookmark}
142
- onMouseLeave={this.handleMouseLeave}
143
- onClick={onClickBookmark}
144
- className='font20 iblock control-icon'
145
- />
146
- </SideIcon>
147
- <SideIcon
148
- title={e(settingMap.history)}
149
- active={historyActive}
150
- >
151
- <ClockCircleOutlined
152
- onMouseEnter={this.handleMouseEnterHistory}
153
- onMouseLeave={this.handleMouseLeave}
154
- onClick={onClickHistory}
155
- className='font20 iblock control-icon'
156
- />
157
- </SideIcon>
158
- <TransferList store={store} />
159
- <SideIcon
160
- title={e(settingMap.terminalThemes)}
161
- active={themeActive}
162
- >
163
- <PictureOutlined
164
- className='font20 iblock pointer control-icon'
165
- onClick={openTerminalThemes}
166
- />
167
- </SideIcon>
168
- <SideIcon
169
- title={e(settingMap.setting)}
170
- active={settingActive}
171
- >
172
- <SettingOutlined className='iblock font20 control-icon' onClick={openSetting} />
173
- </SideIcon>
174
- <SideIcon
175
- title={e('settingSync')}
176
- active={syncActive}
177
- >
178
- <CloudSyncOutlined
179
- className='iblock font20 control-icon'
180
- onClick={openSettingSync}
181
- spin={isSyncingSetting}
182
- />
183
- </SideIcon>
184
- <SideIcon
185
- title={e('batchOp')}
186
- active={showBatchOp}
187
- >
188
- <BarsOutlined className='iblock font20 control-icon' onClick={toggleBatchOp} />
189
- </SideIcon>
190
- <SideIcon
191
- title={e('about')}
192
- active={showInfoModal}
193
- >
194
- <InfoCircleOutlined
195
- className='iblock font16 control-icon open-about-icon'
196
- onClick={openAbout}
197
- />
198
- </SideIcon>
199
- {
200
- !checkingRemoteVersion && !showUpgradeModal && shouldUpgrade
201
- ? (
202
- <Tooltip
203
- title={`${e('upgrading')} ${upgradePercent || 0}%`}
204
- placement='right'
205
- >
206
- <div
207
- className='control-icon-wrap'
208
- >
209
- <UpCircleOutlined
210
- className='iblock font18 control-icon hvr-bob upgrade-icon'
211
- onClick={this.handleShowUpgrade}
212
- />
213
- </div>
214
- </Tooltip>
215
- )
216
- : null
217
- }
126
+ }
127
+ const transferProps = {
128
+ fileTransfers,
129
+ transferTab,
130
+ transferHistory
131
+ }
132
+ return (
133
+ <div {...sidebarProps}>
134
+ <div className='sidebar-bar btns'>
135
+ <div className='control-icon-wrap'>
136
+ <MenuBtn store={store} config={store.config} />
218
137
  </div>
219
- <InfoModal store={store} />
220
- <SidePanel
221
- sideProps={sideProps}
222
- setLeftSidePanelWidth={setLeftSidePanelWidth}
223
- leftSidebarWidth={leftSidebarWidth}
138
+ <SideIcon
139
+ title={e('newBookmark')}
140
+ >
141
+ <PlusCircleOutlined
142
+ className='font22 iblock control-icon'
143
+ onClick={onNewSsh}
144
+ />
145
+ </SideIcon>
146
+ <SideIcon
147
+ title={e(settingMap.bookmarks)}
148
+ active={bookmarksActive}
224
149
  >
225
- <BookMarksWrap
226
- store={store}
227
- onMouseEnter={this.handleMouseEnterBookmark}
228
- onMouseLeave={this.handleMouseLeave}
150
+ <BookOutlined
151
+ onMouseEnter={handleMouseEnterBookmark}
152
+ onMouseLeave={handleMouseLeave}
153
+ onClick={onClickBookmark}
154
+ className='font20 iblock control-icon'
229
155
  />
230
- <HistoryWrap
231
- store={store}
232
- onMouseEnter={this.handleMouseEnterHistory}
233
- onMouseLeave={this.handleMouseLeave}
156
+ </SideIcon>
157
+ <SideIcon
158
+ title={e(settingMap.history)}
159
+ active={historyActive}
160
+ >
161
+ <ClockCircleOutlined
162
+ onMouseEnter={handleMouseEnterHistory}
163
+ onMouseLeave={handleMouseLeave}
164
+ onClick={onClickHistory}
165
+ className='font20 iblock control-icon'
234
166
  />
235
- </SidePanel>
167
+ </SideIcon>
168
+ <TransferList {...transferProps} />
169
+ <SideIcon
170
+ title={e(settingMap.terminalThemes)}
171
+ active={themeActive}
172
+ >
173
+ <PictureOutlined
174
+ className='font20 iblock pointer control-icon'
175
+ onClick={openTerminalThemes}
176
+ />
177
+ </SideIcon>
178
+ <SideIcon
179
+ title={e(settingMap.setting)}
180
+ active={settingActive}
181
+ >
182
+ <SettingOutlined className='iblock font20 control-icon' onClick={openSetting} />
183
+ </SideIcon>
184
+ <SideIcon
185
+ title={e('settingSync')}
186
+ active={syncActive}
187
+ >
188
+ <CloudSyncOutlined
189
+ className='iblock font20 control-icon'
190
+ onClick={openSettingSync}
191
+ spin={isSyncingSetting}
192
+ />
193
+ </SideIcon>
194
+ <SideIcon
195
+ title={e('batchOp')}
196
+ active={showBatchOp}
197
+ >
198
+ <BarsOutlined className='iblock font20 control-icon' onClick={toggleBatchOp} />
199
+ </SideIcon>
200
+ <SideIcon
201
+ title={e('about')}
202
+ active={showInfoModal}
203
+ >
204
+ <InfoCircleOutlined
205
+ className='iblock font16 control-icon open-about-icon'
206
+ onClick={openAbout}
207
+ />
208
+ </SideIcon>
209
+ {
210
+ !checkingRemoteVersion && !showUpgradeModal && shouldUpgrade
211
+ ? (
212
+ <Tooltip
213
+ title={`${e('upgrading')} ${upgradePercent || 0}%`}
214
+ placement='right'
215
+ >
216
+ <div
217
+ className='control-icon-wrap'
218
+ >
219
+ <UpCircleOutlined
220
+ className='iblock font18 control-icon hvr-bob upgrade-icon'
221
+ onClick={handleShowUpgrade}
222
+ />
223
+ </div>
224
+ </Tooltip>
225
+ )
226
+ : null
227
+ }
236
228
  </div>
237
- )
238
- }
239
- }
229
+ <SidePanel
230
+ sideProps={sideProps}
231
+ setLeftSidePanelWidth={setLeftSidePanelWidth}
232
+ leftSidebarWidth={leftSidebarWidth}
233
+ >
234
+ <BookMarksWrap
235
+ pinned={pinned}
236
+ onMouseEnter={handleMouseEnterBookmark}
237
+ onMouseLeave={handleMouseLeave}
238
+ />
239
+ <HistoryWrap
240
+ history={props.history}
241
+ openedSideBar={openedSideBar}
242
+ onMouseEnter={handleMouseEnterHistory}
243
+ onMouseLeave={handleMouseLeave}
244
+ activeItemId={activeItemId}
245
+ pinned={pinned}
246
+ />
247
+ </SidePanel>
248
+ </div>
249
+ )
250
+ })