Merge branch 'fix/empty-password' into 'release'

Fix/empty password

See merge request bloodyhealth/drip!456
This commit is contained in:
bl00dymarie
2022-08-08 11:33:56 +00:00
4 changed files with 18 additions and 18 deletions
@@ -13,7 +13,6 @@ import settings from '../../../i18n/en/settings'
const LISTENER_TYPE = 'create-or-change-pw' const LISTENER_TYPE = 'create-or-change-pw'
export default class EnterNewPassword extends Component { export default class EnterNewPassword extends Component {
constructor() { constructor() {
super() super()
this.state = { this.state = {
@@ -52,15 +51,12 @@ export default class EnterNewPassword extends Component {
this.setState({ passwordConfirmation }) this.setState({ passwordConfirmation })
} }
render () { render() {
const { const { password, passwordConfirmation, shouldShowErrorMessage } =
password, this.state
passwordConfirmation,
shouldShowErrorMessage
} = this.state
const labels = settings.passwordSettings const labels = settings.passwordSettings
const isButtonActive = const isButtonActive =
(password.length > 0) && (passwordConfirmation.length > 0) password.length > 0 && passwordConfirmation.length > 0
return ( return (
<React.Fragment> <React.Fragment>
@@ -80,10 +76,14 @@ export default class EnterNewPassword extends Component {
value={passwordConfirmation} value={passwordConfirmation}
secureTextEntry={true} secureTextEntry={true}
/> />
{shouldShowErrorMessage && {shouldShowErrorMessage && (
<AppText style={styles.error}>{labels.passwordsDontMatch}</AppText> <AppText style={styles.error}>{labels.passwordsDontMatch}</AppText>
} )}
<Button isCTA={isButtonActive} onPress={this.savePassword}> <Button
isCTA={isButtonActive}
disabled={!isButtonActive}
onPress={this.savePassword}
>
{labels.savePassword} {labels.savePassword}
</Button> </Button>
</React.Fragment> </React.Fragment>
@@ -94,6 +94,6 @@ export default class EnterNewPassword extends Component {
const styles = StyleSheet.create({ const styles = StyleSheet.create({
error: { error: {
color: Colors.orange, color: Colors.orange,
marginTop: Spacing.base marginTop: Spacing.base,
} },
}) })
+2 -2
View File
@@ -857,7 +857,7 @@
"\"${PODS_ROOT}/../../node_modules/realm/vendor/realm-ios\"", "\"${PODS_ROOT}/../../node_modules/realm/vendor/realm-ios\"",
"$(inherited)", "$(inherited)",
); );
MARKETING_VERSION = 1.2208.2; MARKETING_VERSION = 1.2208.8;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-ObjC", "-ObjC",
"-lc++", "-lc++",
@@ -936,7 +936,7 @@
"\"${PODS_ROOT}/../../node_modules/realm/vendor/realm-ios\"", "\"${PODS_ROOT}/../../node_modules/realm/vendor/realm-ios\"",
"$(inherited)", "$(inherited)",
); );
MARKETING_VERSION = 1.2208.2; MARKETING_VERSION = 1.2208.8;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-ObjC", "-ObjC",
"-lc++", "-lc++",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "drip.", "name": "drip.",
"version": "1.2208.2", "version": "1.2208.8",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "drip.", "name": "drip.",
"version": "1.2208.2", "version": "1.2208.8",
"contributors": [ "contributors": [
"Julia Friesel <julia.friesel@gmail.com>", "Julia Friesel <julia.friesel@gmail.com>",
"Marie Kochsiek", "Marie Kochsiek",