Compare commits
3 commits
master
...
existing-e
Author | SHA1 | Date | |
---|---|---|---|
|
817fdf38a6 | ||
|
e137e8f76c | ||
|
ab84327659 |
10 changed files with 47 additions and 29 deletions
|
@ -8,6 +8,7 @@ import {
|
|||
doUserEmailNew,
|
||||
doUserResendVerificationEmail,
|
||||
selectAuthToken,
|
||||
selectEmailAlreadyExists,
|
||||
selectEmailNewErrorMessage,
|
||||
selectEmailNewIsPending,
|
||||
selectEmailToVerify,
|
||||
|
@ -28,6 +29,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),
|
||||
|
|
|
@ -64,7 +64,7 @@ class EmailCollectPage extends React.PureComponent {
|
|||
}}
|
||||
/>
|
||||
<Text style={firstRunStyle.paragraph}>
|
||||
{__('An account will allow you to earn rewards and keep your account and settings synced.')}
|
||||
{__('A lbry.tv account allows you to earn rewards, backup your wallet, and keep everything in sync.')}
|
||||
</Text>
|
||||
<Text style={firstRunStyle.infoParagraph}>
|
||||
{__('This information is disclosed only to LBRY, Inc. and not to the LBRY network.')}
|
||||
|
|
|
@ -17,24 +17,26 @@ 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'}
|
||||
{emailAlreadyExists && __('Please click the link in the message to complete signing in')}
|
||||
{!emailAlreadyExists && __('Please click the link in the message to verify your email address')}.
|
||||
</Text>
|
||||
|
||||
<View style={firstRunStyle.buttonContainer}>
|
||||
<Button
|
||||
style={firstRunStyle.verificationButton}
|
||||
theme={'light'}
|
||||
text={'Resend'}
|
||||
text={__('Resend')}
|
||||
onPress={this.onResendPressed}
|
||||
/>
|
||||
</View>
|
||||
|
|
|
@ -379,6 +379,7 @@ class FirstRunScreen extends React.PureComponent {
|
|||
authenticating,
|
||||
authToken,
|
||||
checkSync,
|
||||
emailAlreadyExists,
|
||||
emailNewErrorMessage,
|
||||
emailNewPending,
|
||||
emailToVerify,
|
||||
|
@ -420,6 +421,7 @@ class FirstRunScreen extends React.PureComponent {
|
|||
<EmailVerifyPage
|
||||
onEmailViewLayout={this.onEmailViewLayout}
|
||||
email={this.state.email}
|
||||
emailAlreadyExists={emailAlreadyExists}
|
||||
notify={notify}
|
||||
resendVerificationEmail={resendVerificationEmail}
|
||||
/>
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -105,16 +105,20 @@ 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>
|
||||
<Text style={firstRunStyle.paragraph}>Please provide an email address.</Text>
|
||||
<Text style={firstRunStyle.paragraph}>{__('Please provide an email address.')}</Text>
|
||||
<TextInput
|
||||
style={firstRunStyle.emailInput}
|
||||
placeholder={this.state.placeholder}
|
||||
|
@ -138,7 +142,7 @@ class EmailVerifyPage extends React.PureComponent {
|
|||
<Button
|
||||
style={rewardStyle.verificationButton}
|
||||
theme={'light'}
|
||||
text={__('Send verification email')}
|
||||
text={__('Continue')}
|
||||
onPress={this.onSendVerificationPressed}
|
||||
/>
|
||||
)}
|
||||
|
@ -154,8 +158,12 @@ 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'}
|
||||
{emailAlreadyExists && __('Please click the link in the message to complete signing in.')}
|
||||
{!emailAlreadyExists && __('Please click the link in the message to verify your email address')}
|
||||
</Text>
|
||||
|
||||
<View style={rewardStyle.buttonContainer}>
|
||||
|
|
|
@ -20,22 +20,22 @@ class ManualVerifyPage extends React.PureComponent {
|
|||
render() {
|
||||
return (
|
||||
<View style={firstRunStyle.container}>
|
||||
<Text style={rewardStyle.verificationTitle}>Manual Reward Verification</Text>
|
||||
<Text style={rewardStyle.verificationTitle}>{__('Manual Reward Verification')}</Text>
|
||||
<Text style={firstRunStyle.spacedParagraph}>
|
||||
{__(
|
||||
'This account must undergo review before you can participate in the rewards program. This can take anywhere from several minutes to several days.'
|
||||
)}
|
||||
</Text>
|
||||
<Text style={firstRunStyle.spacedParagraph}>
|
||||
If you continue to see this message, please request to be verified on the{' '}
|
||||
{__('If you continue to see this message, please request to be verified on the')}{' '}
|
||||
<Link
|
||||
style={rewardStyle.underlinedTextLink}
|
||||
href="https://discordapp.com/invite/Z3bERWA"
|
||||
text="LBRY Discord server"
|
||||
text={__('LBRY Discord server')}
|
||||
/>
|
||||
.
|
||||
</Text>
|
||||
<Text style={firstRunStyle.spacedParagraph}>Please enjoy free content in the meantime!</Text>
|
||||
<Text style={firstRunStyle.spacedParagraph}>{__('Please enjoy free content in the meantime!')}</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ class PhoneVerifyPage extends React.PureComponent {
|
|||
notify({ message: String(phoneVerifyErrorMessage) });
|
||||
this.setState({ codeVerifyStarted: false, phoneVerifyFailed: true });
|
||||
} else {
|
||||
notify({ message: 'Your phone number was successfully verified.' });
|
||||
notify({ message: __('Your phone number was successfully verified.') });
|
||||
this.setState({ codeVerifySuccessful: true, phoneVerifyFailed: false });
|
||||
if (onPhoneVerifySuccessful) {
|
||||
onPhoneVerifySuccessful();
|
||||
|
@ -103,7 +103,7 @@ class PhoneVerifyPage extends React.PureComponent {
|
|||
|
||||
if (!this.phoneInput.isValidNumber()) {
|
||||
return notify({
|
||||
message: 'Please provide a valid telephone number.',
|
||||
message: __('Please provide a valid telephone number.'),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ class PhoneVerifyPage extends React.PureComponent {
|
|||
return (
|
||||
<View style={firstRunStyle.container}>
|
||||
<Text style={rewardStyle.verificationTitle}>
|
||||
{this.state.phase === Constants.PHASE_VERIFICATION ? 'Verify ' : ''}Phone Number
|
||||
{this.state.phase === Constants.PHASE_VERIFICATION ? __('Verify Phone Number') : __('Phone Number')}
|
||||
</Text>
|
||||
|
||||
<View style={rewardStyle.phoneVerificationContainer}>
|
||||
|
@ -169,7 +169,7 @@ class PhoneVerifyPage extends React.PureComponent {
|
|||
<Button
|
||||
style={[rewardStyle.verificationButton, rewardStyle.topMarginMedium]}
|
||||
theme={'light'}
|
||||
text={'Send verification text'}
|
||||
text={__('Send verification text')}
|
||||
onPress={this.onSendTextPressed}
|
||||
/>
|
||||
)}
|
||||
|
@ -187,7 +187,7 @@ class PhoneVerifyPage extends React.PureComponent {
|
|||
{!phoneVerifyIsPending && !this.codeVerifyStarted && (
|
||||
<View>
|
||||
<Text style={[rewardStyle.bottomMarginSmall, firstRunStyle.paragraph]}>
|
||||
Please enter the verification code sent to {phone}.
|
||||
{__('Please enter the verification code sent to %phone%', { phone })}.
|
||||
</Text>
|
||||
<TextInput
|
||||
style={rewardStyle.verificationCodeInput}
|
||||
|
@ -202,16 +202,16 @@ class PhoneVerifyPage extends React.PureComponent {
|
|||
<Button
|
||||
style={[rewardStyle.verificationButton, rewardStyle.topMarginSmall]}
|
||||
theme={'light'}
|
||||
text={'Verify'}
|
||||
text={__('Verify')}
|
||||
onPress={this.onVerifyPressed}
|
||||
/>
|
||||
<Link style={rewardStyle.verificationLink} text={'Edit'} onPress={this.onEditPressed} />
|
||||
<Link style={rewardStyle.verificationLink} text={__('Edit')} onPress={this.onEditPressed} />
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
{phoneVerifyIsPending && (
|
||||
<View style={firstRunStyle.centered}>
|
||||
<Text style={firstRunStyle.paragraph}>Verifying your phone number...</Text>
|
||||
<Text style={firstRunStyle.paragraph}>{__('Verifying your phone number...')}</Text>
|
||||
<ActivityIndicator
|
||||
color={Colors.White}
|
||||
size="small"
|
||||
|
|
|
@ -14,7 +14,7 @@ class SyncVerifyPage extends React.PureComponent {
|
|||
state = {
|
||||
checkSyncStarted: false,
|
||||
password: null,
|
||||
placeholder: 'password',
|
||||
placeholder: __('password'),
|
||||
syncApplyStarted: false,
|
||||
syncApplyCompleted: false,
|
||||
syncChecked: false,
|
||||
|
@ -182,7 +182,7 @@ class SyncVerifyPage extends React.PureComponent {
|
|||
}}
|
||||
onBlur={() => {
|
||||
if (!this.state.password || this.state.password.length === 0) {
|
||||
this.setState({ placeholder: 'password' });
|
||||
this.setState({ placeholder: __('password') });
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue