diff --git a/apps/mobile/app/(app)/settings/_layout.tsx b/apps/mobile/app/(app)/settings/_layout.tsx new file mode 100644 index 0000000..2e76ab1 --- /dev/null +++ b/apps/mobile/app/(app)/settings/_layout.tsx @@ -0,0 +1,18 @@ +import { Stack } from 'expo-router'; + +import { colors } from '../../../theme/colors'; + +export default function SettingsLayout() { + return ( + + + + + ); +} diff --git a/apps/mobile/app/(app)/settings/index.tsx b/apps/mobile/app/(app)/settings/index.tsx new file mode 100644 index 0000000..2fb91f4 --- /dev/null +++ b/apps/mobile/app/(app)/settings/index.tsx @@ -0,0 +1,44 @@ +import { useRouter } from 'expo-router'; +import { Alert, Pressable, StyleSheet, Text, View } from 'react-native'; + +import { useAuth } from '../../../lib/authContext'; +import { colors } from '../../../theme/colors'; + +export default function SettingsIndex() { + const router = useRouter(); + const { signOut } = useAuth(); + + function confirmLogout() { + Alert.alert('Abmelden', 'Diese Sitzung beenden?', [ + { text: 'Abbrechen', style: 'cancel' }, + { text: 'Abmelden', style: 'destructive', onPress: () => void signOut() }, + ]); + } + + return ( + + router.push('/(app)/settings/security')}> + Sicherheit + PIN ändern, Recovery-Code, Identität zurücksetzen + + + Abmelden + + + ); +} + +const styles = StyleSheet.create({ + container: { flex: 1, backgroundColor: colors.bg, padding: 16, gap: 12 }, + row: { + backgroundColor: colors.surface, + padding: 16, + borderRadius: 12, + borderColor: colors.border, + borderWidth: 1, + }, + rowTitle: { color: colors.text, fontSize: 16, fontWeight: '600' }, + rowHint: { color: colors.textMuted, fontSize: 13, marginTop: 4 }, + danger: { borderColor: colors.danger }, + dangerText: { color: colors.danger }, +});