From 40cb19d12217281c116a09e9c8854511da07ecff Mon Sep 17 00:00:00 2001 From: Dakota Nelson Date: Wed, 3 Feb 2016 15:37:23 -0800 Subject: [PATCH] Disallow Gmail accounts from entering IMAP flow Summary: The error message from D2515 is being upgraded to also disable the continue button so that a user is unable to sync an @gmail.com account using the IMAP flow. Test Plan: Tested locally. Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D2516 --- internal_packages/onboarding/lib/account-settings-page.cjsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal_packages/onboarding/lib/account-settings-page.cjsx b/internal_packages/onboarding/lib/account-settings-page.cjsx index 9dd83d4e4..3eab3ee5d 100644 --- a/internal_packages/onboarding/lib/account-settings-page.cjsx +++ b/internal_packages/onboarding/lib/account-settings-page.cjsx @@ -156,7 +156,10 @@ class AccountSettingsPage extends React.Component if providerField.type == "email" and event.target.value if event.target.value.endsWith('@gmail.com') # set a state that contains a "this is a gmail account" message - @setState({errorMessage: "This looks like a Gmail account. You should go back and sign in to Gmail instead."}) + errorFields = _.uniq(@state.errorFieldNames.concat([field])) + @setState + errorMessage: "This looks like a Gmail account. You should go back and sign in to Gmail instead." + errorFieldNames: errorFields @_resize() else @setState({errorMessage: null})