feat: 更新应用名称和图标,优化用户界面

- 将应用名称修改为“Health Bot”,提升品牌识别度
- 更新应用图标为 logo.png,确保视觉一致性
- 删除不再使用的 ai-coach-chat 页面,简化代码结构
- 更新多个页面的导航和按钮文本,提升用户体验
- 添加体重历史记录功能,支持用户追踪健康数据
- 优化 Redux 状态管理,确保数据处理的准确性和稳定性
This commit is contained in:
2025-08-17 21:34:04 +08:00
parent b2c4f76c39
commit 6a67fb21f7
25 changed files with 1511 additions and 1428 deletions

View File

@@ -8,9 +8,10 @@ import { useAppDispatch, useAppSelector } from '@/hooks/redux';
import { useColorScheme } from '@/hooks/useColorScheme';
import { listRecommendedArticles } from '@/services/articles';
import { fetchRecommendations, RecommendationType } from '@/services/recommendations';
import { loadPlans, type TrainingPlan } from '@/store/trainingPlanSlice';
import { loadPlans } from '@/store/trainingPlanSlice';
// Removed WorkoutCard import since we no longer use the horizontal carousel
import { useAuthGuard } from '@/hooks/useAuthGuard';
import { TrainingPlan } from '@/services/trainingPlanApi';
import { getChineseGreeting } from '@/utils/date';
import { useRouter } from 'expo-router';
import React from 'react';
@@ -29,7 +30,7 @@ export default function HomeScreen() {
const { width: windowWidth, height: windowHeight } = useWindowDimensions();
// 训练计划状态
const { plans, currentId } = useAppSelector((s) => s.trainingPlan);
const { plans } = useAppSelector((s) => s.trainingPlan);
const [activePlan, setActivePlan] = React.useState<TrainingPlan | null>(null);
// Draggable coach badge state
@@ -148,13 +149,13 @@ export default function HomeScreen() {
// 获取激活的训练计划
React.useEffect(() => {
if (isLoggedIn && currentId && plans.length > 0) {
const currentPlan = plans.find(p => p.id === currentId);
if (isLoggedIn && plans.length > 0) {
const currentPlan = plans.find(p => p.isActive);
setActivePlan(currentPlan || null);
} else {
setActivePlan(null);
}
}, [isLoggedIn, currentId, plans]);
}, [isLoggedIn, plans]);
// 拉取推荐接口(已登录时)
React.useEffect(() => {