feat: 适配 headerbar ios26

This commit is contained in:
richarjiang
2025-10-14 16:31:19 +08:00
parent cf069f3537
commit 435f5cc65c
41 changed files with 493 additions and 5445 deletions

View File

@@ -5,6 +5,7 @@ import { Colors } from '@/constants/Colors';
import { getTabBarBottomPadding } from '@/constants/TabBar';
import { useAppDispatch, useAppSelector } from '@/hooks/redux';
import { useColorScheme } from '@/hooks/useColorScheme';
import { useSafeAreaTop } from '@/hooks/useSafeAreaWithPadding';
import { deleteWeightRecord, fetchWeightHistory, updateUserProfile, updateWeightRecord, WeightHistoryItem } from '@/store/userSlice';
import { Ionicons } from '@expo/vector-icons';
import dayjs from 'dayjs';
@@ -22,6 +23,8 @@ import {
} from 'react-native';
export default function WeightRecordsPage() {
const safeAreaTop = useSafeAreaTop()
const dispatch = useAppDispatch();
const userProfile = useAppSelector((s) => s.user.profile);
const weightHistory = useAppSelector((s) => s.user.weightHistory);
@@ -184,8 +187,12 @@ export default function WeightRecordsPage() {
<Ionicons name="add" size={24} color="#192126" />
</TouchableOpacity>}
/>
<View style={{
paddingTop: safeAreaTop
}} />
{/* Weight Statistics */}
<View style={styles.statsContainer}>
<View style={[styles.statsContainer]}>
<View style={styles.statsRow}>
<View style={styles.statItem}>
<Text style={styles.statValue}>{totalWeightLoss.toFixed(1)}kg</Text>