display lbry.tv sync custody message

This commit is contained in:
Akinwale Ariwodola 2020-03-23 17:46:25 +01:00
parent a5953dcef0
commit 30b2bee66d
4 changed files with 65 additions and 27 deletions

@ -1 +1 @@
Subproject commit 4d1f142f9cf4f221a2110b7d7aa77b9f42731253 Subproject commit cbc4a662e670941b1c82aa6846ac56923c30af2f

View file

@ -6,6 +6,7 @@ import Address from 'component/address';
import Button from 'component/button'; import Button from 'component/button';
import Colors from 'styles/colors'; import Colors from 'styles/colors';
import Icon from 'react-native-vector-icons/FontAwesome5'; import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
import walletStyle from 'styles/wallet'; import walletStyle from 'styles/wallet';
type Props = { type Props = {
@ -16,9 +17,27 @@ type Props = {
class WalletBalanceExtra extends React.PureComponent<Props> { class WalletBalanceExtra extends React.PureComponent<Props> {
render() { render() {
const { claimsBalance, supportsBalance, tipsBalance } = this.props; const { claimsBalance, deviceWalletSynced, supportsBalance, tipsBalance } = this.props;
return ( return (
<View style={walletStyle.balanceExtra}>
<View style={walletStyle.syncDriverCustody}>
<Text style={walletStyle.syncInfoText}>
{deviceWalletSynced
? __('A backup of your wallet is synced with lbry.tv')
: __('Your wallet is not currently synced with lbry.tv. You are in control of backing up your wallet.')}
</Text>
<Link
text={__('What does this mean?')}
href={
deviceWalletSynced
? 'https://lbry.com/faq/account-sync'
: 'https://lbry.com/faq/how-to-backup-wallet#android'
}
style={walletStyle.syncInfoLink}
/>
</View>
<View style={walletStyle.balanceExtraCard}> <View style={walletStyle.balanceExtraCard}>
<View style={walletStyle.walletExtraRow}> <View style={walletStyle.walletExtraRow}>
<View style={walletStyle.walletExtraCol}> <View style={walletStyle.walletExtraCol}>
@ -47,6 +66,7 @@ class WalletBalanceExtra extends React.PureComponent<Props> {
</View> </View>
</View> </View>
</View> </View>
</View>
); );
} }
} }

View file

@ -27,7 +27,7 @@ class WalletSyncDriver extends React.PureComponent<Props> {
}, },
}, },
], ],
{ cancelable: true } { cancelable: true },
); );
} }
}; };

View file

@ -103,10 +103,12 @@ const walletStyle = StyleSheet.create({
marginLeft: 16, marginLeft: 16,
marginRight: 16, marginRight: 16,
}, },
balanceExtraCard: { balanceExtra: {
backgroundColor: Colors.White,
marginLeft: 16, marginLeft: 16,
marginRight: 16, marginRight: 16,
},
balanceExtraCard: {
backgroundColor: Colors.White,
padding: 16, padding: 16,
}, },
balanceBackground: { balanceBackground: {
@ -252,6 +254,22 @@ const walletStyle = StyleSheet.create({
borderBottomWidth: 1, borderBottomWidth: 1,
borderBottomColor: Colors.PageBackground, borderBottomColor: Colors.PageBackground,
}, },
syncDriverCustody: {
backgroundColor: Colors.LbryGreen,
padding: 16,
},
syncInfoText: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 8,
},
syncInfoLink: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontSize: 14,
textDecorationLine: 'underline',
},
syncDriverLink: { syncDriverLink: {
color: Colors.LbryGreen, color: Colors.LbryGreen,
fontFamily: 'Inter-Regular', fontFamily: 'Inter-Regular',