Add bacup warning

This commit is contained in:
Julia Friesel
2018-09-14 07:53:38 +02:00
parent 8da8523558
commit 467dc8d424
2 changed files with 15 additions and 2 deletions
+4 -1
View File
@@ -6,7 +6,8 @@ export const shared = {
warning: 'Warning', warning: 'Warning',
incorrectPassword: 'Password incorrect', incorrectPassword: 'Password incorrect',
incorrectPasswordMessage: 'That password is incorrect.', incorrectPasswordMessage: 'That password is incorrect.',
tryAgain: 'Try again' tryAgain: 'Try again',
ok: 'OK'
} }
export const settings = { export const settings = {
@@ -58,6 +59,8 @@ export const settings = {
explainerEnabled: "Password protection and database encryption is currently enabled", explainerEnabled: "Password protection and database encryption is currently enabled",
deletePassword: "Delete password", deletePassword: "Delete password",
enterCurrent: "Please enter your current password", enterCurrent: "Please enter your current password",
backupReminderTitle: 'Have you made a backup of your data?',
backupReminder: 'When you make changes to your password, we delete your old data and store it in a new version. To be safe, please backup your data using the export function before making changes to your password. Making any changes to your password setting will also restart the app immediately.',
} }
} }
+11 -1
View File
@@ -92,7 +92,17 @@ export default class PasswordSetting extends Component {
<TouchableOpacity <TouchableOpacity
onPress={() => { onPress={() => {
if (!this.state.enteringCurrentPassword) { if (!this.state.enteringCurrentPassword) {
this.setState({ enteringCurrentPassword: true }) Alert.alert(
labels.passwordSettings.backupReminderTitle,
labels.passwordSettings.backupReminder,
[{
text: shared.cancel,
style: 'cancel'
}, {
text: shared.ok,
onPress: () => this.setState({enteringCurrentPassword: true})
}]
)
} else { } else {
requestHash(this.state.currentPassword) requestHash(this.state.currentPassword)
} }