Fork restart functionality for different platforms
This commit is contained in:
@@ -1,28 +1,32 @@
|
||||
import { Alert } from 'react-native'
|
||||
import { Alert, Platform } from 'react-native'
|
||||
import { shared } from '../../../i18n/en/labels'
|
||||
import labels from '../../../i18n/en/settings'
|
||||
|
||||
export default function showBackUpReminder(okHandler, cancelHandler, isDelete) {
|
||||
let title, message
|
||||
if (isDelete) {
|
||||
title = labels.passwordSettings.deleteBackupReminderTitle
|
||||
message = labels.passwordSettings.deleteBackupReminder
|
||||
} else {
|
||||
title = labels.passwordSettings.backupReminderTitle
|
||||
message = labels.passwordSettings.backupReminder
|
||||
}
|
||||
const { title, message } = isDelete
|
||||
? labels.passwordSettings.deleteBackupReminder
|
||||
: labels.passwordSettings.backupReminder
|
||||
|
||||
const { backupReminderAppendix } = labels.passwordSettings
|
||||
const appendix =
|
||||
Platform.OS === 'ios'
|
||||
? backupReminderAppendix.ios
|
||||
: backupReminderAppendix.android
|
||||
|
||||
Alert.alert(
|
||||
title,
|
||||
message,
|
||||
[{
|
||||
text: shared.cancel,
|
||||
onPress: cancelHandler,
|
||||
style: 'cancel'
|
||||
}, {
|
||||
text: shared.ok,
|
||||
onPress: okHandler
|
||||
}],
|
||||
message + appendix,
|
||||
[
|
||||
{
|
||||
text: shared.cancel,
|
||||
onPress: cancelHandler,
|
||||
style: 'cancel',
|
||||
},
|
||||
{
|
||||
text: shared.ok,
|
||||
onPress: okHandler,
|
||||
},
|
||||
],
|
||||
{ onDismiss: cancelHandler }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user