Remote menu not showing when browsing marketplace (#151199)
Remote menu not showing when browsing marketplace #151198pull/151432/head
parent
e3a8e502ad
commit
3e8d82d2f7
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue