feat: 优化目标创建成功提示及任务筛选功能

- 将目标创建成功后的提示从系统默认的 Alert.alert 改为使用自定义确认弹窗,提升用户体验和视觉一致性
- 在任务筛选中新增“已跳过”选项,支持用户更好地管理任务状态
- 更新任务卡片和进度卡片,展示跳过任务的数量和状态
- 调整相关组件样式,确保界面一致性和美观性
- 编写相关文档,详细描述新功能和使用方法
This commit is contained in:
2025-08-22 22:19:49 +08:00
parent 7d28b79d86
commit 75806df660
9 changed files with 436 additions and 37 deletions

View File

@@ -146,20 +146,26 @@ export function ConfirmDialog({
{message && <Text style={styles.message}>{message}</Text>}
{/* 按钮组 */}
<View style={styles.buttonContainer}>
<TouchableOpacity
style={[styles.button, styles.cancelButton]}
onPress={handleCancel}
activeOpacity={0.7}
>
<Text style={styles.cancelButtonText}>{cancelText}</Text>
</TouchableOpacity>
<View style={[
styles.buttonContainer,
!cancelText && styles.singleButtonContainer
]}>
{cancelText && (
<TouchableOpacity
style={[styles.button, styles.cancelButton]}
onPress={handleCancel}
activeOpacity={0.7}
>
<Text style={styles.cancelButtonText}>{cancelText}</Text>
</TouchableOpacity>
)}
<TouchableOpacity
style={[
styles.button,
styles.confirmButton,
{ backgroundColor: confirmButtonColor },
!cancelText && styles.singleConfirmButton,
]}
onPress={handleConfirm}
activeOpacity={0.7}
@@ -226,12 +232,18 @@ const styles = StyleSheet.create({
gap: 12,
width: '100%',
},
singleButtonContainer: {
gap: 0,
},
button: {
flex: 1,
paddingVertical: 14,
borderRadius: 12,
alignItems: 'center',
},
singleConfirmButton: {
flex: 1,
},
cancelButton: {
backgroundColor: '#F3F4F6',
},