Profile (3 Iterationen):
- app/profile/index.tsx + components/profile/* (Header, StatsBar, Approved,
Streak, UrgeStats, Demographics, DigaMissionBanner)
- echte Live-Daten via useMe-Hook (Avatar/Nickname/Plan/Email/Provider-Pill)
- Demographics mit echten Inputs (TextInput + Bottom-Sheet-Selects),
debounced auto-save, Pro-Trial-Reward-Banner, Mikro-Why-Texte
- Approved Domains als plain integer (KEIN Plan-Slot/Cap)
- Friendly Hint-Text statt Progress-Bar (alignSelf:'stretch' Pattern)
- StatsBar zentriert mit 3 prominenten Cards (vertikale Dividers)
- Cooldown-Timeline als Liste mit 1px-Rail
- ApprovedDomainsList: Collapse-Chevron rechts in Title-Row (Pattern-Fix)
- Eigene vs fremde Profile-Ansicht streng getrennt (DSGVO/Anonymität)
Header-Dropdown (kein 3-Punkte-Icon):
- Avatar als Trigger im AppHeader (User-Wunsch)
- Custom-Modal beide Plattformen, Card-Style
- SOS prominent oben (nur Wort 'SOS' rot, Tagline 'wir sind für dich da' klein darunter)
- Profile/Settings/Games/Debug(__DEV__)/Logout
- Logout neutral (nicht rot — Recovery-tonal)
- AppHeader: neue showBack + title Props für Sub-Routes
Routes (Stub bis Phase C):
- app/profile/[userId].tsx — anonym (nur public-Stats)
- app/settings.tsx — Coming-Soon-Skeleton
- app/games.tsx — Standalone Games-Page mit GameCard-Grid
- app/debug.tsx — __DEV__-only
Game-Picker (Migration aus Nuxt):
- components/games/{GameCard, StarRating, GameRatingStars}
- 2x2 Grid, 56pt SVG-Icons (inline aus components/urge/gameSvgs.ts)
- Live-Backend /api/games/ratings (silent-fail)
- Re-use UrgeGames.tsx ohne TTS/Cooldown-Loop
UI-Pattern-Fixes (alle aus screenshot-User-Feedback 2026-05-07):
- Snake-Bug (food-pellet React-18-StrictMode-Reducer-double-call) gefixt
- Snake-Buttons platform-native (iOS-blue / Android-ripple)
- Tetris-Margins (16px paddingHorizontal)
- PostCard-Buttons Apple-44pt-Hit-Area (Image-Select, Image-Remove,
Cancel, Share-Pill — via hitSlop)
- ProfileHeader Demographics-Hint: alignSelf:'stretch' Pattern
- ApprovedDomainsList Collapse: Title flex:1 + Chevron rechts
- ProtectionDetailsSheet FAQ-Items: alignSelf:'stretch' defensive
- AppHeader Back-Button: neue showBack-Prop + chevron-back
Memory + Plan-Docs:
- 17 Memory-Files dokumentieren System-Wissen + Patterns
- ops/{CUTOVER, UI_MIGRATION, PROFILE_PAGE, WEBHOOK, GAMES_1V1,
RELEASE_READINESS, TESTING_STATE, MAESTRO_HOSTING}_*.md
Backend bleibt unverändert (Tier-LLM + Nickname + sort:latency
sind seit gestern deployed).
136 lines
3.7 KiB
TypeScript
136 lines
3.7 KiB
TypeScript
import { useState } from 'react';
|
|
import { View, Text, Pressable, LayoutAnimation, Platform, UIManager } from 'react-native';
|
|
import { Ionicons } from '@expo/vector-icons';
|
|
import { colors } from '../../lib/theme';
|
|
|
|
if (Platform.OS === 'android' && UIManager.setLayoutAnimationEnabledExperimental) {
|
|
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
}
|
|
|
|
export type ApprovedDomain = {
|
|
domain: string;
|
|
approvedAt: string;
|
|
};
|
|
|
|
type Props = {
|
|
domains: ApprovedDomain[];
|
|
loading?: boolean;
|
|
};
|
|
|
|
export function ApprovedDomainsList({ domains, loading }: Props) {
|
|
const [expanded, setExpanded] = useState(false);
|
|
|
|
function toggle() {
|
|
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
setExpanded((v) => !v);
|
|
}
|
|
|
|
return (
|
|
<View style={{ marginHorizontal: 16, marginTop: 12 }}>
|
|
<Pressable
|
|
onPress={toggle}
|
|
style={({ pressed }) => ({
|
|
alignSelf: 'stretch',
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
paddingVertical: 12,
|
|
paddingHorizontal: 14,
|
|
backgroundColor: '#ffffff',
|
|
borderWidth: 1,
|
|
borderColor: '#e5e5e5',
|
|
borderRadius: 12,
|
|
opacity: pressed ? 0.7 : 1,
|
|
})}
|
|
>
|
|
<Ionicons
|
|
name="shield-checkmark-outline"
|
|
size={16}
|
|
color={colors.textMuted}
|
|
style={{ marginRight: 8 }}
|
|
/>
|
|
<Text style={{ flex: 1, fontSize: 13, color: colors.text, fontFamily: 'Nunito_600SemiBold' }}>
|
|
Approved Domains{' '}
|
|
<Text style={{ color: colors.textMuted, fontFamily: 'Nunito_400Regular' }}>
|
|
({domains.length})
|
|
</Text>
|
|
</Text>
|
|
<Ionicons
|
|
name={expanded ? 'chevron-up' : 'chevron-down'}
|
|
size={16}
|
|
color={colors.textMuted}
|
|
/>
|
|
</Pressable>
|
|
|
|
{expanded ? (
|
|
<View
|
|
style={{
|
|
marginTop: 6,
|
|
backgroundColor: '#ffffff',
|
|
borderWidth: 1,
|
|
borderColor: '#e5e5e5',
|
|
borderRadius: 12,
|
|
paddingVertical: 4,
|
|
}}
|
|
>
|
|
{loading ? (
|
|
<View style={{ padding: 16 }}>
|
|
<SkeletonRow />
|
|
<SkeletonRow />
|
|
<SkeletonRow />
|
|
</View>
|
|
) : domains.length === 0 ? (
|
|
<Text
|
|
style={{
|
|
paddingVertical: 16,
|
|
paddingHorizontal: 14,
|
|
fontSize: 12,
|
|
color: colors.textMuted,
|
|
fontFamily: 'Nunito_400Regular',
|
|
}}
|
|
>
|
|
Noch keine approved Domains. Submit deine erste in der Community.
|
|
</Text>
|
|
) : (
|
|
domains.map((d, idx) => (
|
|
<View
|
|
key={d.domain}
|
|
style={{
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
justifyContent: 'space-between',
|
|
paddingVertical: 10,
|
|
paddingHorizontal: 14,
|
|
borderTopWidth: idx === 0 ? 0 : 1,
|
|
borderTopColor: 'rgba(0,0,0,0.06)',
|
|
}}
|
|
>
|
|
<Text style={{ fontSize: 13, color: colors.text, fontFamily: 'Nunito_600SemiBold' }}>
|
|
{d.domain}
|
|
</Text>
|
|
<Text
|
|
style={{ fontSize: 11, color: colors.textMuted, fontFamily: 'Nunito_400Regular' }}
|
|
>
|
|
{d.approvedAt}
|
|
</Text>
|
|
</View>
|
|
))
|
|
)}
|
|
</View>
|
|
) : null}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function SkeletonRow() {
|
|
return (
|
|
<View
|
|
style={{
|
|
height: 14,
|
|
backgroundColor: '#f5f5f5',
|
|
borderRadius: 4,
|
|
marginVertical: 6,
|
|
}}
|
|
/>
|
|
);
|
|
}
|