add ExerciseEditor, Picker skeletons, AutocompleteTextfield
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// ActiveWorkoutSessionListItem.swift
|
||||
// WorkoutsPlus
|
||||
//
|
||||
// Created by Felix Förtsch on 19.09.24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ActiveWorkoutSessionListItem: View {
|
||||
var workoutItem: WorkoutItem
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
switch workoutItem.workoutItemType {
|
||||
case .set:
|
||||
Text(workoutItem.name)
|
||||
case .workout:
|
||||
Text(workoutItem.name)
|
||||
case .exerciseWithReps:
|
||||
Text(workoutItem.name)
|
||||
Spacer()
|
||||
Button(action: {
|
||||
// TODO: Implement a sheet view; don't use ExerciseDetail since its purpose is editing
|
||||
}) {
|
||||
Image(systemName: "info.circle")
|
||||
.foregroundColor(.blue)
|
||||
}
|
||||
case .exerciseWithDuration:
|
||||
Text(workoutItem.name)
|
||||
Spacer()
|
||||
Button(action: {
|
||||
// TODO: Implement a sheet view; don't use ExerciseDetail since its purpose is editing
|
||||
}) {
|
||||
Image(systemName: "info.circle")
|
||||
.foregroundColor(.blue)
|
||||
}
|
||||
case .rest:
|
||||
Text("Pause")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
List {
|
||||
ForEach(WorkoutItem.sampleDataRecommendedRoutine) { item in
|
||||
ActiveWorkoutSessionListItem(workoutItem: item)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user