feat: 更新文档和视图以支持iOS 17及优化用户体验

- 更新Yana项目文档,调整适用版本至iOS 17,确保与最新开发环境兼容。
- 在多个视图中重构代码,优化状态管理和视图逻辑,提升用户体验。
- 添加默认初始化器以简化状态管理,确保各个Feature的状态一致性。
- 更新视图组件,移除不必要的硬编码,增强代码可读性和维护性。
- 修复多个视图中的逻辑错误,确保功能正常运行。
This commit is contained in:
edwinQQQ
2025-07-29 17:57:42 +08:00
parent 3ec1b1302f
commit 3d00e459e3
28 changed files with 689 additions and 554 deletions

View File

@@ -25,15 +25,15 @@ struct IDLoginFeature {
case failed //
}
#if DEBUG
init() {
self.userID = "2356814"
self.password = "a123456"
self.userID = ""
self.password = ""
}
#endif
}
enum Action: Equatable {
case userIDChanged(String)
case passwordChanged(String)
case togglePasswordVisibility
case loginButtonTapped(userID: String, password: String)
case forgotPasswordTapped
@@ -52,6 +52,12 @@ struct IDLoginFeature {
var body: some ReducerOf<Self> {
Reduce { state, action in
switch action {
case let .userIDChanged(userID):
state.userID = userID
return .none
case let .passwordChanged(password):
state.password = password
return .none
case .togglePasswordVisibility:
state.isPasswordVisible.toggle()
return .none