feat: 移除目标管理功能模块

删除了完整的目标管理功能,包括目标创建、编辑、任务管理等相关页面和组件。同时移除了相关的API服务、Redux状态管理、类型定义和通知功能。应用版本从1.0.20升级到1.0.21。
This commit is contained in:
richarjiang
2025-10-31 08:49:22 +08:00
parent 7cd290d341
commit 16c2351160
31 changed files with 953 additions and 7884 deletions

View File

@@ -1,16 +1,14 @@
import React, { useState } from 'react';
import {
View,
Text,
TouchableOpacity,
StyleSheet,
Alert,
ScrollView,
StyleSheet,
TouchableOpacity,
View
} from 'react-native';
import { useNotifications } from '../hooks/useNotifications';
import { ThemedText } from './ThemedText';
import { ThemedView } from './ThemedView';
import { DailySummaryTest } from './DailySummaryTest';
export const NotificationTest: React.FC = () => {
const {
@@ -23,9 +21,7 @@ export const NotificationTest: React.FC = () => {
cancelAllNotifications,
getAllScheduledNotifications,
sendWorkoutReminder,
sendGoalAchievement,
sendMoodCheckinReminder,
debugNotificationStatus,
} = useNotifications();
const [scheduledNotifications, setScheduledNotifications] = useState<any[]>([]);
@@ -97,15 +93,6 @@ export const NotificationTest: React.FC = () => {
}
};
const handleSendGoalAchievement = async () => {
try {
await sendGoalAchievement('目标达成', '恭喜您完成了本周的运动目标!');
Alert.alert('成功', '目标达成通知已发送');
} catch (error) {
Alert.alert('错误', '发送目标达成通知失败');
}
};
const handleSendMoodCheckinReminder = async () => {
try {
await sendMoodCheckinReminder('心情打卡', '记得记录今天的心情状态哦');
@@ -134,20 +121,11 @@ export const NotificationTest: React.FC = () => {
}
};
const handleDebugNotificationStatus = async () => {
try {
await debugNotificationStatus();
Alert.alert('调试完成', '请查看控制台输出');
} catch (error) {
Alert.alert('错误', '调试失败');
}
};
return (
<ThemedView style={styles.container}>
<ScrollView showsVerticalScrollIndicator={false}>
<ThemedText style={styles.title}></ThemedText>
<View style={styles.statusContainer}>
<ThemedText style={styles.statusText}>
: {isInitialized ? '已初始化' : '未初始化'}
@@ -193,13 +171,6 @@ export const NotificationTest: React.FC = () => {
<ThemedText style={styles.buttonText}></ThemedText>
</TouchableOpacity>
<TouchableOpacity
style={styles.button}
onPress={handleSendGoalAchievement}
>
<ThemedText style={styles.buttonText}></ThemedText>
</TouchableOpacity>
<TouchableOpacity
style={styles.button}
onPress={handleSendMoodCheckinReminder}
@@ -214,13 +185,6 @@ export const NotificationTest: React.FC = () => {
<ThemedText style={styles.buttonText}></ThemedText>
</TouchableOpacity>
<TouchableOpacity
style={[styles.button, styles.debugButton]}
onPress={handleDebugNotificationStatus}
>
<ThemedText style={styles.buttonText}></ThemedText>
</TouchableOpacity>
<TouchableOpacity
style={[styles.button, styles.dangerButton]}
onPress={handleCancelAllNotifications}
@@ -247,9 +211,6 @@ export const NotificationTest: React.FC = () => {
))}
</View>
)}
{/* 每日总结推送测试 */}
<DailySummaryTest userName="测试用户" />
</ScrollView>
</ThemedView>
);