@lvce-editor/status-bar-worker 1.7.0 → 1.8.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 +22 -2
- 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,21 @@ const getMatchingItem = (itemsLeft, itemsRight, name) => {
|
|
|
1217
1215
|
}
|
|
1218
1216
|
return undefined;
|
|
1219
1217
|
};
|
|
1218
|
+
|
|
1220
1219
|
const handleClickNotification = async () => {
|
|
1221
1220
|
// TODO toggle notifications
|
|
1222
1221
|
};
|
|
1222
|
+
|
|
1223
|
+
const handleClickProblems = async () => {
|
|
1224
|
+
// @ts-ignore
|
|
1225
|
+
await invoke('Layout.showPanel');
|
|
1226
|
+
// @ts-ignore
|
|
1227
|
+
await invoke('Panel.selectView', 'Problems');
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
const Notifications = 'Notifications';
|
|
1231
|
+
const Problems = 'Problems';
|
|
1232
|
+
|
|
1223
1233
|
const handleClick = async (state, name) => {
|
|
1224
1234
|
if (!name) {
|
|
1225
1235
|
return state;
|
|
@@ -1235,6 +1245,9 @@ const handleClick = async (state, name) => {
|
|
|
1235
1245
|
if (item.name === Notifications) {
|
|
1236
1246
|
await handleClickNotification();
|
|
1237
1247
|
}
|
|
1248
|
+
if (item.name === Problems) {
|
|
1249
|
+
await handleClickProblems();
|
|
1250
|
+
}
|
|
1238
1251
|
// TODO
|
|
1239
1252
|
// sendExtensionWorker([/* statusBarItemHandleClick */ 7657, /* name */ name])
|
|
1240
1253
|
return state;
|
|
@@ -1269,6 +1282,7 @@ const getIndex = (items, item) => {
|
|
|
1269
1282
|
}
|
|
1270
1283
|
return -1;
|
|
1271
1284
|
};
|
|
1285
|
+
|
|
1272
1286
|
const updateArray = (items, newItem) => {
|
|
1273
1287
|
const index = getIndex(items, newItem);
|
|
1274
1288
|
const before = items.slice(0, index);
|
|
@@ -1369,6 +1383,12 @@ const getStatusBarItems = async showItems => {
|
|
|
1369
1383
|
name: Notifications,
|
|
1370
1384
|
text: 'Notifications',
|
|
1371
1385
|
tooltip: ''
|
|
1386
|
+
}, {
|
|
1387
|
+
command: '',
|
|
1388
|
+
icon: '',
|
|
1389
|
+
name: Problems,
|
|
1390
|
+
text: 'Problems',
|
|
1391
|
+
tooltip: ''
|
|
1372
1392
|
}];
|
|
1373
1393
|
return [...uiStatusBarItems, ...extraItems];
|
|
1374
1394
|
};
|