rate workout and order of buttons
This commit is contained in:
@@ -58,14 +58,14 @@ struct ActionsView: View {
|
|||||||
} else {
|
} else {
|
||||||
Button(action: {
|
Button(action: {
|
||||||
AudioEngine.shared.playFinished()
|
AudioEngine.shared.playFinished()
|
||||||
nextExercise()
|
completedWorkout?()
|
||||||
}, label: {
|
}, label: {
|
||||||
Image(systemName: "arrow.forward")
|
Image(systemName: "checkmark")
|
||||||
.font(.title)
|
.font(.title)
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
})
|
})
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
.background(.green)
|
.background(.blue)
|
||||||
.foregroundColor(.white)
|
.foregroundColor(.white)
|
||||||
|
|
||||||
Button(action: {
|
Button(action: {
|
||||||
@@ -87,14 +87,14 @@ struct ActionsView: View {
|
|||||||
|
|
||||||
Button(action: {
|
Button(action: {
|
||||||
AudioEngine.shared.playFinished()
|
AudioEngine.shared.playFinished()
|
||||||
completedWorkout?()
|
nextExercise()
|
||||||
}, label: {
|
}, label: {
|
||||||
Image(systemName: "checkmark")
|
Image(systemName: "arrow.forward")
|
||||||
.font(.title)
|
.font(.title)
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
})
|
})
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
.background(.blue)
|
.background(.green)
|
||||||
.foregroundColor(.white)
|
.foregroundColor(.white)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,17 +25,7 @@ struct RateWorkoutView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ZStack {
|
ZStack {
|
||||||
LinearGradient(
|
|
||||||
gradient: Gradient(colors: [.black, .green, .red]),
|
|
||||||
startPoint: .leading,
|
|
||||||
endPoint: .trailing
|
|
||||||
)
|
|
||||||
.mask(Slider(value: $difficulty, in: 0...5, step: 1))
|
|
||||||
|
|
||||||
// Dummy replicated slider, to allow sliding
|
|
||||||
Slider(value: $difficulty, in: 0...5, step: 1)
|
Slider(value: $difficulty, in: 0...5, step: 1)
|
||||||
.opacity(0.05) // Opacity is the trick here.
|
|
||||||
.accentColor(.clear)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user