@lvce-editor/explorer-view 5.12.0 → 5.14.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.
|
@@ -2100,7 +2100,7 @@ const cancelEditCreate = async (state, keepFocus) => {
|
|
|
2100
2100
|
items
|
|
2101
2101
|
} = state;
|
|
2102
2102
|
const filteredItems = items.filter(isNormalItem);
|
|
2103
|
-
const newFocusedIndex = getFocusedIndexCancel(
|
|
2103
|
+
const newFocusedIndex = getFocusedIndexCancel(filteredItems, editingIndex);
|
|
2104
2104
|
return {
|
|
2105
2105
|
...state,
|
|
2106
2106
|
editingErrorMessage: '',
|
|
@@ -4828,19 +4828,19 @@ const normalizeDecorations = decorations => {
|
|
|
4828
4828
|
return decorations.filter(isValid);
|
|
4829
4829
|
};
|
|
4830
4830
|
|
|
4831
|
-
const getFileDecorations = async (scheme, root, maybeUris, decorationsEnabled) => {
|
|
4831
|
+
const getFileDecorations = async (scheme, root, maybeUris, decorationsEnabled, assetDir, platform) => {
|
|
4832
4832
|
try {
|
|
4833
4833
|
if (!decorationsEnabled) {
|
|
4834
4834
|
return [];
|
|
4835
4835
|
}
|
|
4836
|
-
const providerIds = await invoke$1('SourceControl.getEnabledProviderIds', scheme, root);
|
|
4836
|
+
const providerIds = await invoke$1('SourceControl.getEnabledProviderIds', scheme, root, assetDir, platform);
|
|
4837
4837
|
if (providerIds.length === 0) {
|
|
4838
4838
|
return [];
|
|
4839
4839
|
}
|
|
4840
4840
|
// TODO how to handle multiple providers?
|
|
4841
4841
|
const providerId = providerIds.at(-1);
|
|
4842
4842
|
const uris = ensureUris(maybeUris);
|
|
4843
|
-
const decorations = await invoke$1('SourceControl.getFileDecorations', providerId, uris);
|
|
4843
|
+
const decorations = await invoke$1('SourceControl.getFileDecorations', providerId, uris, assetDir, platform);
|
|
4844
4844
|
const normalized = normalizeDecorations(decorations);
|
|
4845
4845
|
return normalized;
|
|
4846
4846
|
} catch (error) {
|
|
@@ -4987,6 +4987,11 @@ const getSavedRoot = (savedState, workspacePath) => {
|
|
|
4987
4987
|
return workspacePath;
|
|
4988
4988
|
};
|
|
4989
4989
|
const loadContent = async (state, savedState) => {
|
|
4990
|
+
// @ts-ignore
|
|
4991
|
+
const {
|
|
4992
|
+
assetDir,
|
|
4993
|
+
platform
|
|
4994
|
+
} = state;
|
|
4990
4995
|
const {
|
|
4991
4996
|
confirmDelete,
|
|
4992
4997
|
sourceControlDecorations,
|
|
@@ -5007,7 +5012,7 @@ const loadContent = async (state, savedState) => {
|
|
|
5007
5012
|
deltaY = savedState.deltaY;
|
|
5008
5013
|
}
|
|
5009
5014
|
const scheme = getScheme(root);
|
|
5010
|
-
const decorations = await getFileDecorations(scheme, root, restoredDirents.filter(item => item.depth === 1).map(item => item.path), sourceControlDecorations);
|
|
5015
|
+
const decorations = await getFileDecorations(scheme, root, restoredDirents.filter(item => item.depth === 1).map(item => item.path), sourceControlDecorations, assetDir, platform);
|
|
5011
5016
|
return {
|
|
5012
5017
|
...state,
|
|
5013
5018
|
confirmDelete,
|