feat(ui): 统一应用主题色为天空蓝并优化渐变背景

将应用主色调从 '#BBF246' 更改为 '#87CEEB'(天空蓝),并更新所有相关组件和页面中的颜色引用。同时为多个页面添加统一的渐变背景,提升视觉效果和用户体验。新增压力分析模态框组件,并优化压力计组件的交互与显示逻辑。更新应用图标和启动图资源。
This commit is contained in:
richarjiang
2025-08-20 09:38:25 +08:00
parent 37f8c3c78d
commit d76ba48424
35 changed files with 519 additions and 184 deletions

View File

@@ -1,3 +1,4 @@
import { Colors } from '@/constants/Colors';
import { ROUTES } from '@/constants/Routes';
import { useAppDispatch, useAppSelector } from '@/hooks/redux';
import { useAuthGuard } from '@/hooks/useAuthGuard';
@@ -20,11 +21,6 @@ const CHART_WIDTH = CARD_WIDTH - 36; // 减去卡片内边距
const CHART_HEIGHT = 100;
const PADDING = 10;
type WeightHistoryItem = {
weight: string;
source: string;
createdAt: string;
};
export function WeightHistoryCard() {
const dispatch = useAppDispatch();
@@ -177,7 +173,7 @@ export function WeightHistoryCard() {
<Ionicons
name={showChart ? "chevron-up" : "chevron-down"}
size={16}
color="#BBF246"
color={Colors.light.primary}
/>
</TouchableOpacity>
<TouchableOpacity
@@ -185,7 +181,7 @@ export function WeightHistoryCard() {
onPress={navigateToCoach}
activeOpacity={0.8}
>
<Ionicons name="add" size={16} color="#BBF246" />
<Ionicons name="add" size={16} color={Colors.light.primary} />
</TouchableOpacity>
</View>
</View>
@@ -209,14 +205,6 @@ export function WeightHistoryCard() {
</Text>
</View>
</View>
<TouchableOpacity
style={styles.viewTrendButton}
onPress={() => setShowChart(true)}
activeOpacity={0.8}
>
<Ionicons name="trending-up" size={14} color="#BBF246" />
<Text style={styles.viewTrendText}></Text>
</TouchableOpacity>
</View>
)}
@@ -240,7 +228,7 @@ export function WeightHistoryCard() {
{/* 折线 */}
<Path
d={singlePointPath}
stroke="#BBF246"
stroke={Colors.light.accentGreen}
strokeWidth={3}
fill="none"
strokeLinecap="round"
@@ -259,7 +247,7 @@ export function WeightHistoryCard() {
cx={point.x}
cy={point.y}
r={isLastPoint ? 6 : 4}
fill="#BBF246"
fill={Colors.light.accentGreen}
stroke="#FFFFFF"
strokeWidth={2}
/>
@@ -271,7 +259,7 @@ export function WeightHistoryCard() {
cy={point.y - 15}
r={10}
fill="rgba(255,255,255,0.9)"
stroke="#BBF246"
stroke={Colors.light.accentGreen}
strokeWidth={1}
/>
<SvgText
@@ -343,7 +331,6 @@ const styles = StyleSheet.create({
width: 30,
height: 30,
borderRadius: 8,
backgroundColor: '#F0F8E0',
alignItems: 'center',
justifyContent: 'center',
marginRight: 10,
@@ -363,7 +350,6 @@ const styles = StyleSheet.create({
width: 28,
height: 28,
borderRadius: 14,
backgroundColor: '#F0F8E0',
alignItems: 'center',
justifyContent: 'center',
},
@@ -371,7 +357,6 @@ const styles = StyleSheet.create({
width: 28,
height: 28,
borderRadius: 14,
backgroundColor: '#F0F8E0',
alignItems: 'center',
justifyContent: 'center',
},
@@ -394,7 +379,7 @@ const styles = StyleSheet.create({
recordButton: {
flexDirection: 'row',
alignItems: 'center',
backgroundColor: '#BBF246',
backgroundColor: Colors.light.accentGreen,
paddingHorizontal: 16,
paddingVertical: 10,
borderRadius: 20,
@@ -437,12 +422,11 @@ const styles = StyleSheet.create({
marginTop: 8,
},
summaryInfo: {
paddingVertical: 12,
},
summaryRow: {
flexDirection: 'row',
justifyContent: 'space-around',
marginBottom: 12,
marginBottom: 6,
},
summaryItem: {
alignItems: 'center',
@@ -457,20 +441,4 @@ const styles = StyleSheet.create({
fontWeight: '700',
color: '#192126',
},
viewTrendButton: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#F0F8E0',
paddingHorizontal: 16,
paddingVertical: 8,
borderRadius: 16,
gap: 6,
alignSelf: 'center',
},
viewTrendText: {
fontSize: 13,
fontWeight: '600',
color: '#192126',
},
});