diff options
author | Martin Aeschlimann <martinae@microsoft.com> | 2022-06-07 16:40:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-07 16:40:32 +0300 |
commit | 3e8d82d2f7e2b06de12bdbda3993caba18ce45ee (patch) | |
tree | 449b66919403cea3071ebee513fd0e9ec66040c1 /src/vs | |
parent | e3a8e502ad7263836d0bc34cbcefbfc7bd65104f (diff) |
Remote menu not showing when browsing marketplace (#151199)
Remote menu not showing when browsing marketplace #151198
Diffstat (limited to 'src/vs')
-rw-r--r-- | src/vs/workbench/contrib/remote/browser/remoteIndicator.ts | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/vs/workbench/contrib/remote/browser/remoteIndicator.ts b/src/vs/workbench/contrib/remote/browser/remoteIndicator.ts index 954266d0fa3..a974d00c0fc 100644 --- a/src/vs/workbench/contrib/remote/browser/remoteIndicator.ts +++ b/src/vs/workbench/contrib/remote/browser/remoteIndicator.ts @@ -306,7 +306,7 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr } return; } - // show when in a virtual workspace + // Show when in a virtual workspace if (this.virtualWorkspaceLocation) { // Workspace with label: indicate editing source const workspaceLabel = this.labelService.getHostLabel(this.virtualWorkspaceLocation.scheme, this.virtualWorkspaceLocation.authority); @@ -330,8 +330,8 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr return; } } - // Remote actions: offer menu - if (this.getRemoteMenuActions().length > 0) { + // Show when there are commands other than the 'install additional remote extensions' command. + if (this.hasRemoteMenuCommands(true)) { this.renderRemoteStatusIndicator(`$(remote)`, nls.localize('noHost.tooltip', "Open a Remote Window")); return; } @@ -343,7 +343,7 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr private renderRemoteStatusIndicator(text: string, tooltip?: string | IMarkdownString, command?: string, showProgress?: boolean): void { const name = nls.localize('remoteHost', "Remote Host"); - if (typeof command !== 'string' && this.getRemoteMenuActions().length > 0) { + if (typeof command !== 'string' && (this.hasRemoteMenuCommands(false))) { command = RemoteStatusIndicator.REMOTE_ACTIONS_COMMAND_ID; } @@ -493,4 +493,15 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr quickPick.show(); } + + private hasRemoteMenuCommands(ignoreInstallAdditional: boolean): boolean { + if (this.remoteAuthority !== undefined || this.virtualWorkspaceLocation !== undefined) { + if (RemoteStatusIndicator.SHOW_CLOSE_REMOTE_COMMAND_ID) { + return true; + } + } else if (!ignoreInstallAdditional && this.extensionGalleryService.isEnabled()) { + return true; + } + return this.getRemoteMenuActions().length > 0; + } } |