feat: 移除目标管理演示页面并优化相关组件
- 删除目标管理演示页面的代码,简化项目结构 - 更新底部导航,移除目标管理演示页面的路由 - 调整相关组件的样式和逻辑,确保界面一致性 - 优化颜色常量的使用,提升视觉效果
This commit is contained in:
@@ -59,19 +59,24 @@ const ActivityHeatMap = () => {
|
||||
console.log('generateActivityData', generateActivityData);
|
||||
|
||||
|
||||
// 根据活跃度计算颜色
|
||||
// 根据活跃度计算颜色 - 优化配色方案
|
||||
const getActivityColor = (level: number): string => {
|
||||
// 由于useColorScheme总是返回'light',我们直接使用浅色主题的颜色
|
||||
switch (level) {
|
||||
case 0:
|
||||
return colors.separator; // 使用主题分隔线色
|
||||
// 无活动:使用主题适配的背景色
|
||||
return colors.separator;
|
||||
case 1:
|
||||
// 低活动:使用主题主色的浅色版本
|
||||
return 'rgba(122, 90, 248, 0.15)'; // 浅色模式下的浅紫色
|
||||
case 2:
|
||||
return 'rgba(135,206,235,0.4)';
|
||||
// 中等活动:使用主题主色的中等透明度
|
||||
return 'rgba(122, 90, 248, 0.35)'; // 浅色模式下的中等紫色
|
||||
case 3:
|
||||
return 'rgba(135,206,235,0.65)';
|
||||
// 高活动:使用主题主色的较高透明度
|
||||
return 'rgba(122, 90, 248, 0.55)'; // 浅色模式下的较深紫色
|
||||
case 4:
|
||||
default:
|
||||
// 最高活动:使用主题主色
|
||||
return colors.primary;
|
||||
}
|
||||
};
|
||||
@@ -143,14 +148,20 @@ const ActivityHeatMap = () => {
|
||||
}, [generateActivityData]);
|
||||
|
||||
return (
|
||||
<View style={[styles.container, { backgroundColor: colors.card }]}>
|
||||
<View style={[styles.container, {
|
||||
backgroundColor: colors.card,
|
||||
borderColor: colors.border,
|
||||
shadowColor: 'rgba(122, 90, 248, 0.08)',
|
||||
}]}>
|
||||
{/* 标题和统计 */}
|
||||
<View style={styles.header}>
|
||||
<View style={styles.titleRow}>
|
||||
<Text style={[styles.subtitle, { color: colors.textMuted }]}>
|
||||
最近6个月活跃 {activityStats.activeDays} 天
|
||||
</Text>
|
||||
<View style={[styles.statsBadge, { backgroundColor: colors.ornamentPrimary }]}>
|
||||
<View style={[styles.statsBadge, {
|
||||
backgroundColor: 'rgba(122, 90, 248, 0.1)'
|
||||
}]}>
|
||||
<Text style={[styles.statsText, { color: colors.primary }]}>
|
||||
{activityStats.activeRate}%
|
||||
</Text>
|
||||
@@ -238,13 +249,10 @@ const styles = StyleSheet.create({
|
||||
borderRadius: 16,
|
||||
padding: 20,
|
||||
marginBottom: 20,
|
||||
shadowColor: 'rgba(135,206,235,0.25)',
|
||||
shadowOffset: { width: 0, height: 3 },
|
||||
shadowOpacity: 0.12,
|
||||
shadowRadius: 6,
|
||||
elevation: 3,
|
||||
borderWidth: 1,
|
||||
borderColor: 'rgba(135,206,235,0.08)',
|
||||
},
|
||||
header: {
|
||||
marginBottom: 8,
|
||||
|
||||
Reference in New Issue
Block a user