fix: API field mapping, HealthKit entitlement, profile tab, forgot password

This commit is contained in:
Cosmo
2026-03-25 12:07:08 +00:00
parent bfb9a07d2d
commit 74805bc9d1
12 changed files with 266 additions and 46 deletions

View File

@@ -7,9 +7,11 @@ struct AddTaskView: View {
@State private var title = ""
@State private var description = ""
@State private var priority: TaskPriority = .medium
@State private var priority: Int = 2
@State private var isLoading = false
private let priorities = [(1, "Низкий"), (2, "Средний"), (3, "Высокий"), (4, "Срочный")]
var body: some View {
NavigationView {
ZStack {
@@ -20,7 +22,7 @@ struct AddTaskView: View {
TextField("Описание (необязательно)", text: $description)
.padding().background(Color.white.opacity(0.08)).cornerRadius(12).foregroundColor(.white)
Picker("Приоритет", selection: $priority) {
ForEach(TaskPriority.allCases, id: \.self) { p in Text(p.displayName).tag(p) }
ForEach(priorities, id: \.0) { p in Text(p.1).tag(p.0) }
}
.pickerStyle(.segmented)
Spacer()