feat: 更新 CoachScreen 和欢迎消息生成逻辑
- 在 CoachScreen 中优化欢迎消息的生成,整合用户配置文件数据,支持选择选项和表情 - 更新欢迎消息生成函数,返回包含内容、选择和交互类型的结构 - 在多个组件中调整样式,提升用户体验和界面一致性 - 在 Statistics 组件中添加记录更新时间,确保数据展示的准确性 - 在 FitnessRingsCard 中修正卡路里和运动时间的显示,确保数值四舍五入
This commit is contained in:
@@ -89,7 +89,7 @@ export function FitnessRingsCard({
|
||||
<View style={styles.dataContainer}>
|
||||
<View style={styles.dataRow}>
|
||||
<Text style={styles.dataText}>
|
||||
<Text style={styles.dataValue}>{activeCalories}</Text>
|
||||
<Text style={styles.dataValue}>{Math.round(activeCalories)}</Text>
|
||||
<Text style={styles.dataGoal}>/{activeCaloriesGoal}</Text>
|
||||
</Text>
|
||||
<Text style={styles.dataUnit}>千卡</Text>
|
||||
@@ -97,7 +97,7 @@ export function FitnessRingsCard({
|
||||
|
||||
<View style={styles.dataRow}>
|
||||
<Text style={styles.dataText}>
|
||||
<Text style={styles.dataValue}>{exerciseMinutes}</Text>
|
||||
<Text style={styles.dataValue}>{Math.round(exerciseMinutes)}</Text>
|
||||
<Text style={styles.dataGoal}>/{exerciseMinutesGoal}</Text>
|
||||
</Text>
|
||||
<Text style={styles.dataUnit}>分钟</Text>
|
||||
@@ -105,7 +105,7 @@ export function FitnessRingsCard({
|
||||
|
||||
<View style={styles.dataRow}>
|
||||
<Text style={styles.dataText}>
|
||||
<Text style={styles.dataValue}>{standHours}</Text>
|
||||
<Text style={styles.dataValue}>{Math.round(standHours)}</Text>
|
||||
<Text style={styles.dataGoal}>/{standHoursGoal}</Text>
|
||||
</Text>
|
||||
<Text style={styles.dataUnit}>小时</Text>
|
||||
|
||||
@@ -693,7 +693,7 @@ export const CreateGoalModal: React.FC<CreateGoalModalProps> = ({
|
||||
<DateTimePicker
|
||||
value={tempSelectedDate || getCurrentEndDate()}
|
||||
mode="date"
|
||||
display={Platform.OS === 'ios' ? 'calendar' : 'default'}
|
||||
display={Platform.OS === 'ios' ? 'spinner' : 'default'}
|
||||
onChange={handleDateChange}
|
||||
minimumDate={new Date()}
|
||||
locale="zh-CN"
|
||||
@@ -788,7 +788,7 @@ const styles = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
paddingHorizontal: 20,
|
||||
paddingTop: 60,
|
||||
paddingTop: 20,
|
||||
paddingBottom: 20,
|
||||
},
|
||||
cancelButton: {
|
||||
|
||||
Reference in New Issue
Block a user