@electerm/electerm-react 1.37.38 → 1.37.46
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.
- package/client/common/update-check.js +7 -1
- package/client/components/main/upgrade.jsx +3 -2
- package/client/components/sftp/sftp-entry.jsx +6 -6
- package/client/components/shortcuts/shortcuts-defaults.js +0 -1
- package/client/components/tabs/index.jsx +8 -4
- package/client/components/tabs/tabs.styl +5 -0
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ import fetch from './fetch-from-server'
|
|
|
6
6
|
import {
|
|
7
7
|
baseUpdateCheckUrls, packInfo
|
|
8
8
|
} from './constants'
|
|
9
|
+
import dayjs from 'dayjs'
|
|
9
10
|
|
|
10
11
|
async function fetchData (url, options) {
|
|
11
12
|
const data = {
|
|
@@ -75,5 +76,10 @@ export async function getLatestReleaseInfo () {
|
|
|
75
76
|
url = `${baseUpdateCheckUrls[1]}/data/electerm-github-release.json`
|
|
76
77
|
res = await getInfo(url)
|
|
77
78
|
}
|
|
78
|
-
return res
|
|
79
|
+
return res && res.release
|
|
80
|
+
? {
|
|
81
|
+
body: res.release.body,
|
|
82
|
+
date: dayjs(res.release.published_at).format('YYYY-MM-DD')
|
|
83
|
+
}
|
|
84
|
+
: undefined
|
|
79
85
|
}
|
|
@@ -246,7 +246,7 @@ export default class Upgrade extends PureComponent {
|
|
|
246
246
|
return (
|
|
247
247
|
<div className='pd1t'>
|
|
248
248
|
<div className='bold'>Changelog:</div>
|
|
249
|
-
<Markdown text={releaseInfo} />
|
|
249
|
+
<Markdown text={releaseInfo.body} />
|
|
250
250
|
<Link
|
|
251
251
|
to={packInfo.releases}
|
|
252
252
|
>{e('moreChangeLog')}
|
|
@@ -279,6 +279,7 @@ export default class Upgrade extends PureComponent {
|
|
|
279
279
|
showUpgradeModal,
|
|
280
280
|
upgradePercent,
|
|
281
281
|
shouldUpgrade,
|
|
282
|
+
releaseInfo,
|
|
282
283
|
error
|
|
283
284
|
} = this.props.upgradeInfo
|
|
284
285
|
if (error) {
|
|
@@ -317,7 +318,7 @@ export default class Upgrade extends PureComponent {
|
|
|
317
318
|
<div className={cls}>
|
|
318
319
|
<div className='upgrade-panel-title'>
|
|
319
320
|
<MinusSquareOutlined className='pointer font16 close-upgrade-panel' onClick={this.handleMinimize} />
|
|
320
|
-
{e('newVersion')} <b>{remoteVersion}</b>
|
|
321
|
+
{e('newVersion')} <b>{remoteVersion} [{releaseInfo.date}]</b>
|
|
321
322
|
</div>
|
|
322
323
|
<div className='upgrade-panel-body'>
|
|
323
324
|
{
|
|
@@ -373,11 +373,11 @@ export default class Sftp extends Component {
|
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
doCopy = (type, e) => {
|
|
376
|
-
this[type + 'Dom'].onCopy(
|
|
376
|
+
this[type + 'Dom'].onCopy(this.state.selectedFiles)
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
doCut = (type, e) => {
|
|
380
|
-
this[type + 'Dom'].onCut(
|
|
380
|
+
this[type + 'Dom'].onCut(this.state.selectedFiles)
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
doPaste = (type) => {
|
|
@@ -396,7 +396,7 @@ export default class Sftp extends Component {
|
|
|
396
396
|
}
|
|
397
397
|
const { type } = lastClickedFile
|
|
398
398
|
const { inputFocus, onDelete } = this
|
|
399
|
-
if (keyControlPressed(e) && keyPressed(e, '
|
|
399
|
+
if (keyControlPressed(e) && keyPressed(e, 'keyA') && !inputFocus) {
|
|
400
400
|
e.stopPropagation()
|
|
401
401
|
this.selectAll(type, e)
|
|
402
402
|
} else if (keyPressed(e, 'arrowdown') && !inputFocus) {
|
|
@@ -411,13 +411,13 @@ export default class Sftp extends Component {
|
|
|
411
411
|
} else if (keyPressed(e, 'enter') && !inputFocus && !onDelete) {
|
|
412
412
|
e.stopPropagation()
|
|
413
413
|
this.enter(type, e)
|
|
414
|
-
} else if (keyControlPressed(e) && keyPressed(e, '
|
|
414
|
+
} else if (keyControlPressed(e) && keyPressed(e, 'keyC') && !inputFocus) {
|
|
415
415
|
e.stopPropagation()
|
|
416
416
|
this.doCopy(type, e)
|
|
417
|
-
} else if (keyControlPressed(e) && keyPressed(e, '
|
|
417
|
+
} else if (keyControlPressed(e) && keyPressed(e, 'keyX') && !inputFocus) {
|
|
418
418
|
e.stopPropagation()
|
|
419
419
|
this.doCut(type, e)
|
|
420
|
-
} else if (keyControlPressed(e) && keyPressed(e, '
|
|
420
|
+
} else if (keyControlPressed(e) && keyPressed(e, 'keyV') && !inputFocus) {
|
|
421
421
|
e.stopPropagation()
|
|
422
422
|
this.doPaste(type, e)
|
|
423
423
|
} else if (keyPressed(e, 'f5')) {
|
|
@@ -23,6 +23,7 @@ import findParentBySel from '../../common/find-parent'
|
|
|
23
23
|
import WindowControl from './window-control'
|
|
24
24
|
import BookmarksList from '../sidebar/bookmark-select'
|
|
25
25
|
import AppDrag from './app-drag'
|
|
26
|
+
import classNames from 'classnames'
|
|
26
27
|
|
|
27
28
|
const { prefix } = window
|
|
28
29
|
const e = prefix('tabs')
|
|
@@ -176,16 +177,19 @@ export default class Tabs extends React.Component {
|
|
|
176
177
|
}
|
|
177
178
|
|
|
178
179
|
renderAddBtn = () => {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
const cls = classNames(
|
|
181
|
+
'pointer tabs-add-btn font16',
|
|
182
|
+
{
|
|
183
|
+
empty: !this.props.tabs.length
|
|
184
|
+
}
|
|
185
|
+
)
|
|
182
186
|
return (
|
|
183
187
|
<Popover
|
|
184
188
|
content={this.renderMenus()}
|
|
185
189
|
>
|
|
186
190
|
<PlusCircleOutlined
|
|
187
191
|
title={e('openNewTerm')}
|
|
188
|
-
className=
|
|
192
|
+
className={cls}
|
|
189
193
|
onClick={() => this.props.addTab()}
|
|
190
194
|
/>
|
|
191
195
|
</Popover>
|
|
@@ -121,6 +121,10 @@
|
|
|
121
121
|
margin 10px 3px 0 3px
|
|
122
122
|
-webkit-app-region no-drag
|
|
123
123
|
color text
|
|
124
|
+
&.empty
|
|
125
|
+
font-size 20px
|
|
126
|
+
margin-left 20px
|
|
127
|
+
margin-top 20px
|
|
124
128
|
&:hover
|
|
125
129
|
color text-light
|
|
126
130
|
.tabs-extra
|
|
@@ -131,6 +135,7 @@
|
|
|
131
135
|
line-height 20px
|
|
132
136
|
z-index 20
|
|
133
137
|
-webkit-app-region no-drag
|
|
138
|
+
|
|
134
139
|
// .ant-btn
|
|
135
140
|
// background #333
|
|
136
141
|
// color #aaa
|