@lvce-editor/extension-detail-view 3.54.0 → 3.55.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.
|
@@ -41,6 +41,7 @@ const Schema = 'Schema';
|
|
|
41
41
|
const ScrollToTop$1 = 'Scroll to top';
|
|
42
42
|
const Selector = 'Selector';
|
|
43
43
|
const SetColorTheme$1 = 'Set Color Theme';
|
|
44
|
+
const Enable$1 = 'Enable';
|
|
44
45
|
const Settings$1 = 'Settings';
|
|
45
46
|
const Theme$1 = 'Theme';
|
|
46
47
|
const Uninstall$1 = 'Uninstall';
|
|
@@ -103,6 +104,9 @@ const schema = () => {
|
|
|
103
104
|
const setColorTheme$3 = () => {
|
|
104
105
|
return i18nString(SetColorTheme$1);
|
|
105
106
|
};
|
|
107
|
+
const enable = () => {
|
|
108
|
+
return i18nString(Enable$1);
|
|
109
|
+
};
|
|
106
110
|
const theme = () => {
|
|
107
111
|
return i18nString(Theme$1);
|
|
108
112
|
};
|
|
@@ -697,6 +701,9 @@ const sendMessagePortToFileSystemWorker$2 = async (port, rpcId) => {
|
|
|
697
701
|
// @ts-ignore
|
|
698
702
|
await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
|
|
699
703
|
};
|
|
704
|
+
const disableExtension$2 = async id => {
|
|
705
|
+
return invoke$3('ExtensionManagement.disable', id);
|
|
706
|
+
};
|
|
700
707
|
const sendMessagePortToExtensionHostWorker$2 = async (port, rpcId = 0) => {
|
|
701
708
|
const command = 'HandleMessagePort.handleMessagePort2';
|
|
702
709
|
await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
|
|
@@ -736,6 +743,7 @@ const openUrl$2 = async uri => {
|
|
|
736
743
|
};
|
|
737
744
|
const RendererWorker = {
|
|
738
745
|
__proto__: null,
|
|
746
|
+
disableExtension: disableExtension$2,
|
|
739
747
|
getAllExtensions: getAllExtensions$2,
|
|
740
748
|
getExtension: getExtension$3,
|
|
741
749
|
openExtensionSearch: openExtensionSearch$2,
|
|
@@ -980,6 +988,7 @@ const string = value => {
|
|
|
980
988
|
|
|
981
989
|
const HandleClickCategory = 'handleClickCategory';
|
|
982
990
|
const HandleClickDisable = 'handleClickDisable';
|
|
991
|
+
const HandleClickEnable = 'handleClickEnable';
|
|
983
992
|
const HandleClickScrollToTop = 'handleClickScrollToTop';
|
|
984
993
|
const HandleClickSetColorTheme = 'handleClickSetColorTheme';
|
|
985
994
|
const HandleClickSettings = 'handleClickSettings';
|
|
@@ -996,6 +1005,7 @@ const ActivationEvents = 'ActivationEvents';
|
|
|
996
1005
|
const Changelog = 'Changelog';
|
|
997
1006
|
const Commands = 'Commands';
|
|
998
1007
|
const Details = 'Details';
|
|
1008
|
+
const Enable = 'Enable';
|
|
999
1009
|
const Disable = 'Disable';
|
|
1000
1010
|
const Features = 'Features';
|
|
1001
1011
|
const JsonValidation = 'JsonValidation';
|
|
@@ -2340,12 +2350,13 @@ const terminate = () => {
|
|
|
2340
2350
|
};
|
|
2341
2351
|
|
|
2342
2352
|
const {
|
|
2353
|
+
disableExtension: disableExtension$1,
|
|
2343
2354
|
getAllExtensions: getAllExtensions$1,
|
|
2344
2355
|
getExtension: getExtension$2,
|
|
2345
2356
|
openExtensionSearch: openExtensionSearch$1,
|
|
2346
|
-
sendMessagePortToExtensionHostWorker: sendMessagePortToExtensionHostWorker$1,
|
|
2347
2357
|
openNativeFolder,
|
|
2348
|
-
|
|
2358
|
+
openUrl: openUrl$1,
|
|
2359
|
+
sendMessagePortToExtensionHostWorker: sendMessagePortToExtensionHostWorker$1,
|
|
2349
2360
|
sendMessagePortToFileSystemWorker: sendMessagePortToFileSystemWorker$1,
|
|
2350
2361
|
sendMessagePortToMarkdownWorker: sendMessagePortToMarkdownWorker$1,
|
|
2351
2362
|
set: set$2,
|
|
@@ -2354,7 +2365,7 @@ const {
|
|
|
2354
2365
|
showContextMenu,
|
|
2355
2366
|
uninstallExtension,
|
|
2356
2367
|
writeClipBoardImage,
|
|
2357
|
-
|
|
2368
|
+
writeClipBoardText
|
|
2358
2369
|
} = RendererWorker;
|
|
2359
2370
|
|
|
2360
2371
|
const writeClipboardImage = async blob => {
|
|
@@ -2418,6 +2429,7 @@ const create = (uid, uri, x, y, width, height, platform, assetDir) => {
|
|
|
2418
2429
|
wasActivatedByEvent: '',
|
|
2419
2430
|
activationTime: 0,
|
|
2420
2431
|
importTime: 0,
|
|
2432
|
+
disabled: false,
|
|
2421
2433
|
status: 0,
|
|
2422
2434
|
uid,
|
|
2423
2435
|
activationEvents: [],
|
|
@@ -2596,7 +2608,16 @@ const handleClickCategory = async (state, categoryId) => {
|
|
|
2596
2608
|
return state;
|
|
2597
2609
|
};
|
|
2598
2610
|
|
|
2611
|
+
const disableExtension = id => {
|
|
2612
|
+
return disableExtension$1(id);
|
|
2613
|
+
};
|
|
2614
|
+
|
|
2599
2615
|
const handleClickDisable = async state => {
|
|
2616
|
+
const {
|
|
2617
|
+
extensionId
|
|
2618
|
+
} = state;
|
|
2619
|
+
await disableExtension(extensionId);
|
|
2620
|
+
// TODO when it fails, show dialog / alert?
|
|
2600
2621
|
return state;
|
|
2601
2622
|
};
|
|
2602
2623
|
|
|
@@ -3017,16 +3038,21 @@ const getBaseUrl = (extensionPath, platform) => {
|
|
|
3017
3038
|
}
|
|
3018
3039
|
};
|
|
3019
3040
|
|
|
3020
|
-
const getExtensionDetailButtons = (hasColorTheme, isBuiltin) => {
|
|
3041
|
+
const getExtensionDetailButtons = (hasColorTheme, isBuiltin, isDisabled) => {
|
|
3021
3042
|
const allActions = [{
|
|
3022
3043
|
label: setColorTheme$3(),
|
|
3023
3044
|
onClick: HandleClickSetColorTheme,
|
|
3024
3045
|
enabled: hasColorTheme,
|
|
3025
3046
|
name: SetColorTheme
|
|
3047
|
+
}, {
|
|
3048
|
+
label: enable(),
|
|
3049
|
+
onClick: HandleClickEnable,
|
|
3050
|
+
enabled: isDisabled,
|
|
3051
|
+
name: Enable
|
|
3026
3052
|
}, {
|
|
3027
3053
|
label: disable(),
|
|
3028
3054
|
onClick: HandleClickDisable,
|
|
3029
|
-
enabled:
|
|
3055
|
+
enabled: !isDisabled,
|
|
3030
3056
|
name: Disable
|
|
3031
3057
|
}, {
|
|
3032
3058
|
label: uninstall(),
|
|
@@ -3434,7 +3460,8 @@ const loadContent = async (state, platform, savedState, isTest = false) => {
|
|
|
3434
3460
|
scrollToTopEnabled: true
|
|
3435
3461
|
});
|
|
3436
3462
|
const isBuiltin = extension?.isBuiltin;
|
|
3437
|
-
const
|
|
3463
|
+
const disabled = extension?.disabled;
|
|
3464
|
+
const buttons = getExtensionDetailButtons(hasColorTheme, isBuiltin, disabled);
|
|
3438
3465
|
const enabledButtons = buttons.filter(button => button.enabled);
|
|
3439
3466
|
const size = getViewletSize(width);
|
|
3440
3467
|
const {
|
|
@@ -3465,6 +3492,7 @@ const loadContent = async (state, platform, savedState, isTest = false) => {
|
|
|
3465
3492
|
changelogScrollTop,
|
|
3466
3493
|
description,
|
|
3467
3494
|
detailsVirtualDom,
|
|
3495
|
+
disabled,
|
|
3468
3496
|
displaySize,
|
|
3469
3497
|
extension,
|
|
3470
3498
|
extensionId,
|