This commit is contained in:
Trey t
2024-06-17 12:04:49 -07:00
parent d9ec548357
commit addeca4ead
2 changed files with 62 additions and 55 deletions

View File

@@ -48,7 +48,6 @@ struct WorkoutDetailView: View {
.onAppear{
avPlayer.play()
}
}
Button(action: {
if let assetURL = ((avPlayer.currentItem?.asset) as? AVURLAsset)?.url,
@@ -85,13 +84,19 @@ struct WorkoutDetailView: View {
.position(x: 22, y: metrics.size.height - 30)
}
}
.padding([.top, .bottom])
.background(Color(uiColor: .tertiarySystemBackground))
}
}
if !bridgeModule.isInWorkout {
InfoView(workout: workout)
.padding(.bottom)
}
if bridgeModule.isInWorkout {
Divider()
.background(Color(uiColor: .secondaryLabel))
HStack {
Text("\(bridgeModule.currentExerciseInfo.currentRound) of \(bridgeModule.currentExerciseInfo.numberOfRoundsInCurrentSuperSet)")
.font(.title3)
@@ -109,11 +114,15 @@ struct WorkoutDetailView: View {
.padding(.trailing, 10)
}
.padding([.top, .bottom])
.background(Color(uiColor: .tertiarySystemBackground))
}
Divider()
.background(Color(uiColor: .secondaryLabel))
ExerciseListView(workout: workout, showExecersizeInfo: $showExecersizeInfo)
.padding([.top, .bottom], 10)
.background(Color(uiColor: .secondarySystemBackground))
.background(Color(uiColor: .systemGroupedBackground))
ActionsView(completedWorkout: {
bridgeModule.completeWorkout()

View File

@@ -13,7 +13,6 @@ struct InfoView: View {
var body: some View {
VStack {
if bridgeModule.isInWorkout == false {
Text(workout.name)
.frame(maxWidth: .infinity, alignment: .leading)
.font(.title3)
@@ -35,7 +34,6 @@ struct InfoView: View {
}
}
}
}
struct InfoView_Previews: PreviewProvider {
static var previews: some View {