This commit is contained in:
Trey t
2023-07-07 14:02:50 -05:00
parent 4fc5127011
commit f7ab828b28
9 changed files with 3085 additions and 200 deletions

View File

@@ -14,21 +14,16 @@ struct CreateWorkoutMainView: View {
var body: some View {
VStack {
Divider()
TextField("Title", text: $viewModel.title)
.padding()
.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)
.textFieldStyle(OvalTextFieldStyle())
TextField("Description", text: $viewModel.description)
.padding()
.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)
.textFieldStyle(OvalTextFieldStyle())
List() {
ForEach($viewModel.superSets, id: \.id) { superset in
@@ -72,6 +67,16 @@ struct CreateWorkoutMainView: View {
}
.listRowSeparator(.hidden)
}
.background(Color(uiColor: .secondarySystemBackground))
.overlay(Group {
if($viewModel.superSets.isEmpty) {
ZStack() {
Color(uiColor: .secondarySystemBackground)
}
}
})
Divider()
HStack {
Button("Add Superset", action: {
@@ -101,7 +106,9 @@ struct CreateWorkoutMainView: View {
}
.frame(height: 44)
.padding(.bottom)
.background(Color(uiColor: .systemGroupedBackground))
}
.background(Color(uiColor: .systemGroupedBackground))
.sheet(isPresented: $showAddExercise) {
AddExerciseView(selectedExercise: { exercise in
let workoutExercise = CreateWorkoutExercise(exercise: exercise)