WIP
This commit is contained in:
@@ -19,6 +19,7 @@ struct WorkoutDetailView: View {
|
||||
|
||||
@State var presentedSheet: Sheet?
|
||||
@State var workoutToPlan: Workout?
|
||||
var showAddToCalendar = true
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
@@ -38,7 +39,7 @@ struct WorkoutDetailView: View {
|
||||
bridgeModule.sendWorkoutCompleteToWatch()
|
||||
}, planWorkout: { workout in
|
||||
workoutToPlan = workout
|
||||
}, workout: workout)
|
||||
}, workout: workout, showAddToCalendar: showAddToCalendar)
|
||||
.frame(height: 44)
|
||||
|
||||
}
|
||||
@@ -119,6 +120,7 @@ struct ActionsView: View {
|
||||
|
||||
var workout: Workout
|
||||
@Environment(\.dismiss) var dismiss
|
||||
var showAddToCalendar: Bool
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
@@ -135,16 +137,18 @@ struct ActionsView: View {
|
||||
.background(.red)
|
||||
.foregroundColor(.white)
|
||||
|
||||
Button(action: {
|
||||
planWorkout?(workout)
|
||||
}, label: {
|
||||
Image(systemName: "calendar.badge.plus")
|
||||
.font(.title)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
})
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(.blue)
|
||||
.foregroundColor(.white)
|
||||
if showAddToCalendar {
|
||||
Button(action: {
|
||||
planWorkout?(workout)
|
||||
}, label: {
|
||||
Image(systemName: "calendar.badge.plus")
|
||||
.font(.title)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
})
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(.blue)
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
|
||||
Button(action: {
|
||||
startWorkout()
|
||||
|
||||
Reference in New Issue
Block a user