@lvce-editor/activity-bar-worker 7.16.0 → 7.16.1
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/activityBarWorkerMain.js +18 -11
- package/package.json +1 -1
|
@@ -250,6 +250,7 @@ const {
|
|
|
250
250
|
getCommandIds,
|
|
251
251
|
registerCommands,
|
|
252
252
|
set: set$3,
|
|
253
|
+
wrapAsyncCommand,
|
|
253
254
|
wrapCommand,
|
|
254
255
|
wrapGetter
|
|
255
256
|
} = create$a();
|
|
@@ -2475,14 +2476,28 @@ const handleClickSignOut = async state => {
|
|
|
2475
2476
|
return state;
|
|
2476
2477
|
};
|
|
2477
2478
|
|
|
2478
|
-
const
|
|
2479
|
+
const getSideBarPosition = async () => {
|
|
2480
|
+
try {
|
|
2481
|
+
return await invoke('Layout.getSideBarPosition');
|
|
2482
|
+
} catch {
|
|
2483
|
+
return Left;
|
|
2484
|
+
}
|
|
2485
|
+
};
|
|
2486
|
+
|
|
2487
|
+
const handleContextMenu = async (context, button, eventX, eventY) => {
|
|
2488
|
+
const sideBarLocation = await getSideBarPosition();
|
|
2489
|
+
const state = await context.updateState(state => {
|
|
2490
|
+
return {
|
|
2491
|
+
...state,
|
|
2492
|
+
sideBarLocation
|
|
2493
|
+
};
|
|
2494
|
+
});
|
|
2479
2495
|
const {
|
|
2480
2496
|
uid
|
|
2481
2497
|
} = state;
|
|
2482
2498
|
await show2(uid, ActivityBar$3, eventX, eventY, {
|
|
2483
2499
|
menuId: ActivityBar$3
|
|
2484
2500
|
});
|
|
2485
|
-
return state;
|
|
2486
2501
|
};
|
|
2487
2502
|
|
|
2488
2503
|
const commandMap$1 = {};
|
|
@@ -2690,14 +2705,6 @@ const getAccountEnabled = async defaultValue => {
|
|
|
2690
2705
|
}
|
|
2691
2706
|
};
|
|
2692
2707
|
|
|
2693
|
-
const getSideBarPosition = async () => {
|
|
2694
|
-
try {
|
|
2695
|
-
return await invoke('Layout.getSideBarPosition');
|
|
2696
|
-
} catch {
|
|
2697
|
-
return Left;
|
|
2698
|
-
}
|
|
2699
|
-
};
|
|
2700
|
-
|
|
2701
2708
|
const handleSettingsChanged = async state => {
|
|
2702
2709
|
const {
|
|
2703
2710
|
accountEnabled: currentAccountEnabled,
|
|
@@ -3720,7 +3727,7 @@ const commandMap = {
|
|
|
3720
3727
|
'ActivityBar.handleClickSettings': wrapCommand(handleClickSettings),
|
|
3721
3728
|
'ActivityBar.handleClickSignIn': wrapCommand(handleClickSignIn),
|
|
3722
3729
|
'ActivityBar.handleClickSignOut': wrapCommand(handleClickSignOut),
|
|
3723
|
-
'ActivityBar.handleContextMenu':
|
|
3730
|
+
'ActivityBar.handleContextMenu': wrapAsyncCommand(handleContextMenu),
|
|
3724
3731
|
'ActivityBar.handleExtensionManagementMessagePort': handleExtensionManagementMessagePort,
|
|
3725
3732
|
'ActivityBar.handleExtensionsChanged': wrapCommand(handleExtensionsChanged),
|
|
3726
3733
|
'ActivityBar.handleFocus': wrapCommand(handleFocus),
|