misc ui changes

This commit is contained in:
Trey t
2024-11-25 10:10:46 -08:00
parent 4b6352b8fd
commit 5145896f7a
5 changed files with 9683 additions and 168 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -37,10 +37,10 @@ struct AllWorkoutsListView: View {
currentSort: $currentSort) currentSort: $currentSort)
ScrollView { ScrollView {
LazyVStack(spacing: 20) { LazyVStack(spacing: 10) {
ForEach(filteredWorkouts, id:\.id) { workout in ForEach(filteredWorkouts, id:\.id) { workout in
WorkoutOverviewView(workout: workout) WorkoutOverviewView(workout: workout)
.padding([.leading, .trailing]) .padding([.leading, .trailing], 4)
.contentShape(Rectangle()) .contentShape(Rectangle())
.onTapGesture { .onTapGesture {
selectedWorkout(workout) selectedWorkout(workout)

View File

@@ -17,6 +17,7 @@ struct PlanWorkoutView: View {
VStack() { VStack() {
Text(workout.name) Text(workout.name)
.font(.title) .font(.title)
.frame(maxWidth: .infinity, alignment: .leading)
Text(selectedDate.formatted(date: .abbreviated, time: .omitted)) Text(selectedDate.formatted(date: .abbreviated, time: .omitted))
.font(.system(size: 28)) .font(.system(size: 28))
@@ -34,20 +35,6 @@ struct PlanWorkoutView: View {
Divider() Divider()
HStack { HStack {
Button(action: {
planWorkout()
}, label: {
Image(systemName: "plus.app")
.font(.title)
.frame(maxWidth: .infinity, maxHeight: .infinity)
})
.frame(maxWidth: .infinity, alignment: .center)
.frame(height: 44)
.foregroundColor(.blue)
.background(.yellow)
.cornerRadius(8)
.padding()
Button(action: { Button(action: {
dismiss() dismiss()
}, label: { }, label: {
@@ -61,6 +48,20 @@ struct PlanWorkoutView: View {
.background(.red) .background(.red)
.cornerRadius(8) .cornerRadius(8)
.padding() .padding()
Button(action: {
planWorkout()
}, label: {
Image(systemName: "plus.app")
.font(.title)
.frame(maxWidth: .infinity, maxHeight: .infinity)
})
.frame(maxWidth: .infinity, alignment: .center)
.frame(height: 44)
.foregroundColor(.blue)
.background(.yellow)
.cornerRadius(8)
.padding()
} }
Spacer() Spacer()

View File

@@ -155,8 +155,8 @@ struct ExerciseListView: View {
} }
} }
//struct ExerciseListView_Previews: PreviewProvider { struct ExerciseListView_Previews: PreviewProvider {
// static var previews: some View { static var previews: some View {
// ExerciseListView(workout: PreviewData.workout(), showExecersizeInfo: ) ExerciseListView(workout: PreviewData.workout(), showExecersizeInfo: .constant(true))
// } }
//} }

View File

@@ -60,7 +60,7 @@ struct WorkoutOverviewView: View {
} }
.padding() .padding()
.background(Color(uiColor: .secondarySystemBackground)) .background(Color(uiColor: .secondarySystemBackground))
.cornerRadius(15) .cornerRadius(2)
} }
} }