feat: 新增任务详情页面及相关功能

- 创建任务详情页面,展示任务的详细信息,包括状态、描述、优先级和进度
- 实现任务完成和跳过功能,用户可通过按钮操作更新任务状态
- 添加评论功能,用户可以对任务进行评论并发送
- 优化任务卡片,点击后可跳转至任务详情页面
- 更新相关样式,确保界面一致性和美观性
This commit is contained in:
2025-08-23 13:33:39 +08:00
parent 75806df660
commit b807e498ed
5 changed files with 680 additions and 65 deletions

View File

@@ -45,38 +45,6 @@ export function HeaderBar({
}
};
const getBackButtonStyle = () => {
const baseStyle = [styles.backButton];
switch (variant) {
case 'elevated':
return [...baseStyle, {
backgroundColor: `${theme.primary}15`, // 15% 透明度
borderWidth: 1,
borderColor: `${theme.primary}20`, // 20% 透明度
}];
case 'minimal':
return [...baseStyle, {
backgroundColor: `${theme.neutral100}80`, // 80% 透明度
}];
default:
return [...baseStyle, {
backgroundColor: `${theme.accentGreen}20`, // 20% 透明度
}];
}
};
const getBackButtonIconColor = () => {
switch (variant) {
case 'elevated':
return theme.primary;
case 'minimal':
return theme.textSecondary;
default:
return theme.onPrimary;
}
};
const getBorderStyle = () => {
if (!showBottomBorder) return {};
@@ -110,13 +78,13 @@ export function HeaderBar({
<TouchableOpacity
accessibilityRole="button"
onPress={onBack}
style={getBackButtonStyle()}
style={styles.backButton}
activeOpacity={0.7}
>
<Ionicons
name="chevron-back"
size={20}
color={getBackButtonIconColor()}
size={24}
color={theme.text}
/>
</TouchableOpacity>
) : (
@@ -157,17 +125,8 @@ const styles = StyleSheet.create({
backButton: {
width: 32,
height: 32,
borderRadius: 16,
alignItems: 'center',
justifyContent: 'center',
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 1,
},
shadowOpacity: 0.1,
shadowRadius: 2,
elevation: 2,
},
titleContainer: {
flex: 1,