From 9587e96084ffc3f866f7647d69d5361b03699c4b Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 24 Jun 2021 18:30:16 +0200 Subject: [PATCH] do not show download locally action in web --- .../contrib/extensions/browser/extensionsActions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 55b3399d616..1375e63f672 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -58,7 +58,7 @@ import { IContextMenuProvider } from 'vs/base/browser/contextmenu'; import { ILogService } from 'vs/platform/log/common/log'; import * as Constants from 'vs/workbench/contrib/logs/common/logConstants'; import { infoIcon, manageExtensionIcon, syncEnabledIcon, syncIgnoredIcon, trustIcon, warningIcon } from 'vs/workbench/contrib/extensions/browser/extensionsIcons'; -import { isWeb } from 'vs/base/common/platform'; +import { isIOS, isWeb } from 'vs/base/common/platform'; import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService'; import { IWorkspaceTrustManagementService } from 'vs/platform/workspace/common/workspaceTrust'; import { isVirtualWorkspace } from 'vs/platform/remote/common/remoteHosts'; @@ -110,6 +110,7 @@ export class PromptExtensionInstallFailureAction extends Action { @IDialogService private readonly dialogService: IDialogService, @ICommandService private readonly commandService: ICommandService, @ILogService private readonly logService: ILogService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, ) { super('extension.promptExtensionInstallFailure'); } @@ -136,9 +137,8 @@ export class PromptExtensionInstallFailureAction extends Action { return; } - const promptChoices: IPromptChoice[] = []; - if (this.extension.gallery && this.productService.extensionsGallery) { + if (this.extension.gallery && this.productService.extensionsGallery && (this.extensionManagementServerService.localExtensionManagementServer || this.extensionManagementServerService.remoteExtensionManagementServer) && !isIOS) { promptChoices.push({ label: localize('download', "Try Downloading Manually..."), run: () => this.openerService.open(URI.parse(`${this.productService.extensionsGallery!.serviceUrl}/publishers/${this.extension.publisher}/vsextensions/${this.extension.name}/${this.version}/vspackage`)).then(() => { -- GitLab