@lvce-editor/running-extensions-view 1.17.0 → 1.18.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.
|
@@ -2299,6 +2299,12 @@ const HandleContextMenu = 3;
|
|
|
2299
2299
|
const HandleClick = 4;
|
|
2300
2300
|
const HandleBlur = 5;
|
|
2301
2301
|
|
|
2302
|
+
const defaultIconNode = {
|
|
2303
|
+
childCount: 0,
|
|
2304
|
+
className: mergeClassNames(RunningExtensionIcon, RunningExtensionDefaultIcon, MaskIcon, MaskIconExtensions),
|
|
2305
|
+
role: None,
|
|
2306
|
+
type: Div
|
|
2307
|
+
};
|
|
2302
2308
|
const getIconVirtualDom = extension => {
|
|
2303
2309
|
if (extension.icon) {
|
|
2304
2310
|
return [{
|
|
@@ -2308,12 +2314,7 @@ const getIconVirtualDom = extension => {
|
|
|
2308
2314
|
type: Img
|
|
2309
2315
|
}];
|
|
2310
2316
|
}
|
|
2311
|
-
return [
|
|
2312
|
-
childCount: 0,
|
|
2313
|
-
className: mergeClassNames(RunningExtensionIcon, RunningExtensionDefaultIcon, MaskIcon, MaskIconExtensions),
|
|
2314
|
-
role: None,
|
|
2315
|
-
type: Div
|
|
2316
|
-
}];
|
|
2317
|
+
return [defaultIconNode];
|
|
2317
2318
|
};
|
|
2318
2319
|
|
|
2319
2320
|
const sshRemotePrefix = 'ssh-remote+';
|
|
@@ -2342,6 +2343,11 @@ const idNode = {
|
|
|
2342
2343
|
className: RunningExtensionId,
|
|
2343
2344
|
type: Div
|
|
2344
2345
|
};
|
|
2346
|
+
const remoteAuthorityNode = {
|
|
2347
|
+
childCount: 1,
|
|
2348
|
+
className: mergeClassNames(RunningExtensionId, RunningExtensionRemoteAuthority),
|
|
2349
|
+
type: Div
|
|
2350
|
+
};
|
|
2345
2351
|
const activationTimeNode = {
|
|
2346
2352
|
childCount: 1,
|
|
2347
2353
|
className: RunningExtensionActivationTime,
|
|
@@ -2377,11 +2383,7 @@ const getRemoteAuthorityVirtualDom = remoteAuthority => {
|
|
|
2377
2383
|
return [];
|
|
2378
2384
|
}
|
|
2379
2385
|
const host = remoteAuthority.startsWith(sshRemotePrefix) ? remoteAuthority.slice(sshRemotePrefix.length) : remoteAuthority;
|
|
2380
|
-
return [
|
|
2381
|
-
childCount: 1,
|
|
2382
|
-
className: mergeClassNames(RunningExtensionId, RunningExtensionRemoteAuthority),
|
|
2383
|
-
type: Div
|
|
2384
|
-
}, text(ssh(host))];
|
|
2386
|
+
return [remoteAuthorityNode, text(ssh(host))];
|
|
2385
2387
|
};
|
|
2386
2388
|
const getClassName = (focused, selected) => {
|
|
2387
2389
|
let className = RunningExtension;
|
|
@@ -2418,6 +2420,16 @@ const getExtensionVirtualDom = (extension, focused = false, selected = false) =>
|
|
|
2418
2420
|
|
|
2419
2421
|
const Focusable = 0;
|
|
2420
2422
|
|
|
2423
|
+
const runningExtensionsNode = {
|
|
2424
|
+
childCount: 1,
|
|
2425
|
+
className: mergeClassNames(RunningExtensions, Grow),
|
|
2426
|
+
onBlur: HandleBlur,
|
|
2427
|
+
onClick: HandleClick,
|
|
2428
|
+
onContextMenu: HandleContextMenu,
|
|
2429
|
+
role: List,
|
|
2430
|
+
tabIndex: Focusable,
|
|
2431
|
+
type: Ul
|
|
2432
|
+
};
|
|
2421
2433
|
const emptyNode = {
|
|
2422
2434
|
childCount: 1,
|
|
2423
2435
|
className: RunningExtensionsEmpty,
|
|
@@ -2429,16 +2441,7 @@ const getMessage = loaded => {
|
|
|
2429
2441
|
};
|
|
2430
2442
|
const getRunningExtensionsEmptyDom = loaded => {
|
|
2431
2443
|
const message = getMessage(loaded);
|
|
2432
|
-
return [
|
|
2433
|
-
childCount: 1,
|
|
2434
|
-
className: mergeClassNames(RunningExtensions, Grow),
|
|
2435
|
-
onBlur: HandleBlur,
|
|
2436
|
-
onClick: HandleClick,
|
|
2437
|
-
onContextMenu: HandleContextMenu,
|
|
2438
|
-
role: List,
|
|
2439
|
-
tabIndex: Focusable,
|
|
2440
|
-
type: Ul
|
|
2441
|
-
}, emptyNode, text(message)];
|
|
2444
|
+
return [runningExtensionsNode, emptyNode, text(message)];
|
|
2442
2445
|
};
|
|
2443
2446
|
|
|
2444
2447
|
const getRunningExtensionsVirtualDom = (extensions, loaded, focusedIndex = -1, selectedIndex = -1, focusOutline = false) => {
|