From 7f22a39886c70a4686808a8e8bd4c96f827ec532 Mon Sep 17 00:00:00 2001 From: echo Date: Wed, 18 Mar 2026 00:35:21 +0100 Subject: [PATCH] fitness profile fix --- apps/admin/data/fitai.db | Bin 172032 -> 172032 bytes apps/mobile/src/app/(auth)/onboarding.tsx | 10 +- apps/mobile/src/app/fitness-profile.tsx | 520 +++++++++++++--------- 3 files changed, 314 insertions(+), 216 deletions(-) diff --git a/apps/admin/data/fitai.db b/apps/admin/data/fitai.db index 17ac7ec5bdc37716ca4895a85abbfcb5d9a70775..130e54536f22b9cef86c4f2f5cfebca73bcfd98b 100644 GIT binary patch delta 293 zcmZoTz}0YoYl1Xm@kAMC#^Q|$tN9tHZRQaW<>Pc@@YR===jBzLyg}Z1a<1GJ76t}} z(8;dyf&3XvyuP-I^1KX^EUZAm$-eTTY>acBM?Ce|q`>09!Njk~z`u}RakHX=D8EV_ zlc2sY6C)!~Ap?V;D1)u7U|Kt13>fC@!zy0=kHae>(&J9scb=O{@7?RG57kL5`VxTVJ(lLfZt!WfPbL0Ob}; AhyVZp delta 195 zcmZoTz}0YoYl1Xm;Y1l{#=?yWtN9rnH}eRH@^LR?@YR===jByoVVQh!zQSZ5xvwnA zOkBQ`UF8EOzmw+?$g~bU&%nSC1yaQz4p*hfo0yWDnU`rD{5R7&Bz2Plivt@Y|3U`- zg_{K(+W7@?83pBinHU*GHG!H%d3h%<%ufa?_{_lndAr~O#+Ur!Jk0W(WocE#=@rH0 l6P`0s2M47kM4qRi~e335- - + + ); } @@ -214,18 +214,28 @@ export default function FitnessProfileScreen() { return ( <> - + {/* Header */} - + router.back()} > - Fitness Profile + + Fitness Profile + - + {/* Basic Information */} - Basic Information - - + + Basic Information + + + - Height (cm) - + + HEIGHT (CM) + + updateField( @@ -256,20 +288,35 @@ export default function FitnessProfileScreen() { } keyboardType="decimal-pad" placeholder="175" - placeholderTextColor={theme.colors.gray400} + placeholderTextColor={colors.textTertiary} /> - Weight (kg) - + + WEIGHT (KG) + + updateField( @@ -279,45 +326,75 @@ export default function FitnessProfileScreen() { } keyboardType="decimal-pad" placeholder="70" - placeholderTextColor={theme.colors.gray400} + placeholderTextColor={colors.textTertiary} /> - Age - + + AGE + + updateField("age", text ? parseInt(text, 10) : undefined) } keyboardType="number-pad" placeholder="25" - placeholderTextColor={theme.colors.gray400} + placeholderTextColor={colors.textTertiary} /> - + {/* Gender Selection */} - Gender - + + Gender + + {GENDER_OPTIONS.map((option) => ( updateField("gender", option.value)} > @@ -326,15 +403,22 @@ export default function FitnessProfileScreen() { size={24} color={ profileData.gender === option.value - ? theme.colors.primary - : theme.colors.gray400 + ? "#fff" + : colors.textTertiary } /> {option.label} @@ -346,8 +430,15 @@ export default function FitnessProfileScreen() { {/* Fitness Goal */} - Primary Fitness Goal - + + Primary Fitness Goal + + {FITNESS_GOAL_OPTIONS.map((option, index) => ( - {option.label} + + {option.label} + {profileData.fitnessGoal === option.value && ( )} {index < FITNESS_GOAL_OPTIONS.length - 1 && ( - + )} ))} - + {/* Activity Level */} - Activity Level - + + Activity Level + + {ACTIVITY_LEVEL_OPTIONS.map((option, index) => ( updateField("activityLevel", option.value)} > - {option.label} - + + {option.label} + + {option.description} @@ -403,90 +525,141 @@ export default function FitnessProfileScreen() { )} {index < ACTIVITY_LEVEL_OPTIONS.length - 1 && ( - + )} ))} - + {/* Health Information */} - - Health Information (Optional) + + Health Information - + - Medical Conditions + + MEDICAL CONDITIONS + updateField("medicalConditions", text) } placeholder="e.g., Asthma, diabetes..." - placeholderTextColor={theme.colors.gray400} + placeholderTextColor={colors.textTertiary} multiline numberOfLines={3} textAlignVertical="top" /> - Allergies + + ALLERGIES + updateField("allergies", text)} placeholder="e.g., Peanuts, latex..." - placeholderTextColor={theme.colors.gray400} + placeholderTextColor={colors.textTertiary} multiline numberOfLines={3} textAlignVertical="top" /> - Injuries + + INJURIES + updateField("injuries", text)} placeholder="e.g., Previous knee injury..." - placeholderTextColor={theme.colors.gray400} + placeholderTextColor={colors.textTertiary} multiline numberOfLines={3} textAlignVertical="top" /> - + + + {/* Save Button */} - - + - - {loading ? ( - - ) : ( - <> - - Save Profile - - )} - - + variant="primary" + size="xl" + fullWidth + loading={loading} + /> @@ -496,35 +669,27 @@ export default function FitnessProfileScreen() { const styles = StyleSheet.create({ container: { flex: 1, - backgroundColor: theme.colors.background, }, loadingContainer: { flex: 1, justifyContent: "center", alignItems: "center", - backgroundColor: theme.colors.background, }, header: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", - paddingTop: Platform.OS === "ios" ? 60 : 40, paddingBottom: 20, paddingHorizontal: 20, }, backButton: { width: 40, height: 40, - borderRadius: 20, + borderRadius: 12, backgroundColor: "rgba(255, 255, 255, 0.2)", justifyContent: "center", alignItems: "center", }, - headerTitle: { - fontSize: theme.typography.fontSize["2xl"], - fontWeight: theme.typography.fontWeight.bold, - color: "#fff", - }, scrollView: { flex: 1, }, @@ -533,118 +698,69 @@ const styles = StyleSheet.create({ paddingBottom: 100, }, section: { - marginBottom: 24, - }, - sectionTitle: { - fontSize: theme.typography.fontSize.lg, - fontWeight: theme.typography.fontWeight.bold, - color: theme.colors.gray900, - marginBottom: 12, + marginBottom: 28, }, card: { - backgroundColor: "#fff", - borderRadius: theme.borderRadius.xl, - padding: 16, - ...theme.shadows.subtle, - borderWidth: 1, - borderColor: theme.colors.gray100, + padding: 4, }, - row: { + inputRow: { flexDirection: "row", gap: 12, - marginBottom: 16, }, inputGroup: { flex: 1, - marginBottom: 16, - }, - label: { - fontSize: theme.typography.fontSize.sm, - fontWeight: theme.typography.fontWeight.semibold, - color: theme.colors.gray700, - marginBottom: 8, + marginBottom: 4, }, inputContainer: { flexDirection: "row", alignItems: "center", - backgroundColor: theme.colors.gray50, - borderRadius: theme.borderRadius.lg, - borderWidth: 1, - borderColor: theme.colors.gray200, - paddingHorizontal: 12, - gap: 8, + borderRadius: 14, + borderWidth: 1.5, + paddingHorizontal: 14, + gap: 10, }, input: { flex: 1, - paddingVertical: 12, - fontSize: theme.typography.fontSize.base, - color: theme.colors.gray900, + paddingVertical: 14, + fontSize: 16, + fontWeight: "600", }, textArea: { - backgroundColor: theme.colors.gray50, - borderRadius: theme.borderRadius.lg, - borderWidth: 1, - borderColor: theme.colors.gray200, - padding: 12, - fontSize: theme.typography.fontSize.base, - color: theme.colors.gray900, - minHeight: 80, + borderRadius: 14, + borderWidth: 1.5, + padding: 14, + fontSize: 16, + minHeight: 90, }, - optionsRow: { + genderRow: { flexDirection: "row", - gap: 12, + gap: 10, }, - optionCard: { + genderCard: { flex: 1, - backgroundColor: "#fff", - borderRadius: theme.borderRadius.lg, - padding: 16, - alignItems: "center", - gap: 8, + paddingVertical: 16, + paddingHorizontal: 8, + borderRadius: 14, borderWidth: 2, - borderColor: theme.colors.gray200, - ...theme.shadows.subtle, - }, - optionCardActive: { - borderColor: theme.colors.primary, - backgroundColor: `${theme.colors.primary}10`, - }, - optionLabel: { - fontSize: theme.typography.fontSize.sm, - fontWeight: theme.typography.fontWeight.medium, - color: theme.colors.gray600, - }, - optionLabelActive: { - color: theme.colors.primary, - fontWeight: theme.typography.fontWeight.bold, + alignItems: "center", }, listItem: { flexDirection: "row", alignItems: "center", - paddingVertical: 12, - gap: 12, + paddingVertical: 14, + paddingHorizontal: 12, + gap: 14, }, iconCircle: { - width: 40, - height: 40, - borderRadius: 20, + width: 44, + height: 44, + borderRadius: 12, justifyContent: "center", alignItems: "center", }, - listItemText: { - flex: 1, - fontSize: theme.typography.fontSize.base, - fontWeight: theme.typography.fontWeight.medium, - color: theme.colors.gray900, - }, - listItemDescription: { - fontSize: theme.typography.fontSize.xs, - color: theme.colors.gray500, - marginTop: 2, - }, divider: { height: 1, - backgroundColor: theme.colors.gray100, + marginLeft: 58, }, footer: { position: "absolute", @@ -652,29 +768,7 @@ const styles = StyleSheet.create({ left: 0, right: 0, padding: 20, - paddingBottom: Platform.OS === "ios" ? 40 : 20, - backgroundColor: "#fff", + paddingBottom: 34, borderTopWidth: 1, - borderTopColor: theme.colors.gray100, - ...theme.shadows.medium, - }, - saveButton: { - borderRadius: theme.borderRadius.lg, - overflow: "hidden", - }, - saveButtonGradient: { - flexDirection: "row", - alignItems: "center", - justifyContent: "center", - paddingVertical: 16, - gap: 8, - }, - saveButtonDisabled: { - opacity: 0.6, - }, - saveButtonText: { - fontSize: theme.typography.fontSize.base, - fontWeight: theme.typography.fontWeight.bold, - color: "#fff", }, });