Merge pull request #598 from lbryio/blank-password-warning
add warning for proceeding with a blank password
This commit is contained in:
commit
20cd4affee
4 changed files with 31 additions and 0 deletions
|
@ -115,6 +115,15 @@ class WalletPage extends React.PureComponent {
|
|||
<Icon name={this.state.revealPassword ? 'eye-slash' : 'eye'} size={16} style={firstRunStyle.revealIcon} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
{(!this.state.password || this.state.password.trim().length === 0) && (
|
||||
<View style={firstRunStyle.passwordWarning}>
|
||||
<Text style={firstRunStyle.passwordWarningText}>
|
||||
{hasSyncedWallet
|
||||
? 'If you did not provide a password, please press Use LBRY to continue.'
|
||||
: 'You can proceed without a password, but this is not recommended.'}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
|
||||
{(!hasSyncedWallet && this.state.password && this.state.password.trim().length) > 0 && (
|
||||
<View style={firstRunStyle.passwordStrength}>
|
||||
|
|
|
@ -134,6 +134,17 @@ class SyncVerifyPage extends React.PureComponent {
|
|||
<Icon name={this.state.revealPassword ? 'eye-slash' : 'eye'} size={16} style={firstRunStyle.revealIcon} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
{(!this.state.password || this.state.password.trim().length === 0) && (
|
||||
<View style={firstRunStyle.passwordWarning}>
|
||||
<Text style={firstRunStyle.passwordWarningText}>
|
||||
{hasSyncedWallet
|
||||
? 'If you did not provide a password, please press Use LBRY to continue.'
|
||||
: 'You can proceed without a password, but this is not recommended.'}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
|
||||
{(!hasSyncedWallet && this.state.password && this.state.password.trim().length) > 0 && (
|
||||
<View style={firstRunStyle.passwordStrength}>
|
||||
<BarPasswordStrengthDisplay
|
||||
|
|
|
@ -12,6 +12,7 @@ const Colors = {
|
|||
LighterGrey: '#e5e5e5',
|
||||
Orange: '#ffbb00',
|
||||
Red: '#ff0000',
|
||||
BrightRed: '#e35454',
|
||||
VeryLightGrey: '#f1f1f1',
|
||||
White: '#ffffff',
|
||||
UriDescBlue: '#3971db',
|
||||
|
|
|
@ -172,6 +172,16 @@ const firstRunStyle = StyleSheet.create({
|
|||
marginRight: 32,
|
||||
marginBottom: 48,
|
||||
},
|
||||
passwordWarning: {
|
||||
marginLeft: 32,
|
||||
marginRight: 32,
|
||||
marginBottom: 24,
|
||||
},
|
||||
passwordWarningText: {
|
||||
color: Colors.BrightRed,
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
centered: {
|
||||
alignItems: 'center',
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue