From 158ddb3e5bb5b4a4955b2fd0baa11ca4ba181b78 Mon Sep 17 00:00:00 2001 From: Tian Yuan Date: Wed, 14 Apr 2021 16:53:45 +0800 Subject: [PATCH] feat: login info change (#250) * feat: login info change * feat: click LearnMore and popup again * feat: fix button name * feat: fix pr comment Co-authored-by: tianyuan --- .../src/commonlib/appStudioLogin.ts | 17 ++++++++++++++--- .../src/commonlib/azureLogin.ts | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/vscode-extension/src/commonlib/appStudioLogin.ts b/packages/vscode-extension/src/commonlib/appStudioLogin.ts index 7ee2fdaf58..8c506d59d2 100644 --- a/packages/vscode-extension/src/commonlib/appStudioLogin.ts +++ b/packages/vscode-extension/src/commonlib/appStudioLogin.ts @@ -126,13 +126,24 @@ export class AppStudioLogin extends login implements AppStudioTokenProvider { } private async doesUserConfirmLogin(): Promise { - const warningMsg = "Please sign into your M365 account"; + const warningMsg = "The Teams Toolkit requires a Microsoft 365 account. This is the account that you use to log in to Microsoft Teams. The Teams Toolkit will publish your application using this Microsoft 365 account.\nYou can quickly get started by using a developer account from the M365 Developer Program."; const confirm = "Confirm"; - const userSelected: string | undefined = await vscode.window.showWarningMessage( + const learnMore = "Learn More"; + let userSelected: string | undefined = await vscode.window.showWarningMessage( warningMsg, { modal: true }, - confirm + confirm, + learnMore ); + do { + vscode.env.openExternal(vscode.Uri.parse("https://developer.microsoft.com/en-us/microsoft-365/dev-program")); + userSelected = await vscode.window.showWarningMessage( + warningMsg, + { modal: true }, + confirm, + learnMore + ); + } while (userSelected === learnMore); return Promise.resolve(userSelected === confirm); } diff --git a/packages/vscode-extension/src/commonlib/azureLogin.ts b/packages/vscode-extension/src/commonlib/azureLogin.ts index 390eb53d83..b8e83a527a 100644 --- a/packages/vscode-extension/src/commonlib/azureLogin.ts +++ b/packages/vscode-extension/src/commonlib/azureLogin.ts @@ -180,7 +180,7 @@ export class AzureAccountManager extends login implements AzureAccountProvider { } private async doesUserConfirmLogin(): Promise { - const warningMsg = "Please sign into your Azure account"; + const warningMsg = "The Teams Toolkit requires an Azure account and subscription to deploy Azure resources for your application."; const confirm = "Confirm"; const userSelected: string | undefined = await vscode.window.showWarningMessage( warningMsg,