From b9b7af2bbd543f4bfd98a4dec1f2a821cdcb85eb Mon Sep 17 00:00:00 2001 From: Liam Cardenas Date: Wed, 10 Jan 2018 22:16:03 -0800 Subject: [PATCH] Renamed userEmail... to userField... --- .../{userEmailNew => userFieldNew}/index.js | 8 ++++---- .../{userEmailNew => userFieldNew}/view.jsx | 4 ++-- .../{userEmailVerify => userFieldVerify}/index.js | 10 +++++----- .../{userEmailVerify => userFieldVerify}/view.jsx | 4 ++-- src/renderer/index.js | 4 ++-- src/renderer/modal/modalPhoneCollection/view.jsx | 12 ++++++------ src/renderer/page/auth/view.jsx | 8 ++++---- src/renderer/redux/actions/user.js | 8 ++++---- 8 files changed, 29 insertions(+), 29 deletions(-) rename src/renderer/component/{userEmailNew => userFieldNew}/index.js (60%) rename src/renderer/component/{userEmailNew => userFieldNew}/view.jsx (94%) rename src/renderer/component/{userEmailVerify => userFieldVerify}/index.js (61%) rename src/renderer/component/{userEmailVerify => userFieldVerify}/view.jsx (95%) diff --git a/src/renderer/component/userEmailNew/index.js b/src/renderer/component/userFieldNew/index.js similarity index 60% rename from src/renderer/component/userEmailNew/index.js rename to src/renderer/component/userFieldNew/index.js index 0228a4aaa..78c7810be 100644 --- a/src/renderer/component/userEmailNew/index.js +++ b/src/renderer/component/userFieldNew/index.js @@ -1,8 +1,8 @@ import React from 'react'; import { connect } from 'react-redux'; -import { doUserEmailNew, doUserInviteNew } from 'redux/actions/user'; +import { doUserFieldNew, doUserInviteNew } from 'redux/actions/user'; import { selectEmailNewIsPending, selectEmailNewErrorMessage } from 'redux/selectors/user'; -import UserEmailNew from './view'; +import UserFieldNew from './view'; const select = state => ({ isPending: selectEmailNewIsPending(state), @@ -10,7 +10,7 @@ const select = state => ({ }); const perform = dispatch => ({ - addUserEmail: email => dispatch(doUserEmailNew(email)), + addUserEmail: email => dispatch(doUserFieldNew(email)), }); -export default connect(select, perform)(UserEmailNew); +export default connect(select, perform)(UserFieldNew); diff --git a/src/renderer/component/userEmailNew/view.jsx b/src/renderer/component/userFieldNew/view.jsx similarity index 94% rename from src/renderer/component/userEmailNew/view.jsx rename to src/renderer/component/userFieldNew/view.jsx index 661adb611..2dd0fffd6 100644 --- a/src/renderer/component/userEmailNew/view.jsx +++ b/src/renderer/component/userFieldNew/view.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { Form, FormRow, Submit } from 'component/form.js'; -class UserEmailNew extends React.PureComponent { +class UserFieldNew extends React.PureComponent { constructor(props) { super(props); @@ -52,4 +52,4 @@ class UserEmailNew extends React.PureComponent { } } -export default UserEmailNew; +export default UserFieldNew; diff --git a/src/renderer/component/userEmailVerify/index.js b/src/renderer/component/userFieldVerify/index.js similarity index 61% rename from src/renderer/component/userEmailVerify/index.js rename to src/renderer/component/userFieldVerify/index.js index f8c854ca1..677df5b25 100644 --- a/src/renderer/component/userEmailVerify/index.js +++ b/src/renderer/component/userFieldVerify/index.js @@ -1,12 +1,12 @@ import React from 'react'; import { connect } from 'react-redux'; -import { doUserEmailVerify, doUserEmailVerifyFailure } from 'redux/actions/user'; +import { doUserFieldVerify, doUserFieldVerifyFailure } from 'redux/actions/user'; import { selectEmailVerifyIsPending, selectEmailToVerify, selectEmailVerifyErrorMessage, } from 'redux/selectors/user'; -import UserEmailVerify from './view'; +import UserFieldVerify from './view'; const select = state => ({ isPending: selectEmailVerifyIsPending(state), @@ -15,8 +15,8 @@ const select = state => ({ }); const perform = dispatch => ({ - verifyUserEmail: (code, recaptcha) => dispatch(doUserEmailVerify(code, recaptcha)), - verifyUserEmailFailure: error => dispatch(doUserEmailVerifyFailure(error)), + verifyUserEmail: (code, recaptcha) => dispatch(doUserFieldVerify(code, recaptcha)), + verifyUserEmailFailure: error => dispatch(doUserFieldVerifyFailure(error)), }); -export default connect(select, perform)(UserEmailVerify); +export default connect(select, perform)(UserFieldVerify); diff --git a/src/renderer/component/userEmailVerify/view.jsx b/src/renderer/component/userFieldVerify/view.jsx similarity index 95% rename from src/renderer/component/userEmailVerify/view.jsx rename to src/renderer/component/userFieldVerify/view.jsx index 3304730b9..450571b8e 100644 --- a/src/renderer/component/userEmailVerify/view.jsx +++ b/src/renderer/component/userFieldVerify/view.jsx @@ -2,7 +2,7 @@ import React from 'react'; import Link from 'component/link'; import { Form, FormRow, Submit } from 'component/form.js'; -class UserEmailVerify extends React.PureComponent { +class UserFieldVerify extends React.PureComponent { constructor(props) { super(props); @@ -59,4 +59,4 @@ class UserEmailVerify extends React.PureComponent { } } -export default UserEmailVerify; +export default UserFieldVerify; diff --git a/src/renderer/index.js b/src/renderer/index.js index fd6dcc1f7..8d92c6ba2 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -12,7 +12,7 @@ import { Provider } from 'react-redux'; import { doConditionalAuthNavigate, doDaemonReady, doShowSnackBar } from 'redux/actions/app'; import { doNavigate } from 'redux/actions/navigation'; import { doDownloadLanguages } from 'redux/actions/settings'; -import { doUserEmailVerify } from 'redux/actions/user'; +import { doUserFieldVerify } from 'redux/actions/user'; import 'scss/all.scss'; import store from 'store'; import app from './app'; @@ -35,7 +35,7 @@ ipcRenderer.on('open-uri-requested', (event, uri, newSession) => { } if (verification.token && verification.recaptcha) { app.store.dispatch(doConditionalAuthNavigate(newSession)); - app.store.dispatch(doUserEmailVerify(verification.token, verification.recaptcha)); + app.store.dispatch(doUserFieldVerify(verification.token, verification.recaptcha)); } else { app.store.dispatch(doShowSnackBar({ message: 'Invalid Verification URI' })); } diff --git a/src/renderer/modal/modalPhoneCollection/view.jsx b/src/renderer/modal/modalPhoneCollection/view.jsx index 16b8cbe08..a8b56c844 100644 --- a/src/renderer/modal/modalPhoneCollection/view.jsx +++ b/src/renderer/modal/modalPhoneCollection/view.jsx @@ -1,8 +1,8 @@ import React from 'react'; import { Modal } from 'modal/modal'; import Link from 'component/link/index'; -import UserEmailNew from 'component/userEmailNew'; -import UserEmailVerify from 'component/userEmailVerify'; +import UserFieldNew from 'component/userFieldNew'; +import UserFieldVerify from 'component/userFieldVerify'; class ModalPhoneCollection extends React.PureComponent { renderInner() { @@ -11,9 +11,9 @@ class ModalPhoneCollection extends React.PureComponent { const cancelButton = ; if (!user.has_verified_email && !email) { - return ; + return ; } else if (!user.has_verified_email) { - return ; + return ; } closeModal(); } @@ -27,9 +27,9 @@ class ModalPhoneCollection extends React.PureComponent { } return ( - +
-

Can We Stay In Touch?

+

Verify Your Phone

{this.renderInner()}
diff --git a/src/renderer/page/auth/view.jsx b/src/renderer/page/auth/view.jsx index 423ce8597..908431e26 100644 --- a/src/renderer/page/auth/view.jsx +++ b/src/renderer/page/auth/view.jsx @@ -1,8 +1,8 @@ import React from 'react'; import { BusyMessage } from 'component/common'; import Link from 'component/link'; -import UserEmailNew from 'component/userEmailNew'; -import UserEmailVerify from 'component/userEmailVerify'; +import UserFieldNew from 'component/userFieldNew'; +import UserFieldVerify from 'component/userFieldVerify'; import UserVerify from 'component/userVerify'; export class AuthPage extends React.PureComponent { @@ -45,9 +45,9 @@ export class AuthPage extends React.PureComponent { if (isPending) { return [, true]; } else if (user && !user.has_verified_email && !email) { - return [, true]; + return [, true]; } else if (user && !user.has_verified_email) { - return [, true]; + return [, true]; } else if (user && !user.is_identity_verified) { return [, false]; } diff --git a/src/renderer/redux/actions/user.js b/src/renderer/redux/actions/user.js index 785a45a09..0c289e2ca 100644 --- a/src/renderer/redux/actions/user.js +++ b/src/renderer/redux/actions/user.js @@ -78,7 +78,7 @@ export function doUserFetch() { }; } -export function doUserEmailNew(email) { +export function doUserFieldNew(email) { return dispatch => { dispatch({ type: ACTIONS.USER_EMAIL_NEW_STARTED, @@ -116,14 +116,14 @@ export function doUserEmailNew(email) { }; } -export function doUserEmailVerifyFailure(error) { +export function doUserFieldVerifyFailure(error) { return { type: ACTIONS.USER_EMAIL_VERIFY_FAILURE, data: { error }, }; } -export function doUserEmailVerify(verificationToken, recaptcha) { +export function doUserFieldVerify(verificationToken, recaptcha) { return (dispatch, getState) => { const email = selectEmailToVerify(getState()); @@ -154,7 +154,7 @@ export function doUserEmailVerify(verificationToken, recaptcha) { throw new Error('Your email is still not verified.'); // shouldn't happen } }) - .catch(error => dispatch(doUserEmailVerifyFailure(error))); + .catch(error => dispatch(doUserFieldVerifyFailure(error))); }; }