fixed formatting

This commit is contained in:
Sakshi Gupta
2026-02-16 16:24:11 +05:30
parent 2778bcec82
commit 09d266028f
3 changed files with 11 additions and 13 deletions
@@ -514,8 +514,7 @@ function createOpenTerminalButtonByKind(
const label = `Open ${terminalFriendlyName()} shell`; const label = `Open ${terminalFriendlyName()} shell`;
const tooltip = const tooltip =
"This feature is not yet available in your account's region. View supported regions here: https://aka.ms/cosmos-enable-notebooks."; "This feature is not yet available in your account's region. View supported regions here: https://aka.ms/cosmos-enable-notebooks.";
const isNativeAuthDisabled = const isNativeAuthDisabled = terminalKind === ViewModels.TerminalKind.VCoreMongo && isVCoreMongoNativeAuthDisabled();
terminalKind === ViewModels.TerminalKind.VCoreMongo && isVCoreMongoNativeAuthDisabled();
const disableButton = const disableButton =
(!useNotebook.getState().isNotebooksEnabledForAccount && !useNotebook.getState().isNotebookEnabled) || (!useNotebook.getState().isNotebooksEnabledForAccount && !useNotebook.getState().isNotebookEnabled) ||
isNativeAuthDisabled; isNativeAuthDisabled;
@@ -524,11 +523,10 @@ function createOpenTerminalButtonByKind(
iconAlt: label, iconAlt: label,
onCommandClick: () => { onCommandClick: () => {
if (isNativeAuthDisabled) { if (isNativeAuthDisabled) {
useDialog.getState().showOkModalDialog( useDialog.getState().showOkModalDialog("Native Authentication Disabled", VCoreMongoNativeAuthDisabledMessage, {
"Native Authentication Disabled", linkText: "Learn more",
VCoreMongoNativeAuthDisabledMessage, linkUrl: VCoreMongoNativeAuthLearnMoreUrl,
{ linkText: "Learn more", linkUrl: VCoreMongoNativeAuthLearnMoreUrl }, });
);
return; return;
} }
if (useNotebook.getState().isNotebookEnabled || userContext.features.enableCloudShell) { if (useNotebook.getState().isNotebookEnabled || userContext.features.enableCloudShell) {
+6 -5
View File
@@ -436,11 +436,12 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({ explorer }) => {
description: "Create a collection and interact with data using MongoDB's shell interface", description: "Create a collection and interact with data using MongoDB's shell interface",
onClick: () => { onClick: () => {
if (isNativeAuthDisabled) { if (isNativeAuthDisabled) {
useDialog.getState().showOkModalDialog( useDialog
"Native Authentication Disabled", .getState()
VCoreMongoNativeAuthDisabledMessage, .showOkModalDialog("Native Authentication Disabled", VCoreMongoNativeAuthDisabledMessage, {
{ linkText: "Learn more", linkUrl: VCoreMongoNativeAuthLearnMoreUrl }, linkText: "Learn more",
); linkUrl: VCoreMongoNativeAuthLearnMoreUrl,
});
} else { } else {
container.openNotebookTerminal(TerminalKind.VCoreMongo); container.openNotebookTerminal(TerminalKind.VCoreMongo);
} }
-1
View File
@@ -227,4 +227,3 @@ export function apiType(account: DatabaseAccount | undefined): ApiType {
} }
export { updateUserContext, userContext }; export { updateUserContext, userContext };