@electerm/electerm-react 1.38.60 → 1.38.65
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.
|
@@ -182,7 +182,7 @@ export default class QuickCommandsFooterBox extends Component {
|
|
|
182
182
|
sortArray (array, keyword, labels, qmSortByFrequency) {
|
|
183
183
|
const sorters = [
|
|
184
184
|
(obj) => !(keyword && obj.name.toLowerCase().includes(keyword)),
|
|
185
|
-
(obj) => !labels.some((label) => obj.labels.includes(label))
|
|
185
|
+
(obj) => !labels.some((label) => (obj.labels || []).includes(label))
|
|
186
186
|
]
|
|
187
187
|
if (qmSortByFrequency) {
|
|
188
188
|
sorters.push((obj) => -(obj.clickCount || 0))
|
|
@@ -194,9 +194,10 @@ export default class QuickCommandsFooterBox extends Component {
|
|
|
194
194
|
const {
|
|
195
195
|
openQuickCommandBar,
|
|
196
196
|
pinnedQuickCommandBar,
|
|
197
|
-
qmSortByFrequency
|
|
197
|
+
qmSortByFrequency,
|
|
198
|
+
inActiveTerminal
|
|
198
199
|
} = this.props.store
|
|
199
|
-
if (!openQuickCommandBar && !pinnedQuickCommandBar) {
|
|
200
|
+
if ((!openQuickCommandBar && !pinnedQuickCommandBar) || !inActiveTerminal) {
|
|
200
201
|
return null
|
|
201
202
|
}
|
|
202
203
|
const all = this.props.store.currentQuickCommands
|
|
@@ -210,7 +211,7 @@ export default class QuickCommandsFooterBox extends Component {
|
|
|
210
211
|
return {
|
|
211
212
|
...d,
|
|
212
213
|
nameMatch: keyword && d.name.toLowerCase().includes(keyword),
|
|
213
|
-
labelMatch: labels.some((label) => d.labels.includes(label))
|
|
214
|
+
labelMatch: labels.some((label) => (d.labels || []).includes(label))
|
|
214
215
|
}
|
|
215
216
|
})
|
|
216
217
|
const sprops = {
|
|
@@ -568,10 +568,14 @@ export default class Sftp extends Component {
|
|
|
568
568
|
return arr.map(item => {
|
|
569
569
|
const { type } = item
|
|
570
570
|
return {
|
|
571
|
-
...pick(
|
|
571
|
+
...pick(
|
|
572
|
+
item,
|
|
573
|
+
['name', 'size', 'accessTime', 'modifyTime', 'mode', 'owner', 'group']
|
|
574
|
+
),
|
|
572
575
|
isDirectory: type === fileTypeMap.directory,
|
|
573
576
|
type: typeMap.remote,
|
|
574
577
|
path: remotePath,
|
|
578
|
+
isSymbol: type === fileTypeMap.link,
|
|
575
579
|
id: generate()
|
|
576
580
|
}
|
|
577
581
|
})
|
|
@@ -711,8 +715,8 @@ export default class Sftp extends Component {
|
|
|
711
715
|
) => {
|
|
712
716
|
const remote = []
|
|
713
717
|
for (const r of remotes) {
|
|
714
|
-
const {
|
|
715
|
-
if (
|
|
718
|
+
const { name } = r
|
|
719
|
+
if (r.isSymbol) {
|
|
716
720
|
const linkPath = resolve(remotePath, name)
|
|
717
721
|
let realpath = await sftp.readlink(linkPath)
|
|
718
722
|
.catch(e => {
|