WIP
This commit is contained in:
@@ -103,10 +103,37 @@ struct ExerciseListView: View {
|
|||||||
List() {
|
List() {
|
||||||
ForEach(workout.exercisesSortedByCreated_at.indices, id: \.self) { i in
|
ForEach(workout.exercisesSortedByCreated_at.indices, id: \.self) { i in
|
||||||
let obj = workout.exercisesSortedByCreated_at[i]
|
let obj = workout.exercisesSortedByCreated_at[i]
|
||||||
Text(obj.exercise.name)
|
VStack {
|
||||||
.onTapGesture {
|
HStack {
|
||||||
bridgeModule.start(workout: workout, atExerciseIndex: i)
|
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