@electerm/electerm-react 1.38.80 → 1.38.83

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.
@@ -9,7 +9,7 @@ import {
9
9
  Table
10
10
  } from 'antd'
11
11
  import { useState } from 'react'
12
- import { PlusOutlined, QuestionCircleOutlined, MinusCircleFilled } from '@ant-design/icons'
12
+ import { PlusOutlined, QuestionCircleOutlined, MinusCircleFilled, UserOutlined } from '@ant-design/icons'
13
13
  import { formItemLayout, tailFormItemLayout } from '../../common/form-layout'
14
14
  import uid from '../../common/uid'
15
15
 
@@ -135,6 +135,19 @@ export default function renderSshTunnels (props) {
135
135
  )
136
136
  }
137
137
 
138
+ // direction = localToRemote or remoteToLocal, should render user, remote port, local port visit directions connected with arrows accordingly
139
+ function renderSshTunnelFlow (direction) {
140
+ const localToRemote = direction === 'localToRemote'
141
+ const middle = localToRemote ? e('local') : e('remote')
142
+ const last = localToRemote ? e('remote') : e('local')
143
+ return (
144
+ <div>
145
+ <p>{e(direction)}</p>
146
+ <p><UserOutlined /> → {middle} → {last}</p>
147
+ </div>
148
+ )
149
+ }
150
+
138
151
  return (
139
152
  <div>
140
153
  <FormItem
@@ -159,14 +172,14 @@ export default function renderSshTunnels (props) {
159
172
  <RadioButton
160
173
  value='forwardRemoteToLocal'
161
174
  >
162
- <Tooltip title={e('remoteToLocal')}>
175
+ <Tooltip title={renderSshTunnelFlow('remoteToLocal')}>
163
176
  <span>R→L <QuestionCircleOutlined /></span>
164
177
  </Tooltip>
165
178
  </RadioButton>
166
179
  <RadioButton
167
180
  value='forwardLocalToRemote'
168
181
  >
169
- <Tooltip title={e('localToRemote')}>
182
+ <Tooltip title={renderSshTunnelFlow('localToRemote')}>
170
183
  <span>L→R <QuestionCircleOutlined /></span>
171
184
  </Tooltip>
172
185
  </RadioButton>
@@ -120,6 +120,7 @@ export default class Sftp extends Component {
120
120
  componentWillUnmount () {
121
121
  this.destroyEvent()
122
122
  this.sftp && this.sftp.destroy()
123
+ delete this.sftp
123
124
  clearTimeout(this.timer4)
124
125
  }
125
126
 
@@ -119,14 +119,15 @@ export default class Sidebar extends Component {
119
119
  : {
120
120
  className: 'sidebar-list'
121
121
  }
122
+ const sidebarProps = {
123
+ className: `sidebar type-${openedSideBar}`,
124
+ style: {
125
+ width: sidebarWidth,
126
+ height
127
+ }
128
+ }
122
129
  return (
123
- <div
124
- className={`sidebar type-${openedSideBar}`}
125
- style={{
126
- width: sidebarWidth,
127
- height
128
- }}
129
- >
130
+ <div {...sidebarProps}>
130
131
  <div className='sidebar-bar btns'>
131
132
  <div className='control-icon-wrap'>
132
133
  <MenuBtn store={store} config={store.config} />
@@ -115,6 +115,11 @@
115
115
  animation-fill-mode forwards
116
116
  animation-direction normal, alternate
117
117
 
118
+ .hvr-bob-fast
119
+ transform perspective(2px) translateZ(0)
120
+ animation-duration .15s, .3s
121
+ animation-delay 0s, .15s
122
+
118
123
  .btns .upgrade-icon
119
124
  color success
120
125
  .close-info-modal
@@ -19,12 +19,14 @@ export default class TransferList extends Component {
19
19
  fileTransfers,
20
20
  transferHistory
21
21
  } = store
22
- if (!fileTransfers.length && !transferHistory.length) {
22
+ const len = fileTransfers.length
23
+ if (!len && !transferHistory.length) {
23
24
  return null
24
25
  }
25
26
  const color = fileTransfers.some(item => item.error) ? 'red' : 'green'
26
27
  const bdProps = {
27
- count: fileTransfers.length,
28
+ className: len ? 'hvr-bob hvr-bob-fast' : '',
29
+ count: len,
28
30
  size: 'small',
29
31
  offset: [-10, -5],
30
32
  color,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.38.80",
3
+ "version": "1.38.83",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",