update project + confirm complete workout early
This commit is contained in:
17
iphone/Werkout_ios/Resources/Werkout-ios-Info.plist
Normal file
17
iphone/Werkout_ios/Resources/Werkout-ios-Info.plist
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -16,6 +16,7 @@ struct ActionsView: View {
|
||||
@Environment(\.dismiss) var dismiss
|
||||
var showAddToCalendar: Bool
|
||||
var startWorkoutAction: (() -> Void)
|
||||
@State var showCompleteSheet: Bool = false
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
@@ -57,8 +58,7 @@ struct ActionsView: View {
|
||||
.foregroundColor(.white)
|
||||
} else {
|
||||
Button(action: {
|
||||
AudioEngine.shared.playFinished()
|
||||
completedWorkout?()
|
||||
showCompleteSheet.toggle()
|
||||
}, label: {
|
||||
Image(systemName: "checkmark")
|
||||
.font(.title)
|
||||
@@ -98,6 +98,13 @@ struct ActionsView: View {
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
}
|
||||
.alert("Complete Workout", isPresented: $showCompleteSheet) {
|
||||
Button("Complete Workout", role: .destructive) {
|
||||
AudioEngine.shared.playFinished()
|
||||
completedWorkout?()
|
||||
}
|
||||
Button("Back to workout", role: .cancel) { }
|
||||
}
|
||||
}
|
||||
|
||||
func nextExercise() {
|
||||
|
||||
Reference in New Issue
Block a user