feat: 添加教练功能和更新用户界面
- 新增教练页面,用户可以与教练进行互动和咨询 - 更新首页,切换到教练 tab 并传递名称参数 - 优化个人信息页面,添加注销帐号和退出登录功能 - 更新隐私政策和用户协议的链接,确保用户在使用前同意相关条款 - 修改今日训练页面标题为“开始训练”,提升用户体验 - 删除不再使用的进度条组件,简化代码结构
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ProgressBar } from '@/components/ProgressBar';
|
||||
|
||||
import React from 'react';
|
||||
import { Image, StyleSheet, Text, View } from 'react-native';
|
||||
|
||||
@@ -9,10 +9,9 @@ type PlanCardProps = {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
level?: Level;
|
||||
progress: number; // 0 - 1
|
||||
};
|
||||
|
||||
export function PlanCard({ image, title, subtitle, level, progress }: PlanCardProps) {
|
||||
export function PlanCard({ image, title, subtitle, level }: PlanCardProps) {
|
||||
return (
|
||||
<View style={styles.card}>
|
||||
<Image source={{ uri: image }} style={styles.image} />
|
||||
@@ -27,10 +26,6 @@ export function PlanCard({ image, title, subtitle, level, progress }: PlanCardPr
|
||||
|
||||
<Text style={styles.title}>{title}</Text>
|
||||
<Text style={styles.subtitle}>{subtitle}</Text>
|
||||
|
||||
<View style={styles.progressWrapper}>
|
||||
<ProgressBar progress={progress} showLabel={true} />
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
@@ -86,9 +81,6 @@ const styles = StyleSheet.create({
|
||||
fontSize: 12,
|
||||
color: '#B1B6BD',
|
||||
},
|
||||
progressWrapper: {
|
||||
marginTop: 18,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { router } from 'expo-router';
|
||||
import { PRIVACY_POLICY_URL, USER_AGREEMENT_URL } from '@/constants/Agree';
|
||||
import React from 'react';
|
||||
import {
|
||||
Dimensions,
|
||||
Modal,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
View
|
||||
Dimensions,
|
||||
Linking,
|
||||
Modal,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
View
|
||||
} from 'react-native';
|
||||
|
||||
const { width } = Dimensions.get('window');
|
||||
@@ -23,11 +24,11 @@ export default function PrivacyConsentModal({
|
||||
onDisagree,
|
||||
}: PrivacyConsentModalProps) {
|
||||
const handleUserAgreementPress = () => {
|
||||
router.push('/legal/user-agreement');
|
||||
Linking.openURL(USER_AGREEMENT_URL);
|
||||
};
|
||||
|
||||
const handlePrivacyPolicyPress = () => {
|
||||
router.push('/legal/privacy-policy');
|
||||
Linking.openURL(PRIVACY_POLICY_URL);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -19,6 +19,7 @@ const MAPPING = {
|
||||
'chevron.left.forwardslash.chevron.right': 'code',
|
||||
'chevron.right': 'chevron-right',
|
||||
'person.fill': 'person',
|
||||
'person.3.fill': 'people',
|
||||
} as IconMapping;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user