simplify Exercise to only hold on to the unit of the metric, remove ValueKeyboard as input

This commit is contained in:
Felix Förtsch
2024-10-02 12:41:04 +02:00
parent 41a82f081a
commit b7f5caf9dd
15 changed files with 630 additions and 243 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ struct ExerciseLibrary: View {
@Environment(\.modelContext) private var modelContext
@Query(sort: \Exercise.name) private var exercises: [Exercise]
@State private var newExercise: Exercise = Exercise("", .reps)
@State private var newExercise: Exercise = Exercise("")
@State private var newExerciseName: String = ""
@State private var isAddingExercise: Bool = false
@FocusState private var isInputFieldFocused: Bool
@@ -37,9 +37,9 @@ struct ExerciseLibrary: View {
HStack {
Text(exercise.name)
Spacer()
Text(exercise.metric.rawValue)
.font(.footnote)
.foregroundStyle(.gray)
// Text(exercise.metric.rawValue)
// .font(.footnote)
// .foregroundStyle(.gray)
}
}
}