Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Add confirm dialog to logout action (#771)
Leendert de Borstba373d5d0d0a
diff --git a/apps/mobile-app/app/(tabs)/settings/index.tsx b/apps/mobile-app/app/(tabs)/settings/index.tsxindex 88b9915f4..e6911ff83 100644--- a/apps/mobile-app/app/(tabs)/settings/index.tsx+++ b/apps/mobile-app/app/(tabs)/settings/index.tsx@@ -1,4 +1,4 @@-import { StyleSheet, View, ScrollView, TouchableOpacity, Animated, Platform } from 'react-native';+import { StyleSheet, View, ScrollView, TouchableOpacity, Animated, Platform, Alert } from 'react-native';import { router, useFocusEffect } from 'expo-router';import { Ionicons } from '@expo/vector-icons';import { useRef, useState, useCallback } from 'react';@@ -85,8 +85,23 @@ export default function SettingsScreen() : React.ReactNode {* Handle the logout.*/const handleLogout = async () : Promise<void> => {- await webApi.logout();- router.replace('/login');+ // Show native confirmation dialog+ Alert.alert(+ 'Logout',+ 'Are you sure you want to logout? You need to login again with your master password to access your vault.',+ [+ { text: 'Cancel', style: 'cancel' },+ { text: 'Logout', style: 'destructive',+ /**+ * Handle the logout.+ */+ onPress: async () : Promise<void> => {+ await webApi.logout();+ router.replace('/login');+ }+ },+ ]+ );};/**