wallet sign in driver #67
|
@ -32,7 +32,7 @@ class RewardEnrolment extends React.Component {
|
|||
const { fetching, navigation, unclaimedRewardAmount, user } = this.props;
|
||||
|
||||
return (
|
||||
<View style={rewardStyle.enrollContainer} onPress>
|
||||
<View style={rewardStyle.enrollContainer}>
|
||||
<View style={rewardStyle.summaryRow}>
|
||||
<Icon name="award" size={36} color={Colors.White} />
|
||||
<Text style={rewardStyle.summaryText}>{unclaimedRewardAmount} available credits</Text>
|
||||
|
|
19
src/component/walletSignIn/index.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { doToast } from 'lbry-redux';
|
||||
import { doSetClientSetting } from 'redux/actions/settings';
|
||||
import { selectUser } from 'lbryinc';
|
||||
import WalletSignIn from './view';
|
||||
|
||||
const select = state => ({
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
notify: data => dispatch(doToast(data)),
|
||||
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(WalletSignIn);
|
48
src/component/walletSignIn/view.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
import React from 'react';
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
import { Linking, NativeModules, Text, TouchableOpacity, View } from 'react-native';
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
import AsyncStorage from '@react-native-community/async-storage';
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
import Button from 'component/button';
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
import Link from 'component/link';
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
import Colors from 'styles/colors';
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
import walletStyle from 'styles/wallet';
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
class WalletSignIn extends React.Component {
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
onContinuePressed = () => {
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
const { navigation, setClientSetting } = this.props;
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
setClientSetting(Constants.SETTING_ALPHA_UNDERSTANDS_RISKS, true);
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
};
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
onSignInPressed = () => {
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
const { navigation } = this.props;
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
navigation.navigate({ routeName: 'Verification', key: 'verification', params: { syncFlow: true } });
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
};
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
render() {
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
const { navigation, user } = this.props;
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
return (
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
<View style={walletStyle.signInContainer}>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
<View style={walletStyle.signInSummaryRow}>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
<Text style={walletStyle.signInTitle}>Account Recommended</Text>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
</View>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
<View style={walletStyle.onboarding}>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
<Text style={walletStyle.onboardingText}>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
An account with LBRY Inc. allows you to earn rewards, backup your wallet, and keep everything synced..
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
{'\n\n'}
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
Without an account, you assume all responsibility for securing your wallet and LBRY data.{'\n\n'}
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
</Text>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
</View>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
<View style={walletStyle.buttonRow}>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
<Link style={walletStyle.continueLink} text={'Skip Account'} onPress={this.onContinuePressed} />
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
<Button style={walletStyle.signInButton} theme={'light'} text={'Sign Up'} onPress={this.onSignInPressed} />
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
</View>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
</View>
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
);
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
}
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
}
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
||||
export default WalletSignIn;
|
||||
"Sign In" in both the title and on the button, rather than "Sign in" "Sign In" in both the title and on the button, rather than "Sign in"
|
|
@ -5,6 +5,7 @@ import WalletAddress from 'component/walletAddress';
|
|||
import WalletBalance from 'component/walletBalance';
|
||||
import WalletSend from 'component/walletSend';
|
||||
import WalletRewardsDriver from 'component/walletRewardsDriver';
|
||||
import WalletSignIn from 'component/walletSignIn';
|
||||
import WalletSyncDriver from 'component/walletSyncDriver';
|
||||
import Button from 'component/button';
|
||||
import Link from 'component/link';
|
||||
|
@ -66,33 +67,15 @@ class WalletPage extends React.PureComponent {
|
|||
understandsRisks,
|
||||
setClientSetting,
|
||||
navigation,
|
||||
user,
|
||||
} = this.props;
|
||||
|
||||
if (!understandsRisks) {
|
||||
const signedIn = user && user.has_verified_email;
|
||||
if (!signedIn && !understandsRisks) {
|
||||
return (
|
||||
<View>
|
||||
<View style={walletStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
<View style={walletStyle.warning}>
|
||||
<Text style={walletStyle.warningParagraph}>
|
||||
This is beta software. You may lose any credits that you send to your wallet due to software bugs, deleted
|
||||
files, or malicious third-party software. You should not use this wallet as your primary wallet.
|
||||
</Text>
|
||||
{!hasSyncedWallet && (
|
||||
<Text style={walletStyle.warningParagraph}>
|
||||
Since you are not using the LBRY sync service, you will lose all of your credits if you uninstall this
|
||||
application. Instructions on how to enroll as well as how to backup your wallet manually are available
|
||||
on the next page.
|
||||
</Text>
|
||||
)}
|
||||
<Text style={walletStyle.warningText}>
|
||||
If you understand the risks and you wish to continue, please tap the button below.
|
||||
</Text>
|
||||
</View>
|
||||
<Button
|
||||
text={'I understand the risks'}
|
||||
style={[walletStyle.button, walletStyle.understand]}
|
||||
onPress={() => setClientSetting(Constants.SETTING_ALPHA_UNDERSTANDS_RISKS, true)}
|
||||
/>
|
||||
<WalletSignIn navigation={navigation} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -305,6 +305,52 @@ const walletStyle = StyleSheet.create({
|
|||
fontSize: 16,
|
||||
marginLeft: 8,
|
||||
},
|
||||
buttonRow: {
|
||||
width: '100%',
|
||||
position: 'absolute',
|
||||
alignItems: 'center',
|
||||
left: 24,
|
||||
bottom: 24,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
continueLink: {
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.White,
|
||||
},
|
||||
learnMoreLink: {
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.NextLbryGreen,
|
||||
},
|
||||
signInButton: {
|
||||
backgroundColor: Colors.White,
|
||||
paddingLeft: 16,
|
||||
paddingRight: 16,
|
||||
},
|
||||
signInContainer: {
|
||||
flex: 1,
|
||||
marginTop: 60,
|
||||
padding: 24,
|
||||
backgroundColor: Colors.LbryGreen,
|
||||
},
|
||||
onboarding: {
|
||||
marginTop: 36,
|
||||
},
|
||||
onboardingText: {
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
lineHeight: 28,
|
||||
color: Colors.White,
|
||||
},
|
||||
signInSummaryRow: {
|
||||
flexDirection: 'row',
|
||||
},
|
||||
signInTitle: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 28,
|
||||
},
|
||||
});
|
||||
|
||||
export default walletStyle;
|
||||
|
|
"Sign In" in both the title and on the button, rather than "Sign in"