@lvce-editor/explorer-view 1.19.0 → 1.20.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 +25 -14
- package/package.json +1 -1
|
@@ -1300,6 +1300,7 @@ const ListItem = 22;
|
|
|
1300
1300
|
|
|
1301
1301
|
const Slash = '/';
|
|
1302
1302
|
|
|
1303
|
+
// TODO parentUid might ot be needed
|
|
1303
1304
|
const create = (id, uri, x, y, width, height, args, parentUid) => {
|
|
1304
1305
|
const state = {
|
|
1305
1306
|
uid: id,
|
|
@@ -3242,23 +3243,19 @@ const getWorkspacePath = () => {
|
|
|
3242
3243
|
return invoke('Workspace.getPath');
|
|
3243
3244
|
};
|
|
3244
3245
|
|
|
3246
|
+
const getSettings = async () => {
|
|
3247
|
+
const useChevronsRaw = await invoke('Preferences.get', 'explorer.useChevrons');
|
|
3248
|
+
const useChevrons = useChevronsRaw === false ? false : true;
|
|
3249
|
+
return {
|
|
3250
|
+
useChevrons
|
|
3251
|
+
};
|
|
3252
|
+
};
|
|
3253
|
+
|
|
3245
3254
|
const EmptyString = '';
|
|
3246
3255
|
|
|
3247
3256
|
const Fulfilled = 'fulfilled';
|
|
3248
3257
|
const Rejected = 'rejected';
|
|
3249
3258
|
|
|
3250
|
-
// TODO viewlet should only have create and refresh functions
|
|
3251
|
-
// every thing else can be in a separate module <viewlet>.lazy.js
|
|
3252
|
-
// and <viewlet>.ipc.js
|
|
3253
|
-
|
|
3254
|
-
// viewlet: creating | refreshing | done | disposed
|
|
3255
|
-
// TODO recycle viewlets (maybe)
|
|
3256
|
-
|
|
3257
|
-
// TODO instead of root string, there should be a root dirent
|
|
3258
|
-
|
|
3259
|
-
const getPathSeparator = root => {
|
|
3260
|
-
return getPathSeparator$1(root);
|
|
3261
|
-
};
|
|
3262
3259
|
const getSavedChildDirents = (map, path, depth, excluded, pathSeparator) => {
|
|
3263
3260
|
const children = map[path];
|
|
3264
3261
|
if (!children) {
|
|
@@ -3347,6 +3344,19 @@ const restoreExpandedState = async (savedState, root, pathSeparator, excluded) =
|
|
|
3347
3344
|
const dirents = createDirents(root, expandedDirentPaths, expandedDirentChildren, excluded, pathSeparator);
|
|
3348
3345
|
return dirents;
|
|
3349
3346
|
};
|
|
3347
|
+
|
|
3348
|
+
// TODO viewlet should only have create and refresh functions
|
|
3349
|
+
// every thing else can be in a separate module <viewlet>.lazy.js
|
|
3350
|
+
// and <viewlet>.ipc.js
|
|
3351
|
+
|
|
3352
|
+
// viewlet: creating | refreshing | done | disposed
|
|
3353
|
+
// TODO recycle viewlets (maybe)
|
|
3354
|
+
|
|
3355
|
+
// TODO instead of root string, there should be a root dirent
|
|
3356
|
+
|
|
3357
|
+
const getPathSeparator = root => {
|
|
3358
|
+
return getPathSeparator$1(root);
|
|
3359
|
+
};
|
|
3350
3360
|
const getExcluded = () => {
|
|
3351
3361
|
const excludedObject = {};
|
|
3352
3362
|
const excluded = [];
|
|
@@ -3361,8 +3371,9 @@ const getSavedRoot$1 = (savedState, workspacePath) => {
|
|
|
3361
3371
|
return workspacePath;
|
|
3362
3372
|
};
|
|
3363
3373
|
const loadContent = async (state, savedState) => {
|
|
3364
|
-
const
|
|
3365
|
-
|
|
3374
|
+
const {
|
|
3375
|
+
useChevrons
|
|
3376
|
+
} = await getSettings();
|
|
3366
3377
|
const workspacePath = await getWorkspacePath();
|
|
3367
3378
|
const root = getSavedRoot$1(savedState, workspacePath);
|
|
3368
3379
|
// TODO path separator could be restored from saved state
|