display sign in instructions for emails that exist #84

Merged
akinwale merged 3 commits from existing-email into master 2019-12-05 19:30:24 +01:00
8 changed files with 29 additions and 16 deletions
Showing only changes of commit ab84327659 - Show all commits

4
package-lock.json generated
View file

@ -5649,8 +5649,8 @@
}
},
"lbryinc": {
"version": "github:lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
"from": "github:lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
"version": "github:lbryio/lbryinc#2aedf5a188f028f61c45bc7ed0c747a2d4ae453a",
"from": "github:lbryio/lbryinc#2aedf5a188f028f61c45bc7ed0c747a2d4ae453a",
"requires": {
"reselect": "^3.0.0"
}

View file

@ -13,7 +13,7 @@
"@expo/vector-icons": "^8.1.0",
"gfycat-style-urls": "^1.0.3",
"lbry-redux": "lbryio/lbry-redux#8ac92e3abfa0a9aacdb2fa4a144c3fadc4da6b11",
"lbryinc": "lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
"lbryinc": "lbryio/lbryinc#2aedf5a188f028f61c45bc7ed0c747a2d4ae453a",
"lodash": ">=4.17.11",
"merge": ">=1.2.1",
"moment": "^2.22.1",

View file

@ -8,6 +8,7 @@ import {
doUserEmailNew,
doUserResendVerificationEmail,
selectAuthToken,
selectEmailAlreadyExists,
selectEmailNewErrorMessage,
selectEmailNewIsPending,
selectEmailToVerify,
@ -27,6 +28,7 @@ const select = state => ({
authenticating: selectAuthenticationIsPending(state),
authToken: selectAuthToken(state),
emailToVerify: selectEmailToVerify(state),
emailAlreadyExists: selectEmailAlreadyExists(state),
emailNewErrorMessage: selectEmailNewErrorMessage(state),
emailNewPending: selectEmailNewIsPending(state),
hasSyncedWallet: selectHasSyncedWallet(state),

View file

@ -4,7 +4,7 @@ import { ActivityIndicator, Linking, NativeModules, Platform, Switch, Text, Text
import AsyncStorage from '@react-native-community/async-storage';
import Button from 'component/button';
import Colors from 'styles/colors';
import Constants from 'constants';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import Icon from 'react-native-vector-icons/FontAwesome5';
import firstRunStyle from 'styles/firstRun';
@ -17,17 +17,19 @@ class EmailVerifyPage extends React.PureComponent {
};
render() {
const { onEmailViewLayout, email } = this.props;
const { onEmailViewLayout, email, emailAlreadyExists } = this.props;
const content = (
<View onLayout={() => onEmailViewLayout('verify')}>
<Text style={firstRunStyle.title}>Verify Email</Text>
<Text style={firstRunStyle.title}>{emailAlreadyExists ? 'Sign In' : 'Verify Email'}</Text>
<Text style={firstRunStyle.paragraph}>
An email has been sent to{' '}
<Text style={firstRunStyle.nowrap} numberOfLines={1}>
{email}
</Text>
. Please follow the instructions in the message to verify your email address.
An email has been sent to
{'\n\n'}
{email}
{'\n\n'}
Please follow the instructions in the message to{' '}
{emailAlreadyExists ? 'complete signing in' : 'verify your email address'}.
</Text>
<View style={firstRunStyle.buttonContainer}>
kauffj commented 2019-12-03 18:20:29 +01:00 (Migrated from github.com)
Review

i18n

i18n

View file

@ -318,6 +318,7 @@ class FirstRunScreen extends React.PureComponent {
authenticating,
authToken,
checkSync,
emailAlreadyExists,
emailNewErrorMessage,
emailNewPending,
emailToVerify,
@ -358,6 +359,7 @@ class FirstRunScreen extends React.PureComponent {
<EmailVerifyPage
onEmailViewLayout={this.onEmailViewLayout}
email={this.state.email}
emailAlreadyExists={emailAlreadyExists}
notify={notify}
resendVerificationEmail={resendVerificationEmail}
/>

View file

@ -14,6 +14,7 @@ import {
selectPhoneToVerify,
selectPhoneVerifyIsPending,
selectPhoneVerifyErrorMessage,
selectEmailAlreadyExists,
selectEmailNewErrorMessage,
selectEmailNewIsPending,
selectEmailToVerify,
@ -32,6 +33,7 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import Verification from './view';
const select = state => ({
emailAlreadyExists: selectEmailAlreadyExists(state),
emailToVerify: selectEmailToVerify(state),
emailNewErrorMessage: selectEmailNewErrorMessage(state),
emailNewPending: selectEmailNewIsPending(state),

View file

@ -105,12 +105,12 @@ class EmailVerifyPage extends React.PureComponent {
};
render() {
const { emailNewPending } = this.props;
const { emailAlreadyExists, emailNewPending } = this.props;
return (
<View style={firstRunStyle.container}>
<Text style={rewardStyle.verificationTitle}>
{Constants.PHASE_COLLECTION === this.state.phase ? 'Email' : 'Verify Email'}
{Constants.PHASE_COLLECTION === this.state.phase ? 'Email' : emailAlreadyExists ? 'Sign In' : 'Verify Email'}
</Text>
{Constants.PHASE_COLLECTION === this.state.phase && (
<View>
@ -138,7 +138,7 @@ class EmailVerifyPage extends React.PureComponent {
<Button
style={rewardStyle.verificationButton}
theme={'light'}
text={'Send verification email'}
text={'Continue'}
onPress={this.onSendVerificationPressed}
/>
)}
@ -154,8 +154,11 @@ class EmailVerifyPage extends React.PureComponent {
{Constants.PHASE_VERIFICATION === this.state.phase && (
<View>
<Text style={firstRunStyle.paragraph}>
An email has been sent to <Text style={firstRunStyle.nowrap}>{this.state.email}</Text>. Please follow the
instructions in the message to verify your email address.
An email has been sent to {'\n\n'}
{this.state.email}
{'\n\n'}
Please follow the instructions in the message to{' '}
{emailAlreadyExists ? 'finish signing in' : 'verify your email address'}.
</Text>
<View style={rewardStyle.buttonContainer}>

View file

@ -118,6 +118,7 @@ class VerificationScreen extends React.PureComponent {
addUserEmail,
checkSync,
emailNewErrorMessage,
emailAlreadyExists,
emailNewPending,
emailToVerify,
getSync,
@ -148,6 +149,7 @@ class VerificationScreen extends React.PureComponent {
page = (
<EmailVerifyPage
addUserEmail={addUserEmail}
emailAlreadyExists={emailAlreadyExists}
emailNewErrorMessage={emailNewErrorMessage}
emailNewPending={emailNewPending}
emailToVerify={emailToVerify}