WIP
This commit is contained in:
@@ -103,10 +103,37 @@ struct ExerciseListView: View {
|
||||
List() {
|
||||
ForEach(workout.exercisesSortedByCreated_at.indices, id: \.self) { i in
|
||||
let obj = workout.exercisesSortedByCreated_at[i]
|
||||
Text(obj.exercise.name)
|
||||
.onTapGesture {
|
||||
bridgeModule.start(workout: workout, atExerciseIndex: i)
|
||||
VStack {
|
||||
HStack {
|
||||
if i == bridgeModule.currentExerciseIdx {
|
||||
Image(systemName: "checkmark")
|
||||
.foregroundColor(.green)
|
||||
}
|
||||
|
||||
Text(obj.exercise.name)
|
||||
.onTapGesture {
|
||||
bridgeModule.start(workout: workout, atExerciseIndex: i)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
if i == bridgeModule.currentExerciseIdx {
|
||||
HStack {
|
||||
if obj.exercise.isReps {
|
||||
Text("is reps")
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
if obj.exercise.isWeight {
|
||||
Text("is weight")
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
if obj.exercise.isDuration {
|
||||
Text("is duration")
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user