wip
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user