feat: 更新依赖项并优化组件结构

- 在 package.json 和 package-lock.json 中新增 @sentry/react-native、react-native-device-info 和 react-native-purchases 依赖
- 更新统计页面,替换 CircularRing 组件为 FitnessRingsCard,增强健身数据展示
- 在布局文件中引入 ToastProvider,优化用户通知体验
- 新增 SuccessToast 组件,提供全局成功提示功能
- 更新健康数据获取逻辑,支持健身圆环数据的提取
- 优化多个组件的样式和交互,提升用户体验
This commit is contained in:
richarjiang
2025-08-21 09:51:25 +08:00
parent 19b92547e1
commit 78620f18ee
21 changed files with 2494 additions and 108 deletions

View File

@@ -0,0 +1,53 @@
import { MaterialIcons } from '@expo/vector-icons';
import React from 'react';
import { StyleSheet, TouchableOpacity } from 'react-native';
interface CustomCheckBoxProps {
checked: boolean;
onCheckedChange: (checked: boolean) => void;
size?: number;
checkedColor?: string;
uncheckedColor?: string;
}
const CustomCheckBox = (props: CustomCheckBoxProps) => {
const {
checked,
onCheckedChange,
size = 16,
checkedColor = '#E91E63',
uncheckedColor = '#999'
} = props;
return (
<TouchableOpacity
style={[styles.container, { width: size + 4, height: size + 4 }]}
onPress={() => onCheckedChange(!checked)}
activeOpacity={0.7}
>
{checked ? (
<MaterialIcons
name="check-box"
size={size}
color={checkedColor}
/>
) : (
<MaterialIcons
name="check-box-outline-blank"
size={size}
color={uncheckedColor}
/>
)}
</TouchableOpacity>
);
};
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
marginRight: 8,
},
});
export default CustomCheckBox;