chahinebrini 3c52d8869e feat(native): WIP checkpoint — Profile/Settings/Demographics + WheelPicker + Maestro
Rollback-Punkt vor Expo SDK 54 / RN 0.81 Upgrade.

UI/UX:
- Profile: ProfileHeader redesign (sign-in chip + member-since), StatsBar 3 pill cards,
  Demographics accordion completed (Geburtsjahr, Geschlecht, Familienstand, Beruf-split,
  Wohnort), Pro-Trial-Banner, Approved-Domains list, DigaMissionBanner
- Settings: section-based layout, neutral icons (matched Header dropdown style)
- Header dropdown: extended with logout + games-page link
- Notifications page: skeleton dummy data
- Locales: i18n keys for new screens

New components:
- WheelPickerModal: native iOS UIPickerView wheel for long lists (Geburtsjahr 91 items,
  Bundesland 16, Stadt 30+/Bundesland)
- OptionsBottomSheet: iOS-style options sheet (used briefly for Geschlecht, currently
  unused — kept for potential future use)
- germanCities.ts: Top-cities per Bundesland (DSGVO-clean static data)

New libs (NewArch-codegen verified):
- @react-native-menu/menu 2.0.0 (UIMenu wrapper, Apple HIG-konform)
- @lodev09/react-native-true-sheet 3.10.1 (UISheetPresentationController wrapper —
  ABER incompatible mit RN 0.79.6, Build-Error → Trigger für SDK-54-Upgrade)

Maestro E2E:
- Initial setup mit auth/community/profile/urge flows

Scripts:
- build-ios-clean.sh: Xcode DerivedData + ios/build cleanup vor expo run:ios

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 19:32:27 +02:00

104 lines
2.6 KiB
TypeScript

import { Pressable, Text, View } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { useTranslation } from 'react-i18next';
type Props = {
onConnectPress: () => void;
};
/**
* Leerer Zustand wenn kein Postfach verbunden ist.
* Hero-CTA öffnet ConnectMailSheet.
*/
export function MailEmptyState({ onConnectPress }: Props) {
const { t } = useTranslation();
return (
<View
style={{
backgroundColor: '#fff',
borderRadius: 20,
borderWidth: 1,
borderColor: '#e5e5e5',
padding: 28,
alignItems: 'center',
}}
>
{/* Icon-Circle */}
<View
style={{
width: 72,
height: 72,
borderRadius: 36,
backgroundColor: '#eff6ff',
borderWidth: 1,
borderColor: '#bfdbfe',
alignItems: 'center',
justifyContent: 'center',
marginBottom: 16,
}}
>
<Ionicons name="mail-open-outline" size={34} color="#3b82f6" />
</View>
<Text
style={{
fontSize: 17,
fontFamily: 'Nunito_700Bold',
color: '#0a0a0a',
textAlign: 'center',
marginBottom: 8,
}}
>
{t('mail.empty_state_title')}
</Text>
<Text
style={{
fontSize: 13,
fontFamily: 'Nunito_400Regular',
color: '#737373',
textAlign: 'center',
lineHeight: 19,
marginBottom: 20,
}}
>
{t('mail.empty_state_subtitle')}
</Text>
{/* Privacy-Punkte */}
<View style={{ alignSelf: 'stretch', gap: 8, marginBottom: 22 }}>
{(['privacy_1', 'privacy_2', 'privacy_3'] as const).map((key) => (
<View key={key} style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
<Ionicons name="checkmark-circle" size={15} color="#16a34a" />
<Text style={{ fontSize: 12, fontFamily: 'Nunito_400Regular', color: '#525252', flex: 1 }}>
{t(`mail.${key}`)}
</Text>
</View>
))}
</View>
{/* CTA */}
<Pressable
onPress={onConnectPress}
style={({ pressed }) => ({
opacity: pressed ? 0.85 : 1,
alignSelf: 'stretch',
})}
>
<View style={{
backgroundColor: '#007AFF',
borderRadius: 14,
paddingVertical: 14,
paddingHorizontal: 28,
alignItems: 'center',
}}>
<Text style={{ fontSize: 15, fontFamily: 'Nunito_700Bold', color: '#fff' }}>
{t('mail.empty_state_cta')}
</Text>
</View>
</Pressable>
</View>
);
}