feat: 更新心情相关页面和组件

- 在心情统计、日历和编辑页面中引入 HeaderBar 组件,提升界面一致性和用户体验
- 移除冗余的头部视图代码,简化组件结构
- 更新心情日历和编辑页面的样式,使用新的颜色常量,增强视觉效果
- 优化心情统计页面的加载状态显示,提升用户交互体验
This commit is contained in:
richarjiang
2025-08-21 19:09:02 +08:00
parent 72e75b602e
commit 098c65b23e
9 changed files with 78 additions and 107 deletions

View File

@@ -10,8 +10,10 @@ import {
selectMoodRecords,
selectMoodStatistics
} from '@/store/moodSlice';
import { HeaderBar } from '@/components/ui/HeaderBar';
import dayjs from 'dayjs';
import { LinearGradient } from 'expo-linear-gradient';
import { router } from 'expo-router';
import React, { useEffect } from 'react';
import {
ActivityIndicator,
@@ -88,8 +90,14 @@ export default function MoodStatisticsScreen() {
end={{ x: 0, y: 1 }}
/>
<SafeAreaView style={styles.safeArea}>
<HeaderBar
title="心情统计"
onBack={() => router.back()}
withSafeTop={false}
transparent={true}
tone="light"
/>
<ScrollView style={styles.scrollView} showsVerticalScrollIndicator={false}>
<Text style={styles.title}></Text>
{loading.history || loading.statistics ? (
<View style={styles.loadingContainer}>
@@ -184,13 +192,7 @@ const styles = StyleSheet.create({
color: '#666',
textAlign: 'center',
},
title: {
fontSize: 28,
fontWeight: '800',
color: '#192126',
marginTop: 24,
marginBottom: 24,
},
loadingContainer: {
flex: 1,
justifyContent: 'center',