Skip to content
Snippets Groups Projects
Commit 467dc8d4 authored by Julia Friesel's avatar Julia Friesel
Browse files

Add bacup warning

parent 8da85235
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,8 @@ export const shared = { ...@@ -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 = { ...@@ -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.',
} }
} }
......
...@@ -92,7 +92,17 @@ export default class PasswordSetting extends Component { ...@@ -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)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment