mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Don't show browser preview action in Ports view web
Part of microsoft/vscode-remote-release#4436
This commit is contained in:
parent
d0205792b0
commit
9dd25c4d19
|
@ -45,6 +45,7 @@ import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems';
|
|||
import { forwardPortIcon, openBrowserIcon, openPreviewIcon, portsViewIcon, privatePortIcon, publicPortIcon, stopForwardIcon } from 'vs/workbench/contrib/remote/browser/remoteIcons';
|
||||
import { IExternalUriOpenerService } from 'vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService';
|
||||
import { CancellationTokenSource } from 'vs/base/common/cancellation';
|
||||
import { isWeb } from 'vs/base/common/platform';
|
||||
|
||||
export const forwardedPortsViewEnabled = new RawContextKey<boolean>('forwardedPortsViewEnabled', false);
|
||||
export const PORT_AUTO_FORWARD_SETTING = 'remote.autoForwardPorts';
|
||||
|
@ -553,6 +554,7 @@ const TunnelViewFocusContextKey = new RawContextKey<boolean>('tunnelViewFocus',
|
|||
const TunnelViewSelectionKeyName = 'tunnelViewSelection';
|
||||
const TunnelViewSelectionContextKey = new RawContextKey<ITunnelItem | undefined>(TunnelViewSelectionKeyName, undefined);
|
||||
const PortChangableContextKey = new RawContextKey<boolean>('portChangable', false);
|
||||
const WebContextKey = new RawContextKey<boolean>('isWeb', isWeb);
|
||||
|
||||
class TunnelDataTree extends WorkbenchAsyncDataTree<any, any, any> { }
|
||||
|
||||
|
@ -1297,7 +1299,7 @@ MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({
|
|||
id: OpenPortInPreviewAction.ID,
|
||||
title: OpenPortInPreviewAction.LABEL,
|
||||
},
|
||||
when: ContextKeyExpr.or(TunnelTypeContextKey.isEqualTo(TunnelType.Forwarded), TunnelTypeContextKey.isEqualTo(TunnelType.Detected))
|
||||
when: ContextKeyExpr.and(WebContextKey.negate(), ContextKeyExpr.or(TunnelTypeContextKey.isEqualTo(TunnelType.Forwarded), TunnelTypeContextKey.isEqualTo(TunnelType.Detected)))
|
||||
}));
|
||||
MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({
|
||||
group: '0_manage',
|
||||
|
@ -1370,7 +1372,7 @@ MenuRegistry.appendMenuItem(MenuId.TunnelInline, ({
|
|||
title: OpenPortInPreviewAction.LABEL,
|
||||
icon: openPreviewIcon
|
||||
},
|
||||
when: ContextKeyExpr.or(TunnelTypeContextKey.isEqualTo(TunnelType.Forwarded), TunnelTypeContextKey.isEqualTo(TunnelType.Detected))
|
||||
when: ContextKeyExpr.and(WebContextKey.negate(), ContextKeyExpr.or(TunnelTypeContextKey.isEqualTo(TunnelType.Forwarded), TunnelTypeContextKey.isEqualTo(TunnelType.Detected)))
|
||||
}));
|
||||
MenuRegistry.appendMenuItem(MenuId.TunnelInline, ({
|
||||
order: 0,
|
||||
|
|
Loading…
Reference in a new issue