WIP
This commit is contained in:
@@ -16,47 +16,54 @@ struct CompletedWorkoutView: View {
|
||||
@State var difficulty: Float = 0
|
||||
@State var notes: String = ""
|
||||
let completedWorkoutDismissed: ((Bool) -> Void)?
|
||||
@State var isUploading: Bool = false
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
topViews()
|
||||
|
||||
Divider()
|
||||
|
||||
HStack {
|
||||
calsBurned()
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
heartRates()
|
||||
.frame(maxWidth: .infinity)
|
||||
ZStack {
|
||||
if isUploading {
|
||||
ProgressView("Uploading")
|
||||
}
|
||||
|
||||
rateWorkout()
|
||||
.frame(maxHeight: 88)
|
||||
|
||||
Divider()
|
||||
|
||||
TextField("Notes", text: $notes)
|
||||
.frame(height: 55)
|
||||
.textFieldStyle(PlainTextFieldStyle())
|
||||
.padding([.horizontal], 4)
|
||||
.overlay(RoundedRectangle(cornerRadius: 16).stroke(Color(uiColor: .clear))).background(Color(uiColor: .init(red: 200/255, green: 200/255, blue: 200/255, alpha: 0.2)))
|
||||
VStack {
|
||||
topViews()
|
||||
|
||||
Divider()
|
||||
|
||||
HStack {
|
||||
calsBurned()
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
heartRates()
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
|
||||
rateWorkout()
|
||||
.frame(maxHeight: 88)
|
||||
|
||||
Divider()
|
||||
|
||||
TextField("Notes", text: $notes)
|
||||
.frame(height: 55)
|
||||
.textFieldStyle(PlainTextFieldStyle())
|
||||
.padding([.horizontal], 4)
|
||||
.overlay(RoundedRectangle(cornerRadius: 16).stroke(Color(uiColor: .clear))).background(Color(uiColor: .init(red: 200/255, green: 200/255, blue: 200/255, alpha: 0.2)))
|
||||
.cornerRadius(8)
|
||||
|
||||
Spacer()
|
||||
|
||||
Button("Upload", action: {
|
||||
isUploading = true
|
||||
upload(postBody: postData)
|
||||
})
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
.frame(height: 44)
|
||||
.foregroundColor(.blue)
|
||||
.background(.yellow)
|
||||
.cornerRadius(8)
|
||||
|
||||
Spacer()
|
||||
|
||||
Button("Upload", action: {
|
||||
upload(postBody: postData)
|
||||
})
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
.frame(height: 44)
|
||||
.foregroundColor(.blue)
|
||||
.background(.yellow)
|
||||
.cornerRadius(8)
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
.padding([.leading, .trailing])
|
||||
}
|
||||
.padding([.leading, .trailing])
|
||||
}
|
||||
|
||||
func topViews() -> some View {
|
||||
|
||||
Reference in New Issue
Block a user