mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
polish remote menu control actions
This commit is contained in:
parent
ae17cc9559
commit
78c865d70d
|
@ -414,12 +414,14 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr
|
|||
}
|
||||
}
|
||||
|
||||
items.push({
|
||||
type: 'separator'
|
||||
});
|
||||
|
||||
let entriesBeforeConfig = items.length;
|
||||
|
||||
if (RemoteStatusIndicator.SHOW_CLOSE_REMOTE_COMMAND_ID) {
|
||||
if (this.remoteAuthority) {
|
||||
if (items.length) {
|
||||
items.push({ type: 'separator' });
|
||||
}
|
||||
|
||||
items.push({
|
||||
type: 'item',
|
||||
id: RemoteStatusIndicator.CLOSE_REMOTE_COMMAND_ID,
|
||||
|
@ -434,28 +436,27 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr
|
|||
});
|
||||
}
|
||||
} else if (this.virtualWorkspaceScheme) {
|
||||
if (items.length) {
|
||||
items.push({ type: 'separator' });
|
||||
}
|
||||
|
||||
items.push({
|
||||
type: 'item',
|
||||
id: RemoteStatusIndicator.CLOSE_REMOTE_COMMAND_ID,
|
||||
label: nls.localize('closeRemoteWindow.title', 'Close Remote')
|
||||
label: nls.localize('closeVirtualWorkspace.title', 'Close Remote Workspace')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.remoteAuthority && this.extensionGalleryService.isEnabled()) {
|
||||
items.push({
|
||||
type: 'separator'
|
||||
});
|
||||
if (!this.remoteAuthority && !this.virtualWorkspaceScheme && this.extensionGalleryService.isEnabled()) {
|
||||
items.push({
|
||||
id: RemoteStatusIndicator.INSTALL_REMOTE_EXTENSIONS_ID,
|
||||
label: nls.localize('installRemotes', "Install Additional Remote Development Extensions..."),
|
||||
label: nls.localize('installRemotes', "Install Additional Remote Extensions..."),
|
||||
|
||||
alwaysShow: true
|
||||
});
|
||||
}
|
||||
|
||||
if (items.length === entriesBeforeConfig) {
|
||||
items.pop(); // remove the separator again
|
||||
}
|
||||
|
||||
return items;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue