wip
This commit is contained in:
@ -147,56 +147,45 @@ struct WorkoutLogDetailView: View {
|
|||||||
let log: WorkoutLog
|
let log: WorkoutLog
|
||||||
|
|
||||||
var body: some View {
|
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 {
|
NavigationLink {
|
||||||
ExerciseProgressControlView(log: log)
|
ExerciseProgressControlView(log: log)
|
||||||
} label: {
|
} label: {
|
||||||
Text("Start Exercise")
|
VStack(alignment: .center) {
|
||||||
.frame(maxWidth: .infinity)
|
Text(log.exerciseName)
|
||||||
}
|
.font(.title)
|
||||||
.buttonStyle(.borderedProminent)
|
.lineLimit(1) // Ensures it stays on one line
|
||||||
.tint(.accentColor)
|
.minimumScaleFactor(0.5) // Scales down to 50% if needed
|
||||||
|
.layoutPriority(1) // Prioritize this view in tight layouts
|
||||||
|
|
||||||
Spacer()
|
HStack (alignment: .bottom) {
|
||||||
}
|
Text("\(log.weight)")
|
||||||
.padding()
|
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(.plain)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func statusColor(for status: WorkoutStatus?) -> Color {
|
private func statusColor(for status: WorkoutStatus?) -> Color {
|
||||||
|
Reference in New Issue
Block a user