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
This commit is contained in:
Dakota Nelson 2016-02-03 15:37:23 -08:00
parent f162353ce4
commit 40cb19d122

View file

@ -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})