add manual verification screen. style tweaks.
This commit is contained in:
parent
b6d4fecb06
commit
9c6f85b944
5 changed files with 54 additions and 15 deletions
|
@ -156,17 +156,18 @@ class RewardsPage extends React.PureComponent {
|
|||
return (
|
||||
<View style={rewardStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
{(!this.state.isEmailVerified || !this.state.isIdentityVerified) && <RewardEnrolment navigation={navigation} />}
|
||||
{(!this.state.isEmailVerified || !this.state.isIdentityVerified || !this.state.isRewardApproved) &&
|
||||
<RewardEnrolment navigation={navigation} />}
|
||||
|
||||
{(this.state.isEmailVerified && this.state.isIdentityVerified) && <ScrollView
|
||||
ref={ref => this.scrollView = ref}
|
||||
keyboardShouldPersistTaps={'handled'}
|
||||
style={rewardStyle.scrollContainer}
|
||||
contentContainerStyle={rewardStyle.scrollContentContainer}>
|
||||
{this.state.revealVerification && this.renderVerification()}
|
||||
{this.renderUnclaimedRewards()}
|
||||
{this.renderClaimedRewards()}
|
||||
</ScrollView>}
|
||||
{(this.state.isEmailVerified && this.state.isIdentityVerified && this.state.isRewardApproved) &&
|
||||
<ScrollView
|
||||
ref={ref => this.scrollView = ref}
|
||||
keyboardShouldPersistTaps={'handled'}
|
||||
style={rewardStyle.scrollContainer}
|
||||
contentContainerStyle={rewardStyle.scrollContentContainer}>
|
||||
{this.renderUnclaimedRewards()}
|
||||
{this.renderClaimedRewards()}
|
||||
</ScrollView>}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class EmailVerifyPage extends React.PureComponent {
|
|||
}
|
||||
|
||||
onSendVerificationPressed = () => {
|
||||
const { addUserEmail, emailNewPending, notify } = this.props;
|
||||
const { addUserEmail, emailNewPending, notify, resendVerificationEmail } = this.props;
|
||||
|
||||
if (emailNewPending) {
|
||||
return;
|
||||
|
|
23
app/src/page/verification/internal/manual-verify-page.js
Normal file
23
app/src/page/verification/internal/manual-verify-page.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import React from 'react';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
import { ActivityIndicator, View, Text, TextInput } from 'react-native';
|
||||
import AsyncStorage from '@react-native-community/async-storage';
|
||||
import Button from 'component/button';
|
||||
import Link from 'component/link';
|
||||
import Colors from 'styles/colors';
|
||||
import Constants from 'constants';
|
||||
import firstRunStyle from 'styles/firstRun';
|
||||
import rewardStyle from 'styles/reward';
|
||||
|
||||
class ManualVerifyPage extends React.PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<View style={firstRunStyle.container}>
|
||||
<Text style={rewardStyle.verificationTitle}>Manual Reward Verification</Text>
|
||||
<Text style={firstRunStyle.paragraph}>You need to be manually verified before you can start claiming rewards. Please request to be verified on the <Link style={rewardStyle.underlinedTextLink} href="https://discordapp.com/invite/Z3bERWA" text="LBRY Discord server" />.</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ManualVerifyPage;
|
|
@ -13,6 +13,7 @@ import AsyncStorage from '@react-native-community/async-storage';
|
|||
import Colors from 'styles/colors';
|
||||
import Constants from 'constants';
|
||||
import EmailVerifyPage from './internal/email-verify-page';
|
||||
import ManualVerifyPage from './internal/manual-verify-page';
|
||||
import PhoneVerifyPage from './internal/phone-verify-page';
|
||||
import firstRunStyle from 'styles/firstRun';
|
||||
|
||||
|
@ -27,7 +28,8 @@ class VerificationScreen extends React.PureComponent {
|
|||
showBottomContainer: true,
|
||||
walletPassword: null,
|
||||
isEmailVerified: false,
|
||||
isIdentityVerified: false
|
||||
isIdentityVerified: false,
|
||||
isRewardApproved: false
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
|
@ -40,7 +42,8 @@ class VerificationScreen extends React.PureComponent {
|
|||
|
||||
this.setState({
|
||||
isEmailVerified: (user && user.primary_email && user.has_verified_email),
|
||||
isIdentityVerified: (user && user.is_identity_verified)
|
||||
isIdentityVerified: (user && user.is_identity_verified),
|
||||
isRewardApproved: (user && user.is_reward_approved)
|
||||
}, () => {
|
||||
if (!this.state.isEmailVerified) {
|
||||
this.setState({ currentPage: 'emailVerify' });
|
||||
|
@ -48,8 +51,11 @@ class VerificationScreen extends React.PureComponent {
|
|||
if (this.state.isEmailVerified && !this.state.isIdentityVerified) {
|
||||
this.setState({ currentPage: 'phoneVerify' });
|
||||
}
|
||||
if (this.state.isEmailVerified && this.state.isIdentityVerified && !this.state.isRewardApproved) {
|
||||
this.setState({ currentPage: 'manualVerify' });
|
||||
}
|
||||
|
||||
if (this.state.isEmailVerified && this.state.isIdentityVerified) {
|
||||
if (this.state.isEmailVerified && this.state.isIdentityVerified && this.state.isRewardApproved) {
|
||||
// verification steps already completed
|
||||
// simply navigate back to the rewards page
|
||||
navigation.goBack();
|
||||
|
@ -73,6 +79,7 @@ class VerificationScreen extends React.PureComponent {
|
|||
emailNewErrorMessage,
|
||||
emailNewPending,
|
||||
emailToVerify,
|
||||
navigation,
|
||||
notify,
|
||||
addUserPhone,
|
||||
phone,
|
||||
|
@ -112,6 +119,10 @@ class VerificationScreen extends React.PureComponent {
|
|||
/>
|
||||
);
|
||||
break;
|
||||
case 'manualVerify':
|
||||
page = (
|
||||
<ManualVerifyPage />
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -131,6 +131,10 @@ const rewardStyle = StyleSheet.create({
|
|||
textLink: {
|
||||
color: Colors.White
|
||||
},
|
||||
underlinedTextLink: {
|
||||
color: Colors.White,
|
||||
textDecorationLine: 'underline'
|
||||
},
|
||||
greenLink: {
|
||||
color: Colors.LbryGreen
|
||||
},
|
||||
|
@ -274,7 +278,7 @@ const rewardStyle = StyleSheet.create({
|
|||
width: '100%',
|
||||
paddingLeft: 32,
|
||||
paddingRight: 32,
|
||||
marginTop: 24
|
||||
marginTop: 16
|
||||
},
|
||||
verificationTitle: {
|
||||
fontSize: 32,
|
||||
|
|
Loading…
Add table
Reference in a new issue