add warning for proceeding with a blank password
This commit is contained in:
parent
455dadd30d
commit
120c3ca52f
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} />
|
<Icon name={this.state.revealPassword ? 'eye-slash' : 'eye'} size={16} style={firstRunStyle.revealIcon} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</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 && (
|
{(!hasSyncedWallet && this.state.password && this.state.password.trim().length) > 0 && (
|
||||||
<View style={firstRunStyle.passwordStrength}>
|
<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} />
|
<Icon name={this.state.revealPassword ? 'eye-slash' : 'eye'} size={16} style={firstRunStyle.revealIcon} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</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 && (
|
{(!hasSyncedWallet && this.state.password && this.state.password.trim().length) > 0 && (
|
||||||
<View style={firstRunStyle.passwordStrength}>
|
<View style={firstRunStyle.passwordStrength}>
|
||||||
<BarPasswordStrengthDisplay
|
<BarPasswordStrengthDisplay
|
||||||
|
|
|
@ -12,6 +12,7 @@ const Colors = {
|
||||||
LighterGrey: '#e5e5e5',
|
LighterGrey: '#e5e5e5',
|
||||||
Orange: '#ffbb00',
|
Orange: '#ffbb00',
|
||||||
Red: '#ff0000',
|
Red: '#ff0000',
|
||||||
|
BrightRed: '#e35454',
|
||||||
VeryLightGrey: '#f1f1f1',
|
VeryLightGrey: '#f1f1f1',
|
||||||
White: '#ffffff',
|
White: '#ffffff',
|
||||||
UriDescBlue: '#3971db',
|
UriDescBlue: '#3971db',
|
||||||
|
|
|
@ -172,6 +172,16 @@ const firstRunStyle = StyleSheet.create({
|
||||||
marginRight: 32,
|
marginRight: 32,
|
||||||
marginBottom: 48,
|
marginBottom: 48,
|
||||||
},
|
},
|
||||||
|
passwordWarning: {
|
||||||
|
marginLeft: 32,
|
||||||
|
marginRight: 32,
|
||||||
|
marginBottom: 24,
|
||||||
|
},
|
||||||
|
passwordWarningText: {
|
||||||
|
color: Colors.BrightRed,
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
centered: {
|
centered: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue