This commit is contained in:
Sandeep Somavarapu 2024-06-27 16:48:33 +02:00 committed by GitHub
parent 9a2ef8f356
commit 973dc3065b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -1493,7 +1493,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
menu: {
id: MenuId.ExtensionContext,
group: '0_install',
when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'uninstalled'), ContextKeyExpr.has('isGalleryExtension'), CONTEXT_SYNC_ENABLEMENT),
when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'uninstalled'), ContextKeyExpr.has('isGalleryExtension'), ContextKeyExpr.not('extensionDisallowInstall'), CONTEXT_SYNC_ENABLEMENT),
order: 1
},
run: async (accessor: ServicesAccessor, extensionId: string) => {
@ -1516,7 +1516,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
menu: {
id: MenuId.ExtensionContext,
group: '0_install',
when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'uninstalled'), ContextKeyExpr.has('isGalleryExtension'), ContextKeyExpr.has('extensionHasPreReleaseVersion'), CONTEXT_SYNC_ENABLEMENT),
when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'uninstalled'), ContextKeyExpr.has('isGalleryExtension'), ContextKeyExpr.has('extensionHasPreReleaseVersion'), ContextKeyExpr.not('extensionDisallowInstall'), CONTEXT_SYNC_ENABLEMENT),
order: 2
},
run: async (accessor: ServicesAccessor, extensionId: string) => {
@ -1540,7 +1540,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
menu: {
id: MenuId.ExtensionContext,
group: '0_install',
when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'uninstalled'), ContextKeyExpr.has('isGalleryExtension')),
when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'uninstalled'), ContextKeyExpr.has('isGalleryExtension'), ContextKeyExpr.not('extensionDisallowInstall')),
order: 3
},
run: async (accessor: ServicesAccessor, extensionId: string) => {

View file

@ -1170,6 +1170,7 @@ async function getContextMenuActionsGroups(extension: IExtension | undefined | n
cksOverlay.push(['galleryExtensionHasPreReleaseVersion', extension.gallery?.hasPreReleaseVersion]);
cksOverlay.push(['extensionHasPreReleaseVersion', extension.hasPreReleaseVersion]);
cksOverlay.push(['extensionHasReleaseVersion', extension.hasReleaseVersion]);
cksOverlay.push(['extensionDisallowInstall', !!extension.deprecationInfo?.disallowInstall]);
const [colorThemes, fileIconThemes, productIconThemes] = await Promise.all([workbenchThemeService.getColorThemes(), workbenchThemeService.getFileIconThemes(), workbenchThemeService.getProductIconThemes()]);
cksOverlay.push(['extensionHasColorThemes', colorThemes.some(theme => isThemeFromExtension(theme, extension))]);