From be47a5c276d60c5385f7ac48d5f66e39e7942da9 Mon Sep 17 00:00:00 2001 From: Joey Wunderlich Date: Fri, 17 Apr 2026 11:00:55 -0700 Subject: [PATCH] indicate which provider last successfully signed in --- react-common/components/profile/SignInModal.tsx | 10 ++++++++-- react-common/styles/profile/profile.less | 15 ++++++++++++++- webapp/src/auth.ts | 11 +++++++++++ webapp/src/identity.tsx | 8 +++++++- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/react-common/components/profile/SignInModal.tsx b/react-common/components/profile/SignInModal.tsx index 19735000e9a4..23f59c7c3d62 100644 --- a/react-common/components/profile/SignInModal.tsx +++ b/react-common/components/profile/SignInModal.tsx @@ -17,10 +17,11 @@ export interface SignInModalProps { } resolvePath?: (path: string) => string mode?: "signin" | "signup" + lastUsedIdentityProvider?: pxt.IdentityProviderId } export const SignInModal = (props: SignInModalProps) => { - const { onSignIn, onClose, appMessage, dialogMessages, hideDismissButton } = props + const { onSignIn, onClose, appMessage, dialogMessages, hideDismissButton, lastUsedIdentityProvider } = props const { signInMessage, signUpMessage } = dialogMessages || { signInMessage: lf("Sign in to save your progress and access your work anytime, anywhere."), signUpMessage: lf("Join now to save your progress and access your work anytime, anywhere.") @@ -70,19 +71,24 @@ export const SignInModal = (props: SignInModalProps) => {
{pxt.auth.identityProviders().map((provider, index) => { + const isLastUsedProvider = provider.id === lastUsedIdentityProvider const title = mode === "signin" ? lf("Continue with {0}", provider.name) : lf("Sign up with {0}", provider.name) + const ariaLabel = isLastUsedProvider + ? lf("{0}. You last used this option.", title) + : title return (