feat: 实现目标通知功能及相关组件
- 新增目标通知功能,支持根据用户创建目标时选择的频率和开始时间自动创建本地定时推送通知 - 实现每日、每周和每月的重复类型,用户可自定义选择提醒时间和重复规则 - 集成目标通知测试组件,方便开发者测试不同类型的通知 - 更新相关文档,详细描述目标通知功能的实现和使用方法 - 优化目标页面,确保用户体验和界面一致性
This commit is contained in:
@@ -4,14 +4,14 @@ import { Ionicons } from '@expo/vector-icons';
|
||||
import dayjs from 'dayjs';
|
||||
import React, { useMemo } from 'react';
|
||||
import { Dimensions, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { TodoItem } from './TodoCard';
|
||||
import { GoalItem } from './GoalCard';
|
||||
|
||||
interface TimelineEvent {
|
||||
id: string;
|
||||
title: string;
|
||||
startTime: string;
|
||||
endTime?: string;
|
||||
category: TodoItem['category'];
|
||||
category: GoalItem['category'];
|
||||
isCompleted?: boolean;
|
||||
color?: string;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ const getEventStyle = (event: TimelineEvent) => {
|
||||
};
|
||||
|
||||
// 获取分类颜色
|
||||
const getCategoryColor = (category: TodoItem['category']) => {
|
||||
const getCategoryColor = (category: GoalItem['category']) => {
|
||||
switch (category) {
|
||||
case 'workout':
|
||||
return '#FF6B6B';
|
||||
|
||||
Reference in New Issue
Block a user