Unverified Commit 689e30a5 authored by Akinwale Ariwodola's avatar Akinwale Ariwodola Committed by GitHub
Browse files

display lbry.tv sync custody message (#134)

* display lbry.tv sync custody message
* rephrase text
parent 33b4806c
Pipeline #1859 passed with stage
...@@ -6,6 +6,7 @@ import Address from 'component/address'; ...@@ -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,34 +17,53 @@ type Props = { ...@@ -16,34 +17,53 @@ 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.balanceExtraCard}> <View style={walletStyle.balanceExtra}>
<View style={walletStyle.walletExtraRow}> <View style={walletStyle.syncDriverCustody}>
<View style={walletStyle.walletExtraCol}> <Text style={walletStyle.syncInfoText}>
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'gift'} size={16} /> {deviceWalletSynced
<Text style={walletStyle.walletExtraCaption}>{__('You also have')}</Text> ? __('A backup of your wallet is synced with lbry.tv')
<View style={walletStyle.balanceRow}> : __('Your wallet is not currently synced with lbry.tv. You are responsible for backing up your wallet.')}
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(tipsBalance), 2)}</Text> </Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text> <Link
</View> text={__('What does this mean?')}
<Text style={walletStyle.text}>{__('in tips')}</Text> href={
</View> deviceWalletSynced
? 'https://lbry.com/faq/account-sync'
: 'https://lbry.com/faq/how-to-backup-wallet#android'
}
style={walletStyle.syncInfoLink}
/>
</View>
<View style={walletStyle.walletExtraCol}> <View style={walletStyle.balanceExtraCard}>
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'lock'} size={16} /> <View style={walletStyle.walletExtraRow}>
<Text style={walletStyle.walletExtraCaption}>{__('You staked')}</Text> <View style={walletStyle.walletExtraCol}>
<View style={walletStyle.balanceRow}> <Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'gift'} size={16} />
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(claimsBalance), 2)}</Text> <Text style={walletStyle.walletExtraCaption}>{__('You also have')}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text> <View style={walletStyle.balanceRow}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(tipsBalance), 2)}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
</View>
<Text style={walletStyle.text}>{__('in tips')}</Text>
</View> </View>
<Text style={walletStyle.text}>{__('in your publishes')}</Text>
<View style={[walletStyle.balanceRow, walletStyle.walletExtraTopMargin]}> <View style={walletStyle.walletExtraCol}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(supportsBalance), 2)}</Text> <Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'lock'} size={16} />
<Text style={walletStyle.walletExtraCurrency}>LBC</Text> <Text style={walletStyle.walletExtraCaption}>{__('You staked')}</Text>
<View style={walletStyle.balanceRow}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(claimsBalance), 2)}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
</View>
<Text style={walletStyle.text}>{__('in your publishes')}</Text>
<View style={[walletStyle.balanceRow, walletStyle.walletExtraTopMargin]}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(supportsBalance), 2)}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
</View>
<Text style={walletStyle.text}>{__('in your supports')}</Text>
</View> </View>
<Text style={walletStyle.text}>{__('in your supports')}</Text>
</View> </View>
</View> </View>
</View> </View>
......
...@@ -27,7 +27,7 @@ class WalletSyncDriver extends React.PureComponent<Props> { ...@@ -27,7 +27,7 @@ class WalletSyncDriver extends React.PureComponent<Props> {
}, },
}, },
], ],
{ cancelable: true } { cancelable: true },
); );
} }
}; };
......
...@@ -103,10 +103,12 @@ const walletStyle = StyleSheet.create({ ...@@ -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({ ...@@ -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',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment