diff --git a/src/Common/CosmosClient.ts b/src/Common/CosmosClient.ts index 54444d09e..a08695046 100644 --- a/src/Common/CosmosClient.ts +++ b/src/Common/CosmosClient.ts @@ -36,7 +36,7 @@ export const tokenProvider = async (requestInfo: Cosmos.RequestInfo) => { return authorizationToken; } - if (configContext.platform === Platform.Emulator) { + if (configContext.platform === Platform.Emulator || configContext.platform === Platform.VNextEmulator) { // TODO This SDK method mutates the headers object. Find a better one or fix the SDK. await Cosmos.setAuthorizationTokenHeaderUsingMasterKey(verb, resourceId, resourceType, headers, EmulatorMasterKey); return decodeURIComponent(headers.authorization); @@ -119,7 +119,7 @@ export const requestPlugin: Cosmos.Plugin = async (requestContext, diagnost }; export const endpoint = () => { - if (configContext.platform === Platform.Emulator) { + if (configContext.platform === Platform.Emulator || configContext.platform === Platform.VNextEmulator) { // In worker scope, _global(self).parent does not exist const location = _global.parent ? _global.parent.location : _global.location; return configContext.EMULATOR_ENDPOINT || location.origin; diff --git a/src/Explorer/Controls/Settings/SettingsSubComponents/ScaleComponent.tsx b/src/Explorer/Controls/Settings/SettingsSubComponents/ScaleComponent.tsx index 1928a68e6..608b4892b 100644 --- a/src/Explorer/Controls/Settings/SettingsSubComponents/ScaleComponent.tsx +++ b/src/Explorer/Controls/Settings/SettingsSubComponents/ScaleComponent.tsx @@ -45,7 +45,7 @@ export class ScaleComponent extends React.Component { constructor(props: ScaleComponentProps) { super(props); - this.isEmulator = configContext.platform === Platform.Emulator; + this.isEmulator = configContext.platform === Platform.Emulator || configContext.platform === Platform.VNextEmulator; this.offer = this.props.database?.offer() || this.props.collection?.offer(); this.databaseId = this.props.database?.id() || this.props.collection.databaseId; this.collectionId = this.props.collection?.id(); diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx index 9c2b1d779..0f3ac1152 100644 --- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx +++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx @@ -53,6 +53,7 @@ export function createStaticCommandBarButtons( }; if ( + isFeatureSupported(PlatformFeature.SynapseLink) && configContext.platform !== Platform.Fabric && userContext.apiType !== "Tables" && userContext.apiType !== "Cassandra" diff --git a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx index ac842a7d1..3705081b5 100644 --- a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx +++ b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx @@ -202,7 +202,7 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({ const styles = useStyles(); const explorerVersion = configContext.gitSha; - const isEmulator = configContext.platform === Platform.Emulator; + const isEmulator = configContext.platform === Platform.Emulator || configContext.platform === Platform.VNextEmulator; const shouldShowQueryPageOptions = userContext.apiType === "SQL"; const showRetrySettings = (userContext.apiType === "SQL" || userContext.apiType === "Tables" || userContext.apiType === "Gremlin") && diff --git a/src/Explorer/Tree/treeNodeUtil.tsx b/src/Explorer/Tree/treeNodeUtil.tsx index eacbc49f9..25f1326e0 100644 --- a/src/Explorer/Tree/treeNodeUtil.tsx +++ b/src/Explorer/Tree/treeNodeUtil.tsx @@ -21,7 +21,12 @@ import { useCommandBar } from "../Menus/CommandBar/CommandBarComponentAdapter"; import { useSelectedNode } from "../useSelectedNode"; export const shouldShowScriptNodes = (): boolean => { - return !isFabric() && configContext.platform !== Platform.Emulator && (userContext.apiType === "SQL" || userContext.apiType === "Gremlin"); + return ( + !isFabric() && + configContext.platform !== Platform.Emulator && + configContext.platform !== Platform.VNextEmulator && + (userContext.apiType === "SQL" || userContext.apiType === "Gremlin") + ); }; const TreeDatabaseIcon = ;