From 689e30a5f03ed5f247e0a1662e2b1428a5e99f9a Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 24 Mar 2020 16:17:33 +0100 Subject: [PATCH] display lbry.tv sync custody message (#134) * display lbry.tv sync custody message * rephrase text --- src/component/walletBalanceExtra/view.js | 66 +++++++++++++++--------- src/component/walletSyncDriver/view.js | 2 +- src/styles/wallet.js | 22 +++++++- 3 files changed, 64 insertions(+), 26 deletions(-) diff --git a/src/component/walletBalanceExtra/view.js b/src/component/walletBalanceExtra/view.js index 59b26bd..564ef90 100644 --- a/src/component/walletBalanceExtra/view.js +++ b/src/component/walletBalanceExtra/view.js @@ -6,6 +6,7 @@ import Address from 'component/address'; import Button from 'component/button'; import Colors from 'styles/colors'; import Icon from 'react-native-vector-icons/FontAwesome5'; +import Link from 'component/link'; import walletStyle from 'styles/wallet'; type Props = { @@ -16,34 +17,53 @@ type Props = { class WalletBalanceExtra extends React.PureComponent { render() { - const { claimsBalance, supportsBalance, tipsBalance } = this.props; + const { claimsBalance, deviceWalletSynced, supportsBalance, tipsBalance } = this.props; return ( - - - - - {__('You also have')} - - {formatCredits(parseFloat(tipsBalance), 2)} - LBC - - {__('in tips')} - + + + + {deviceWalletSynced + ? __('A backup of your wallet is synced with lbry.tv') + : __('Your wallet is not currently synced with lbry.tv. You are responsible for backing up your wallet.')} + + + - - - {__('You staked')} - - {formatCredits(parseFloat(claimsBalance), 2)} - LBC + + + + + {__('You also have')} + + {formatCredits(parseFloat(tipsBalance), 2)} + LBC + + {__('in tips')} - {__('in your publishes')} - - {formatCredits(parseFloat(supportsBalance), 2)} - LBC + + + + {__('You staked')} + + {formatCredits(parseFloat(claimsBalance), 2)} + LBC + + {__('in your publishes')} + + {formatCredits(parseFloat(supportsBalance), 2)} + LBC + + {__('in your supports')} - {__('in your supports')} diff --git a/src/component/walletSyncDriver/view.js b/src/component/walletSyncDriver/view.js index 93291d1..455621a 100644 --- a/src/component/walletSyncDriver/view.js +++ b/src/component/walletSyncDriver/view.js @@ -27,7 +27,7 @@ class WalletSyncDriver extends React.PureComponent { }, }, ], - { cancelable: true } + { cancelable: true }, ); } }; diff --git a/src/styles/wallet.js b/src/styles/wallet.js index 12c074d..63bc0c7 100644 --- a/src/styles/wallet.js +++ b/src/styles/wallet.js @@ -103,10 +103,12 @@ const walletStyle = StyleSheet.create({ marginLeft: 16, marginRight: 16, }, - balanceExtraCard: { - backgroundColor: Colors.White, + balanceExtra: { marginLeft: 16, marginRight: 16, + }, + balanceExtraCard: { + backgroundColor: Colors.White, padding: 16, }, balanceBackground: { @@ -252,6 +254,22 @@ const walletStyle = StyleSheet.create({ borderBottomWidth: 1, 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: { color: Colors.LbryGreen, fontFamily: 'Inter-Regular',