@electerm/electerm-react 1.51.3 → 1.51.8
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/constants.js +1 -2
- package/client/common/db.js +10 -9
- package/client/components/batch-op/batch-op.jsx +16 -5
- package/client/components/bookmark-form/index.jsx +1 -1
- package/client/components/bookmark-form/ssh-form.jsx +3 -23
- package/client/components/bookmark-form/use-submit.jsx +6 -15
- package/client/components/context-menu/context-menu.styl +5 -5
- package/client/components/context-menu/history.jsx +2 -11
- package/client/components/context-menu/sub-tab-menu.jsx +1 -1
- package/client/components/footer/footer-entry.jsx +1 -6
- package/client/components/layout/layout-item.jsx +2 -2
- package/client/components/main/main.jsx +9 -5
- package/client/components/session/session.jsx +15 -1
- package/client/components/session/session.styl +3 -2
- package/client/components/setting-panel/list.styl +0 -1
- package/client/components/setting-panel/on-tree-drop.js +5 -5
- package/client/components/setting-panel/setting-modal.jsx +0 -12
- package/client/components/sftp/confirm-modal-store.jsx +0 -7
- package/client/components/sftp/file-mode-modal.jsx +2 -2
- package/client/components/sftp/sftp-entry.jsx +2 -2
- package/client/components/sftp/transfer-conflict-store.jsx +69 -66
- package/client/components/sftp/transport-action-store.jsx +32 -50
- package/client/components/sftp/transports-action-store.jsx +15 -15
- package/client/components/sftp/transports-ui-store.jsx +9 -5
- package/client/components/sidebar/bookmark-select.jsx +1 -1
- package/client/components/sidebar/bookmark.jsx +4 -63
- package/client/components/sidebar/history-item.jsx +34 -0
- package/client/components/sidebar/history.jsx +17 -52
- package/client/components/sidebar/index.jsx +4 -34
- package/client/components/sidebar/sidebar-panel.jsx +107 -0
- package/client/components/sidebar/sidebar.styl +14 -0
- package/client/components/sidebar/transfer-list-control.jsx +1 -0
- package/client/components/sidebar/transfer.styl +1 -1
- package/client/components/sidebar/transport-ui.jsx +179 -37
- package/client/components/tabs/index.jsx +4 -4
- package/client/components/tabs/tab.jsx +19 -10
- package/client/components/tree-list/tree-list.jsx +8 -10
- package/client/entry/worker.js +5 -3
- package/client/store/bookmark-group.js +3 -5
- package/client/store/common.js +11 -1
- package/client/store/db-upgrade.js +0 -2
- package/client/store/index.js +0 -3
- package/client/store/init-state.js +4 -3
- package/client/store/item.js +0 -19
- package/client/store/load-data.js +2 -0
- package/client/store/setting.js +2 -51
- package/client/store/sidebar.js +7 -8
- package/client/store/sync.js +7 -7
- package/client/store/tab.js +72 -4
- package/client/store/transfer-history.js +3 -9
- package/client/store/transfer-list.js +75 -75
- package/client/store/watch.js +9 -1
- package/package.json +1 -1
- package/client/components/setting-panel/tab-history.jsx +0 -43
|
@@ -38,7 +38,7 @@ export const contextMenuPaddingTop = 10
|
|
|
38
38
|
export const sftpControlHeight = 42 + 30
|
|
39
39
|
export const sidebarWidth = 43
|
|
40
40
|
export const maxHistory = 50
|
|
41
|
-
export const maxTransport =
|
|
41
|
+
export const maxTransport = 5
|
|
42
42
|
export const maxSftpHistory = 20
|
|
43
43
|
export const maxZoom = 8
|
|
44
44
|
export const minZoom = 0.5
|
|
@@ -98,7 +98,6 @@ export const paneMap = buildConst([
|
|
|
98
98
|
export const settingMap = buildConst([
|
|
99
99
|
'setting',
|
|
100
100
|
'bookmarks',
|
|
101
|
-
'history',
|
|
102
101
|
'terminalThemes',
|
|
103
102
|
'bookmarkGroups',
|
|
104
103
|
'quickCommands',
|
package/client/common/db.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import {
|
|
6
6
|
settingMap
|
|
7
7
|
} from '../common/constants'
|
|
8
|
-
import { without, isArray
|
|
8
|
+
import { without, isArray } from 'lodash-es'
|
|
9
9
|
import handleError from './error-handler'
|
|
10
10
|
import generate from './uid'
|
|
11
11
|
import safeParse from './to-simple-obj'
|
|
@@ -30,8 +30,7 @@ export const dbNames = without(
|
|
|
30
30
|
|
|
31
31
|
export const dbNamesForWatch = without(
|
|
32
32
|
Object.keys(settingMap),
|
|
33
|
-
settingMap.setting
|
|
34
|
-
settingMap.history
|
|
33
|
+
settingMap.setting
|
|
35
34
|
)
|
|
36
35
|
|
|
37
36
|
/**
|
|
@@ -146,10 +145,12 @@ export async function getData (name) {
|
|
|
146
145
|
export async function fetchInitData (dbName) {
|
|
147
146
|
const res = await find(dbName)
|
|
148
147
|
const order = await getData(`${dbName}:order`)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
148
|
+
if (order && order.length) {
|
|
149
|
+
res.sort((a, b) => {
|
|
150
|
+
const ai = order.findIndex(r => r === a.id)
|
|
151
|
+
const bi = order.findIndex(r => r === b.id)
|
|
152
|
+
return ai - bi
|
|
153
|
+
})
|
|
154
|
+
}
|
|
155
|
+
return JSON.stringify(res)
|
|
155
156
|
}
|
|
@@ -173,11 +173,15 @@ export default class BatchOp extends PureComponent {
|
|
|
173
173
|
run = async (conf, index) => {
|
|
174
174
|
this.updateState('working', index)
|
|
175
175
|
let tab = await this.createTab(conf)
|
|
176
|
-
.then(r => r)
|
|
177
176
|
.catch(err => {
|
|
177
|
+
console.log('create tab error', err)
|
|
178
|
+
if (this.ref) {
|
|
179
|
+
this.ref.stop()
|
|
180
|
+
delete this.ref
|
|
181
|
+
}
|
|
178
182
|
return 'Error: ' + err.message
|
|
179
183
|
})
|
|
180
|
-
if (
|
|
184
|
+
if (typeof tab === 'string') {
|
|
181
185
|
return this.updateState(tab, index)
|
|
182
186
|
}
|
|
183
187
|
|
|
@@ -189,9 +193,16 @@ export default class BatchOp extends PureComponent {
|
|
|
189
193
|
}
|
|
190
194
|
if (conf.remotePath) {
|
|
191
195
|
this.updateState('creating sftp', index)
|
|
192
|
-
tab = await this.createSftp(tab)
|
|
193
|
-
|
|
194
|
-
|
|
196
|
+
tab = await this.createSftp(tab).catch(err => {
|
|
197
|
+
console.log('create sftp error', err)
|
|
198
|
+
if (this.ref2) {
|
|
199
|
+
this.ref2.stop()
|
|
200
|
+
delete this.ref2
|
|
201
|
+
}
|
|
202
|
+
return 'Error: ' + err.message
|
|
203
|
+
})
|
|
204
|
+
if (typeof tab === 'string') {
|
|
205
|
+
return this.updateState(tab, index)
|
|
195
206
|
}
|
|
196
207
|
this.updateState('sftp created', index)
|
|
197
208
|
this.updateState('transferring file', index)
|
|
@@ -125,7 +125,7 @@ export default class BookmarkIndex extends PureComponent {
|
|
|
125
125
|
const {
|
|
126
126
|
type
|
|
127
127
|
} = this.props
|
|
128
|
-
if (type !== settingMap.bookmarks
|
|
128
|
+
if (type !== settingMap.bookmarks) {
|
|
129
129
|
return null
|
|
130
130
|
}
|
|
131
131
|
const { ready } = this.state
|
|
@@ -5,7 +5,7 @@ import { PureComponent } from 'react'
|
|
|
5
5
|
import {
|
|
6
6
|
message
|
|
7
7
|
} from 'antd'
|
|
8
|
-
import {
|
|
8
|
+
import { uniq, isEqual, pick } from 'lodash-es'
|
|
9
9
|
import copy from 'json-deep-copy'
|
|
10
10
|
import generate from '../../common/uid'
|
|
11
11
|
import {
|
|
@@ -96,13 +96,11 @@ export default class BookmarkForm extends PureComponent {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
updateBookmarkGroups = (bookmarkGroups, bookmark, categoryId) => {
|
|
99
|
-
let index = findIndex(
|
|
100
|
-
bookmarkGroups,
|
|
99
|
+
let index = bookmarkGroups.findIndex(
|
|
101
100
|
bg => bg.id === categoryId
|
|
102
101
|
)
|
|
103
102
|
if (index < 0) {
|
|
104
|
-
index = findIndex(
|
|
105
|
-
bookmarkGroups,
|
|
103
|
+
index = bookmarkGroups.findIndex(
|
|
106
104
|
bg => bg.id === defaultBookmarkGroupId
|
|
107
105
|
)
|
|
108
106
|
}
|
|
@@ -167,19 +165,6 @@ export default class BookmarkForm extends PureComponent {
|
|
|
167
165
|
const bookmarkGroups = copy(
|
|
168
166
|
this.props.bookmarkGroups
|
|
169
167
|
)
|
|
170
|
-
if (type === settingMap.history) {
|
|
171
|
-
obj.id = generate()
|
|
172
|
-
runIdle(() => {
|
|
173
|
-
addItem(obj, settingMap.bookmarks)
|
|
174
|
-
})
|
|
175
|
-
this.updateBookmarkGroups(
|
|
176
|
-
bookmarkGroups,
|
|
177
|
-
obj,
|
|
178
|
-
categoryId
|
|
179
|
-
)
|
|
180
|
-
message.success('OK', 3)
|
|
181
|
-
return
|
|
182
|
-
}
|
|
183
168
|
if (!obj.id.startsWith(newBookmarkIdPrefix)) {
|
|
184
169
|
const tar = copy(obj)
|
|
185
170
|
delete tar.id
|
|
@@ -196,11 +181,6 @@ export default class BookmarkForm extends PureComponent {
|
|
|
196
181
|
}
|
|
197
182
|
} else {
|
|
198
183
|
obj.id = generate()
|
|
199
|
-
if (evt !== 'save' && evt !== 'saveAndCreateNew') {
|
|
200
|
-
runIdle(() => {
|
|
201
|
-
addItem(obj, settingMap.history)
|
|
202
|
-
})
|
|
203
|
-
}
|
|
204
184
|
runIdle(() => {
|
|
205
185
|
addItem(obj, settingMap.bookmarks)
|
|
206
186
|
})
|
|
@@ -10,9 +10,6 @@ import {
|
|
|
10
10
|
Button,
|
|
11
11
|
Form
|
|
12
12
|
} from 'antd'
|
|
13
|
-
import {
|
|
14
|
-
settingMap
|
|
15
|
-
} from '../../common/constants'
|
|
16
13
|
import { tailFormItemLayout } from '../../common/form-layout'
|
|
17
14
|
import useFuncs from './use-form-funcs'
|
|
18
15
|
|
|
@@ -37,18 +34,12 @@ export default function useBookmarkSubmit (props) {
|
|
|
37
34
|
className='mg1r mg1b'
|
|
38
35
|
>{e('saveAndConnect')}
|
|
39
36
|
</Button>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
className='mg1r mg1b'
|
|
47
|
-
onClick={saveAndCreateNew}
|
|
48
|
-
>{e('saveAndCreateNew')}
|
|
49
|
-
</Button>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
37
|
+
<Button
|
|
38
|
+
type='primary'
|
|
39
|
+
className='mg1r mg1b'
|
|
40
|
+
onClick={saveAndCreateNew}
|
|
41
|
+
>{e('saveAndCreateNew')}
|
|
42
|
+
</Button>
|
|
52
43
|
<Button
|
|
53
44
|
type='dashed'
|
|
54
45
|
className='mg1r mg1b'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.context-menu
|
|
3
3
|
position: absolute
|
|
4
4
|
width 280px
|
|
5
|
-
background main
|
|
5
|
+
background main
|
|
6
6
|
box-shadow 0px 0px 3px 3px alpha(main-dark, .35)
|
|
7
7
|
padding 10px 0
|
|
8
8
|
z-index 999
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
line-height 28px
|
|
21
21
|
padding 0 16px
|
|
22
22
|
&:hover
|
|
23
|
-
background #
|
|
23
|
+
background #08c
|
|
24
24
|
color #eee
|
|
25
25
|
cursor pointer
|
|
26
26
|
&.disabled
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
position absolute
|
|
48
48
|
left 100%
|
|
49
49
|
top 0
|
|
50
|
-
background main
|
|
50
|
+
background main
|
|
51
51
|
box-shadow 0px 0px 3px 3px alpha(main, .35)
|
|
52
52
|
max-height 300px
|
|
53
53
|
overflow-y scroll
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
white-space nowrap
|
|
63
63
|
text-overflow ellipsis
|
|
64
64
|
&:hover, &.active
|
|
65
|
-
background-color
|
|
66
|
-
color
|
|
65
|
+
background-color #08c
|
|
66
|
+
color #eee
|
|
67
67
|
.bookmarks-sub-context-menu
|
|
68
68
|
width 380px
|
|
69
69
|
padding 20px 10px 10px 20px
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import HistoryItem from '../sidebar/history-item'
|
|
2
2
|
|
|
3
3
|
export default function HistorySubMenu (props) {
|
|
4
|
-
const { store } = window
|
|
5
4
|
return (
|
|
6
5
|
<div className='sub-context-menu'>
|
|
7
6
|
{
|
|
8
7
|
props.history.map(item => {
|
|
9
|
-
const title = createTitleWithTag(item)
|
|
10
8
|
return (
|
|
11
|
-
<
|
|
12
|
-
className='sub-context-menu-item'
|
|
13
|
-
title={title}
|
|
14
|
-
key={item.id}
|
|
15
|
-
onClick={() => store.onSelectHistory(item.id)}
|
|
16
|
-
>
|
|
17
|
-
{title}
|
|
18
|
-
</div>
|
|
9
|
+
<HistoryItem key={item.id} item={item} />
|
|
19
10
|
)
|
|
20
11
|
})
|
|
21
12
|
}
|
|
@@ -3,7 +3,7 @@ import { createTitleWithTag } from '../../common/create-title'
|
|
|
3
3
|
|
|
4
4
|
export default class TabsSubMenuChild extends PureComponent {
|
|
5
5
|
handleClick = () => {
|
|
6
|
-
window.store.
|
|
6
|
+
window.store.changeActiveTabId(this.props.item.id)
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
render () {
|
|
@@ -18,12 +18,7 @@ const e = window.translate
|
|
|
18
18
|
|
|
19
19
|
export default auto(function FooterEntry (props) {
|
|
20
20
|
function handleInfoPanel () {
|
|
21
|
-
|
|
22
|
-
store.rightPanelVisible = !store.rightPanelVisible
|
|
23
|
-
postMessage({
|
|
24
|
-
action: terminalActions.showInfoPanel,
|
|
25
|
-
activeTabId: store.activeTabId
|
|
26
|
-
})
|
|
21
|
+
window.store.openInfoPanel()
|
|
27
22
|
}
|
|
28
23
|
|
|
29
24
|
function batchInput (cmd, selectedTabIds) {
|
|
@@ -18,8 +18,8 @@ export default function LayoutItem (props) {
|
|
|
18
18
|
}
|
|
19
19
|
let currentElement = target
|
|
20
20
|
while (currentElement) {
|
|
21
|
-
if (currentElement.classList && currentElement.classList.contains('
|
|
22
|
-
|
|
21
|
+
if (currentElement.classList && currentElement.classList.contains('layout-item')) {
|
|
22
|
+
break
|
|
23
23
|
}
|
|
24
24
|
currentElement = currentElement.parentElement
|
|
25
25
|
}
|
|
@@ -27,6 +27,7 @@ import { ConfigProvider, notification, message } from 'antd'
|
|
|
27
27
|
import InfoModal from '../sidebar/info-modal.jsx'
|
|
28
28
|
import RightSidePanel from '../side-panel-r/side-panel-r'
|
|
29
29
|
import { pick } from 'lodash-es'
|
|
30
|
+
import deepCopy from 'json-deep-copy'
|
|
30
31
|
import './wrapper.styl'
|
|
31
32
|
|
|
32
33
|
function setupGlobalMessageDismiss () {
|
|
@@ -131,6 +132,8 @@ export default auto(function Index (props) {
|
|
|
131
132
|
opacity: config.opacity
|
|
132
133
|
}
|
|
133
134
|
}
|
|
135
|
+
const copiedTransfer = deepCopy(fileTransfers)
|
|
136
|
+
const copiedHistory = deepCopy(transferHistory)
|
|
134
137
|
const sidebarProps = {
|
|
135
138
|
...pick(store, [
|
|
136
139
|
'activeItemId',
|
|
@@ -143,10 +146,11 @@ export default auto(function Index (props) {
|
|
|
143
146
|
'settingItem',
|
|
144
147
|
'isSyncingSetting',
|
|
145
148
|
'leftSidebarWidth',
|
|
146
|
-
'transferTab'
|
|
149
|
+
'transferTab',
|
|
150
|
+
'sidebarPanelTab'
|
|
147
151
|
]),
|
|
148
|
-
fileTransfers,
|
|
149
|
-
transferHistory,
|
|
152
|
+
fileTransfers: copiedTransfer,
|
|
153
|
+
transferHistory: copiedHistory,
|
|
150
154
|
upgradeInfo,
|
|
151
155
|
pinned
|
|
152
156
|
}
|
|
@@ -161,8 +165,8 @@ export default auto(function Index (props) {
|
|
|
161
165
|
upgradeInfo
|
|
162
166
|
}
|
|
163
167
|
const conflictStoreProps = {
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
fileTransferChanged: JSON.stringify(copiedTransfer),
|
|
169
|
+
fileTransfers: copiedTransfer
|
|
166
170
|
}
|
|
167
171
|
const batchOpProps = {
|
|
168
172
|
transferHistory,
|
|
@@ -71,7 +71,12 @@ export default class SessionWrapper extends Component {
|
|
|
71
71
|
if (!target) {
|
|
72
72
|
return
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
let fromTab
|
|
75
|
+
try {
|
|
76
|
+
fromTab = JSON.parse(e.dataTransfer.getData('fromFile'))
|
|
77
|
+
} catch (e) {
|
|
78
|
+
return
|
|
79
|
+
}
|
|
75
80
|
const onDropElem = this.getDom()
|
|
76
81
|
const { batch } = this.props.tab
|
|
77
82
|
if (!onDropElem || !fromTab || fromTab.batch === batch) {
|
|
@@ -83,6 +88,15 @@ export default class SessionWrapper extends Component {
|
|
|
83
88
|
if (!t) {
|
|
84
89
|
return
|
|
85
90
|
}
|
|
91
|
+
// Handle currentTab change if needed
|
|
92
|
+
const fromBatch = fromTab.batch
|
|
93
|
+
if (window.store[`activeTabId${fromBatch}`] === fromTab.id && fromBatch !== batch) {
|
|
94
|
+
// Find next tab in the same batch
|
|
95
|
+
const nextTab = tabs.find((t, i) =>
|
|
96
|
+
t.id !== fromTab.id && t.batch === fromBatch
|
|
97
|
+
)
|
|
98
|
+
window.store[`activeTabId${fromBatch}`] = nextTab ? nextTab.id : ''
|
|
99
|
+
}
|
|
86
100
|
t.batch = batch
|
|
87
101
|
this.clearCls()
|
|
88
102
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import {
|
|
6
6
|
defaultBookmarkGroupId
|
|
7
7
|
} from '../../common/constants'
|
|
8
|
-
import { isEqual, find,
|
|
8
|
+
import { isEqual, find, last, remove } from 'lodash-es'
|
|
9
9
|
import copy from 'json-deep-copy'
|
|
10
10
|
|
|
11
11
|
export default (info, props) => {
|
|
@@ -129,7 +129,7 @@ export default (info, props) => {
|
|
|
129
129
|
? toGroup.bookmarkIds || []
|
|
130
130
|
: toGroup.bookmarkGroupIds || []
|
|
131
131
|
nodeIndex = dropToGap
|
|
132
|
-
? findIndex(
|
|
132
|
+
? pool.findIndex(d => d === toId)
|
|
133
133
|
: pool.length
|
|
134
134
|
if (dropToGap) {
|
|
135
135
|
if (fromLeaf) {
|
|
@@ -143,7 +143,7 @@ export default (info, props) => {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
} else {
|
|
146
|
-
nodeIndex = findIndex(
|
|
146
|
+
nodeIndex = bookmarkGroups.findIndex(d => {
|
|
147
147
|
return d.id === toId
|
|
148
148
|
})
|
|
149
149
|
if (fromLeaf) {
|
|
@@ -165,7 +165,7 @@ export default (info, props) => {
|
|
|
165
165
|
}
|
|
166
166
|
const updates = []
|
|
167
167
|
if (toFirstLevel) {
|
|
168
|
-
fromIndex = findIndex(
|
|
168
|
+
fromIndex = bookmarkGroups.findIndex(d => d.id === fromId)
|
|
169
169
|
from = copy(from)
|
|
170
170
|
bookmarkGroups.splice(fromIndex, 1, 'tobedel')
|
|
171
171
|
bookmarkGroups.splice(nodeIndex, 0, from)
|
|
@@ -177,7 +177,7 @@ export default (info, props) => {
|
|
|
177
177
|
const arr = fromLeaf
|
|
178
178
|
? fromGroup.bookmarkIds
|
|
179
179
|
: fromGroup.bookmarkGroupIds
|
|
180
|
-
fromIndex = findIndex(
|
|
180
|
+
fromIndex = arr.findIndex(d => d === fromId)
|
|
181
181
|
isSameCat
|
|
182
182
|
? arr.splice(fromIndex, 1, 'tobedel')
|
|
183
183
|
: remove(arr, d => d === fromId)
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
modals
|
|
12
12
|
} from '../../common/constants'
|
|
13
13
|
import TabBookmarks from './tab-bookmarks'
|
|
14
|
-
import TabHistory from './tab-history'
|
|
15
14
|
import TabQuickCommands from './tab-quick-commands'
|
|
16
15
|
import TabSettings from './tab-settings'
|
|
17
16
|
import TabThemes from './tab-themes'
|
|
@@ -68,11 +67,6 @@ export default auto(function SettingModalWrap (props) {
|
|
|
68
67
|
])
|
|
69
68
|
}
|
|
70
69
|
const items = [
|
|
71
|
-
{
|
|
72
|
-
key: settingMap.history,
|
|
73
|
-
label: e(settingMap.history),
|
|
74
|
-
children: null
|
|
75
|
-
},
|
|
76
70
|
{
|
|
77
71
|
key: settingMap.bookmarks,
|
|
78
72
|
label: e(settingMap.bookmarks),
|
|
@@ -113,12 +107,6 @@ export default auto(function SettingModalWrap (props) {
|
|
|
113
107
|
<Tabs
|
|
114
108
|
{...tabsProps}
|
|
115
109
|
/>
|
|
116
|
-
<TabHistory
|
|
117
|
-
listProps={props0}
|
|
118
|
-
settingItem={settingItem}
|
|
119
|
-
formProps={formProps}
|
|
120
|
-
settingTab={settingTab}
|
|
121
|
-
/>
|
|
122
110
|
<TabQuickCommands
|
|
123
111
|
listProps={props0}
|
|
124
112
|
settingItem={settingItem}
|
|
@@ -129,13 +129,6 @@ export default function ConfirmModalStore (props) {
|
|
|
129
129
|
>
|
|
130
130
|
{e('skip')}
|
|
131
131
|
</Button>
|
|
132
|
-
<Button
|
|
133
|
-
type='dashed'
|
|
134
|
-
className='mg1l'
|
|
135
|
-
onClick={() => act(fileActions.skipAll)}
|
|
136
|
-
>
|
|
137
|
-
{e('skipAll')}
|
|
138
|
-
</Button>
|
|
139
132
|
<Button
|
|
140
133
|
danger
|
|
141
134
|
className='mg1l'
|
|
@@ -6,7 +6,7 @@ import React from 'react'
|
|
|
6
6
|
import { Modal, Button } from 'antd'
|
|
7
7
|
import resolve from '../../common/resolve'
|
|
8
8
|
import time from '../../common/time'
|
|
9
|
-
import {
|
|
9
|
+
import { update } from 'lodash-es'
|
|
10
10
|
import { mode2permission, permission2mode } from '../../common/mode2permission'
|
|
11
11
|
import { commonActions } from '../../common/constants'
|
|
12
12
|
import renderPermission from './permission-render'
|
|
@@ -65,7 +65,7 @@ export default class FileMode extends React.PureComponent {
|
|
|
65
65
|
onChangePermission = (name, permName) => {
|
|
66
66
|
const { file } = this.state
|
|
67
67
|
const perms = mode2permission(file.mode)
|
|
68
|
-
const i = findIndex(
|
|
68
|
+
const i = perms.findIndex(p => p.name === name)
|
|
69
69
|
update(
|
|
70
70
|
perms,
|
|
71
71
|
`[${i}].permission.${permName}`,
|
|
@@ -2,7 +2,7 @@ import { Component } from 'react'
|
|
|
2
2
|
import generate from '../../common/uid'
|
|
3
3
|
import runIdle from '../../common/run-idle'
|
|
4
4
|
import { Spin, Modal, notification } from 'antd'
|
|
5
|
-
import { find, isString,
|
|
5
|
+
import { find, isString, isEqual, last, isNumber, some, isArray, pick, uniq, debounce } from 'lodash-es'
|
|
6
6
|
import FileSection from './file-item'
|
|
7
7
|
import resolve from '../../common/resolve'
|
|
8
8
|
import wait from '../../common/wait'
|
|
@@ -264,7 +264,7 @@ export default class Sftp extends Component {
|
|
|
264
264
|
|
|
265
265
|
getIndex = (file) => {
|
|
266
266
|
const { type } = file
|
|
267
|
-
return
|
|
267
|
+
return this.getFileList(type).findIndex(f => f.id === file.id)
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
onResizeDragEnd = () => {
|