Introduces password management section redesign

This commit is contained in:
mashazyu
2020-03-25 16:26:57 +01:00
committed by Sofiya Tepikin
parent 842e8a2a24
commit a68ec248b0
6 changed files with 108 additions and 125 deletions
+13 -14
View File
@@ -1,17 +1,22 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import labels from '../../../i18n/en/settings'
import { changeEncryptionAndRestartApp } from '../../../db'
import Button from '../../common/button'
import ConfirmWithPassword from '../shared/confirm-with-password'
import SettingsButton from '../shared/settings-button'
import { changeEncryptionAndRestartApp } from '../../../db'
import labels from '../../../i18n/en/settings'
export default class DeletePassword extends Component {
static propTypes = {
onStartDelete: PropTypes.func,
onCancelDelete: PropTypes.func
}
constructor() {
super()
this.state = {
enteringCurrentPassword: false
}
this.state = { enteringCurrentPassword: false }
}
startConfirmWithPassword = () => {
@@ -29,7 +34,6 @@ export default class DeletePassword extends Component {
}
render() {
const { enteringCurrentPassword } = this.state
if (enteringCurrentPassword) {
@@ -42,14 +46,9 @@ export default class DeletePassword extends Component {
}
return (
<SettingsButton onPress={this.startConfirmWithPassword} >
<Button isCTA onPress={this.startConfirmWithPassword}>
{labels.passwordSettings.deletePassword}
</SettingsButton>
</Button>
)
}
}
DeletePassword.propTypes = {
onStartDelete: PropTypes.func,
onCancelDelete: PropTypes.func
}