Wave 2 = ALLE app-files die in Wave 1 noch hardcoded waren. Komplette App-weit
theme-aware-Migration jetzt durch. Legacy `import { colors }` flat export
vollständig eliminiert.
Migrated this wave:
Top-level Screens:
- app/urge.tsx (makeStyles factory mit ~20 colors)
- app/room.tsx + dm.tsx + games.tsx
- app/(app)/chat.tsx + mail.tsx + coach.tsx + notifications.tsx
- app/profile/[userId].tsx + profile/edit.tsx (INPUT_STYLE in body moved)
- app/debug.tsx + auth/callback.tsx
Blocker (7):
- AddDomainSheet, CooldownBanner, DeactivationExplainerSheet, DomainGrid,
ProtectionCard, ProtectionDetailsSheet, ProtectionLockedCard
Mail (3):
- ConnectMailSheet, EditMailAccountSheet, MailEmptyState
Chat (1):
- ChatBubble, ChatInput
Community/Posts/Notifications:
- PostCard, PostCardSkeleton, ComposeCard, PostCommentsSheet
- NotificationsDropdown
- StreakBadge (Nativewind classes durch inline dynamic styles ersetzt)
Reusable Sheets:
- WheelPickerModal, OptionsBottomSheet, DeviceLimitReachedSheet
Urge subsystem (5):
- InlineRatingDrawer, ShareSuccessDrawer, UrgeStats, SosFeedbackModal,
Breathing
Profile components:
- DigaMissionBanner
Pattern: useColors() hook in component body, makeStyles(colors) factory wo
StyleSheet.create vorher hardcoded war. 11 base-tokens (bg/surface/
surfaceElevated/border/text/textMuted/brandOrange/brandBlue/success/error/
warning) nutzen colors.light vs colors.dark scheme.
Bewusst NICHT migriert (semantic colors):
- DigaMissionBanner amber (#fffbeb, #854d0e) — DiGA-brand, nicht neutral
- Lyra-thinking #3b82f6 in urge.tsx — Lyra-brand-color
- scrollDownBtn #374151 — intentional dark floating-button
TS clean. Test: Settings → Theme → Dark — alle screens sollen jetzt dunkel
werden ohne white-flashes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
121 lines
3.3 KiB
TypeScript
121 lines
3.3 KiB
TypeScript
import { View, Text, Pressable } from 'react-native';
|
|
import { Ionicons } from '@expo/vector-icons';
|
|
import { useColors } from '../../lib/theme';
|
|
|
|
type Props = {
|
|
onDismiss?: () => void;
|
|
onContribute?: () => void;
|
|
};
|
|
|
|
export function DigaMissionBanner({ onDismiss, onContribute }: Props) {
|
|
const colors = useColors();
|
|
return (
|
|
<View
|
|
style={{
|
|
marginHorizontal: 16,
|
|
marginTop: 16,
|
|
backgroundColor: '#fffbeb',
|
|
borderWidth: 1,
|
|
borderColor: '#fde68a',
|
|
borderRadius: 14,
|
|
padding: 16,
|
|
}}
|
|
>
|
|
<View style={{ flexDirection: 'row', alignItems: 'flex-start', gap: 10 }}>
|
|
<View
|
|
style={{
|
|
width: 28,
|
|
height: 28,
|
|
borderRadius: 14,
|
|
backgroundColor: '#fef3c7',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
marginTop: 2,
|
|
}}
|
|
>
|
|
<Ionicons name="medkit-outline" size={14} color="#854d0e" />
|
|
</View>
|
|
<View style={{ flex: 1 }}>
|
|
<Text
|
|
style={{
|
|
fontSize: 13,
|
|
color: '#854d0e',
|
|
fontFamily: 'Nunito_700Bold',
|
|
}}
|
|
>
|
|
30 Tage geschützt — danke
|
|
</Text>
|
|
<Text
|
|
style={{
|
|
marginTop: 4,
|
|
fontSize: 12,
|
|
color: '#92400e',
|
|
fontFamily: 'Nunito_400Regular',
|
|
lineHeight: 17,
|
|
}}
|
|
>
|
|
Rebreak strebt die Anerkennung als DiGA an. Mit ein paar anonymen
|
|
Angaben hilfst du, die Wirksamkeit zu belegen — damit Krankenkassen
|
|
die App künftig erstatten können.
|
|
</Text>
|
|
|
|
<View style={{ flexDirection: 'row', gap: 8, marginTop: 12 }}>
|
|
<Pressable
|
|
onPress={onContribute}
|
|
style={({ pressed }) => ({
|
|
opacity: pressed ? 0.7 : 1,
|
|
})}
|
|
>
|
|
<View style={{
|
|
paddingHorizontal: 12,
|
|
paddingVertical: 7,
|
|
backgroundColor: '#854d0e',
|
|
borderRadius: 8,
|
|
}}>
|
|
<Text
|
|
style={{
|
|
fontSize: 12,
|
|
color: '#ffffff',
|
|
fontFamily: 'Nunito_600SemiBold',
|
|
}}
|
|
>
|
|
Beitragen
|
|
</Text>
|
|
</View>
|
|
</Pressable>
|
|
<Pressable
|
|
onPress={onDismiss}
|
|
style={({ pressed }) => ({
|
|
opacity: pressed ? 0.7 : 1,
|
|
})}
|
|
>
|
|
<View style={{
|
|
paddingHorizontal: 12,
|
|
paddingVertical: 7,
|
|
borderRadius: 8,
|
|
}}>
|
|
<Text
|
|
style={{
|
|
fontSize: 12,
|
|
color: '#92400e',
|
|
fontFamily: 'Nunito_600SemiBold',
|
|
}}
|
|
>
|
|
Später
|
|
</Text>
|
|
</View>
|
|
</Pressable>
|
|
</View>
|
|
</View>
|
|
<Pressable
|
|
onPress={onDismiss}
|
|
hitSlop={8}
|
|
style={({ pressed }) => ({ opacity: pressed ? 0.5 : 1 })}
|
|
>
|
|
<Ionicons name="close" size={16} color={colors.textMuted} />
|
|
</Pressable>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|