@lvce-editor/explorer-view 2.17.0 → 2.18.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.
|
@@ -1971,7 +1971,7 @@ const focusPrevious = state => {
|
|
|
1971
1971
|
}
|
|
1972
1972
|
};
|
|
1973
1973
|
|
|
1974
|
-
const commandIds = ['
|
|
1974
|
+
const commandIds = ['acceptEdit', 'cancelEdit', 'collapseAll', 'copyPath', 'copyRelativePath', 'dispose', 'expandAll', 'expandRecursively', 'focus', 'focusFirst', 'focusIndex', 'focusLast', 'focusNext', 'focusNone', 'focusPrevious', 'getFocusedDirent', 'getMenuEntries2', 'handleArrowLeft', 'handleArrowLeft', 'handleArrowRight', 'handleArrowRight', 'handleBlur', 'handleClick', 'handleClickAt', 'handleClickCurrent', 'handleClickCurrentButKeepFocus', 'handleClickOpenFolder', 'handleContextMenu', 'handleContextMenuKeyboard', 'handleCopy', 'handleDragLeave', 'handleDragOver', 'handleDrop', 'handleFocus', 'handleIconThemeChange', 'handleLanguagesChanged', 'handleMouseEnter', 'handleMouseLeave', 'handlePaste', 'handlePointerDown', 'handleUpload', 'handleWheel', 'handleWorkspaceChange', 'hotReload', 'newFile', 'newFolder', 'openContainingFolder', 'refresh', 'refresh', 'removeDirent', 'rename', 'renameDirent', 'renderEventListeners', 'revealItem', 'revealItem', 'scrollDown', 'scrollUp', 'setDeltaY', 'updateEditingValue', 'updateIcons'];
|
|
1975
1975
|
|
|
1976
1976
|
const getCommandIds = () => {
|
|
1977
1977
|
return commandIds;
|
|
@@ -3569,12 +3569,12 @@ const renameDirent = state => {
|
|
|
3569
3569
|
items
|
|
3570
3570
|
} = state;
|
|
3571
3571
|
const item = items[focusedIndex];
|
|
3572
|
-
// Focus.setFocus(FocusKey.ExplorerEditBox)
|
|
3573
3572
|
return {
|
|
3574
3573
|
...state,
|
|
3575
3574
|
editingIndex: focusedIndex,
|
|
3576
3575
|
editingType: Rename$1,
|
|
3577
|
-
editingValue: item.name
|
|
3576
|
+
editingValue: item.name,
|
|
3577
|
+
focus: Input$1
|
|
3578
3578
|
};
|
|
3579
3579
|
};
|
|
3580
3580
|
|
|
@@ -4337,8 +4337,21 @@ const terminate = () => {
|
|
|
4337
4337
|
globalThis.close();
|
|
4338
4338
|
};
|
|
4339
4339
|
|
|
4340
|
-
const
|
|
4341
|
-
|
|
4340
|
+
const getEditingIcon = async (editingType, value) => {
|
|
4341
|
+
if (editingType === File) {
|
|
4342
|
+
return invoke('IconTheme.getFileIcon', {
|
|
4343
|
+
name: value
|
|
4344
|
+
});
|
|
4345
|
+
}
|
|
4346
|
+
if (editingType === Directory) {
|
|
4347
|
+
return invoke('IconTheme.getFolderIcon', {
|
|
4348
|
+
name: value
|
|
4349
|
+
});
|
|
4350
|
+
}
|
|
4351
|
+
return '';
|
|
4352
|
+
};
|
|
4353
|
+
const updateEditingValue = async (state, value, inputSource = User) => {
|
|
4354
|
+
const editingIcon = await getEditingIcon(state.editingType, value);
|
|
4342
4355
|
return {
|
|
4343
4356
|
...state,
|
|
4344
4357
|
editingValue: value,
|