From a0c8b21bf4121008b3701e9209b3dd43d96565b9 Mon Sep 17 00:00:00 2001 From: rzen Date: Sun, 20 Jul 2025 20:11:17 -0400 Subject: [PATCH] wip --- .../Views/ActiveWorkoutListView.swift | 81 ++++++++----------- 1 file changed, 35 insertions(+), 46 deletions(-) diff --git a/Worksouts Watch App/Views/ActiveWorkoutListView.swift b/Worksouts Watch App/Views/ActiveWorkoutListView.swift index f78c8b9..2d23d00 100644 --- a/Worksouts Watch App/Views/ActiveWorkoutListView.swift +++ b/Worksouts Watch App/Views/ActiveWorkoutListView.swift @@ -147,56 +147,45 @@ struct WorkoutLogDetailView: View { let log: WorkoutLog var body: some View { - VStack(spacing: 16) { - Text(log.exerciseName) - .font(.headline) - - VStack(alignment: .leading, spacing: 8) { - HStack { - Text("Sets:") - .foregroundStyle(.secondary) - Spacer() - Text("\(log.sets)") - } - - HStack { - Text("Reps:") - .foregroundStyle(.secondary) - Spacer() - Text("\(log.reps)") - } - - HStack { - Text("Weight:") - .foregroundStyle(.secondary) - Spacer() - Text("\(log.weight)") - } - - HStack { - Text("Status:") - .foregroundStyle(.secondary) - Spacer() - Text(log.status?.name ?? "Not Started") - .foregroundStyle(statusColor(for: log.status)) - } - } - .padding() - .background(Color.secondary.opacity(0.1)) - .cornerRadius(10) - + NavigationLink { ExerciseProgressControlView(log: log) } label: { - Text("Start Exercise") - .frame(maxWidth: .infinity) + VStack(alignment: .center) { + Text(log.exerciseName) + .font(.title) + .lineLimit(1) // Ensures it stays on one line + .minimumScaleFactor(0.5) // Scales down to 50% if needed + .layoutPriority(1) // Prioritize this view in tight layouts + + HStack (alignment: .bottom) { + Text("\(log.weight)") + Text( "lbs") + .fontWeight(.light) + .padding([.trailing], 10) + + Text("\(log.sets)") + Text("×") + .fontWeight(.light) + Text("\(log.reps)") + // Text("\(log.weight) lbs × \(log.sets) × \(log.reps)") + } + .font(.title3) + .lineLimit(1) // Ensures it stays on one line + .minimumScaleFactor(0.5) // Scales down to 50% if needed + .layoutPriority(1) // Prioritize this view in tight layouts + + Text(log.status?.name ?? "Not Started") + .foregroundStyle(Color.accentColor) + + Text("Tap to start") + .foregroundStyle(Color.accentColor) + + } + .padding() + } - .buttonStyle(.borderedProminent) - .tint(.accentColor) - - Spacer() - } - .padding() + .buttonStyle(.plain) } private func statusColor(for status: WorkoutStatus?) -> Color {