@lvce-editor/explorer-view 7.18.0 → 7.19.0
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/dist/explorerViewWorkerMain.js +11 -10
- package/package.json +1 -1
|
@@ -4251,7 +4251,7 @@ const getKeyBindings = () => {
|
|
|
4251
4251
|
key: Delete$1,
|
|
4252
4252
|
when: FocusExplorer
|
|
4253
4253
|
}, {
|
|
4254
|
-
command: 'Explorer.
|
|
4254
|
+
command: 'Explorer.handleEscape',
|
|
4255
4255
|
key: Escape,
|
|
4256
4256
|
when: FocusExplorer
|
|
4257
4257
|
}, {
|
|
@@ -4262,10 +4262,6 @@ const getKeyBindings = () => {
|
|
|
4262
4262
|
command: 'Explorer.handleClickCurrent',
|
|
4263
4263
|
key: Enter,
|
|
4264
4264
|
when: FocusExplorer
|
|
4265
|
-
}, {
|
|
4266
|
-
command: 'Explorer.handleEscape',
|
|
4267
|
-
key: Escape,
|
|
4268
|
-
when: FocusExplorer
|
|
4269
4265
|
}, {
|
|
4270
4266
|
command: 'Explorer.selectAll',
|
|
4271
4267
|
key: CtrlCmd | KeyA,
|
|
@@ -5215,11 +5211,12 @@ const handleContextMenuAtIndex = async (state, index, x, y) => {
|
|
|
5215
5211
|
number(x);
|
|
5216
5212
|
number(y);
|
|
5217
5213
|
const {
|
|
5214
|
+
focusedIndex,
|
|
5218
5215
|
items,
|
|
5219
5216
|
uid
|
|
5220
5217
|
} = state;
|
|
5221
5218
|
const contextMenuItem = items[index];
|
|
5222
|
-
const newItems = contextMenuItem && !contextMenuItem.selected ? items.map(item => ({
|
|
5219
|
+
const newItems = contextMenuItem && index !== focusedIndex && !contextMenuItem.selected ? items.map(item => ({
|
|
5223
5220
|
...item,
|
|
5224
5221
|
selected: false
|
|
5225
5222
|
})) : items;
|
|
@@ -5315,9 +5312,12 @@ const handleCut = async state => {
|
|
|
5315
5312
|
}
|
|
5316
5313
|
const files = dirents.map(dirent => dirent.path);
|
|
5317
5314
|
await writeNativeFiles('cut', files);
|
|
5315
|
+
await invoke$2('Focus.setFocus', FocusExplorer);
|
|
5318
5316
|
return {
|
|
5319
5317
|
...state,
|
|
5320
5318
|
cutItems: files,
|
|
5319
|
+
focus: List,
|
|
5320
|
+
focused: true,
|
|
5321
5321
|
pasteShouldMove: true
|
|
5322
5322
|
};
|
|
5323
5323
|
};
|
|
@@ -6114,7 +6114,7 @@ const handleDrop = async (state, x, y, fileIds, fileList) => {
|
|
|
6114
6114
|
|
|
6115
6115
|
const handleEscape = async state => {
|
|
6116
6116
|
return {
|
|
6117
|
-
...state,
|
|
6117
|
+
...focusNone(state),
|
|
6118
6118
|
cutItems: []
|
|
6119
6119
|
};
|
|
6120
6120
|
};
|
|
@@ -6750,9 +6750,10 @@ const openInIntegratedTerminal = async state => {
|
|
|
6750
6750
|
return state;
|
|
6751
6751
|
};
|
|
6752
6752
|
|
|
6753
|
-
const confirmDelete = async
|
|
6753
|
+
const confirmDelete = async items => {
|
|
6754
6754
|
// TODO use i18n string
|
|
6755
|
-
const
|
|
6755
|
+
const names = items.map(item => `"${item.name}"`).join(', ');
|
|
6756
|
+
const message = items.length === 1 ? `Are you sure you want to delete "${items[0].path}"?` : `Are you sure you want to delete ${names}?`;
|
|
6756
6757
|
const result = await confirm(message);
|
|
6757
6758
|
return result;
|
|
6758
6759
|
};
|
|
@@ -6776,7 +6777,7 @@ const removeDirent = async state => {
|
|
|
6776
6777
|
}
|
|
6777
6778
|
const toRemove = getPaths(selectedItems);
|
|
6778
6779
|
if (confirmDelete$1) {
|
|
6779
|
-
const confirmed = await confirmDelete(
|
|
6780
|
+
const confirmed = await confirmDelete(selectedItems);
|
|
6780
6781
|
if (!confirmed) {
|
|
6781
6782
|
return state;
|
|
6782
6783
|
}
|