@lvce-editor/status-bar-worker 1.7.0 → 1.9.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/statusBarWorkerMain.js +29 -3
- package/package.json +1 -1
|
@@ -1202,8 +1202,6 @@ const diff2 = uid => {
|
|
|
1202
1202
|
return result;
|
|
1203
1203
|
};
|
|
1204
1204
|
|
|
1205
|
-
const Notifications = 'Notifications';
|
|
1206
|
-
|
|
1207
1205
|
const getMatchingItem = (itemsLeft, itemsRight, name) => {
|
|
1208
1206
|
for (const item of itemsLeft) {
|
|
1209
1207
|
if (item.name === name) {
|
|
@@ -1217,9 +1215,26 @@ const getMatchingItem = (itemsLeft, itemsRight, name) => {
|
|
|
1217
1215
|
}
|
|
1218
1216
|
return undefined;
|
|
1219
1217
|
};
|
|
1218
|
+
|
|
1219
|
+
const handleClickExtensionStatusBarItem = async name => {
|
|
1220
|
+
// @ts-ignore
|
|
1221
|
+
await invoke$1(`ExtensionHostStatusBar.executeCommand`, name);
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1220
1224
|
const handleClickNotification = async () => {
|
|
1221
1225
|
// TODO toggle notifications
|
|
1222
1226
|
};
|
|
1227
|
+
|
|
1228
|
+
const handleClickProblems = async () => {
|
|
1229
|
+
// @ts-ignore
|
|
1230
|
+
await invoke('Layout.showPanel');
|
|
1231
|
+
// @ts-ignore
|
|
1232
|
+
await invoke('Panel.toggleView', 'Problems');
|
|
1233
|
+
};
|
|
1234
|
+
|
|
1235
|
+
const Notifications = 'Notifications';
|
|
1236
|
+
const Problems = 'Problems';
|
|
1237
|
+
|
|
1223
1238
|
const handleClick = async (state, name) => {
|
|
1224
1239
|
if (!name) {
|
|
1225
1240
|
return state;
|
|
@@ -1234,6 +1249,10 @@ const handleClick = async (state, name) => {
|
|
|
1234
1249
|
}
|
|
1235
1250
|
if (item.name === Notifications) {
|
|
1236
1251
|
await handleClickNotification();
|
|
1252
|
+
} else if (item.name === Problems) {
|
|
1253
|
+
await handleClickProblems();
|
|
1254
|
+
} else {
|
|
1255
|
+
await handleClickExtensionStatusBarItem(name);
|
|
1237
1256
|
}
|
|
1238
1257
|
// TODO
|
|
1239
1258
|
// sendExtensionWorker([/* statusBarItemHandleClick */ 7657, /* name */ name])
|
|
@@ -1269,6 +1288,7 @@ const getIndex = (items, item) => {
|
|
|
1269
1288
|
}
|
|
1270
1289
|
return -1;
|
|
1271
1290
|
};
|
|
1291
|
+
|
|
1272
1292
|
const updateArray = (items, newItem) => {
|
|
1273
1293
|
const index = getIndex(items, newItem);
|
|
1274
1294
|
const before = items.slice(0, index);
|
|
@@ -1307,7 +1327,7 @@ const itemRightUpdate = (state, newItem) => {
|
|
|
1307
1327
|
|
|
1308
1328
|
const OnStatusBarItem = 'onStatusBarItem';
|
|
1309
1329
|
|
|
1310
|
-
const GetStatusBarItems = 'ExtensionHost.
|
|
1330
|
+
const GetStatusBarItems = 'ExtensionHost.getStatusBarItems2';
|
|
1311
1331
|
|
|
1312
1332
|
const activateByEvent = event => {
|
|
1313
1333
|
return activateByEvent$1(event);
|
|
@@ -1369,6 +1389,12 @@ const getStatusBarItems = async showItems => {
|
|
|
1369
1389
|
name: Notifications,
|
|
1370
1390
|
text: 'Notifications',
|
|
1371
1391
|
tooltip: ''
|
|
1392
|
+
}, {
|
|
1393
|
+
command: '',
|
|
1394
|
+
icon: '',
|
|
1395
|
+
name: Problems,
|
|
1396
|
+
text: 'Problems',
|
|
1397
|
+
tooltip: ''
|
|
1372
1398
|
}];
|
|
1373
1399
|
return [...uiStatusBarItems, ...extraItems];
|
|
1374
1400
|
};
|