add WorkoutIconSelector, change the way adding ExerciseTemplate works to in-List
This commit is contained in:
@@ -15,7 +15,7 @@ struct WorkoutLibrary: View {
|
||||
@State private var newWorkout: Workout?
|
||||
|
||||
var body: some View {
|
||||
NavigationSplitView {
|
||||
NavigationView {
|
||||
Group {
|
||||
if !workouts.isEmpty {
|
||||
List {
|
||||
@@ -27,6 +27,9 @@ struct WorkoutLibrary: View {
|
||||
}
|
||||
}
|
||||
.onDelete(perform: deleteWorkout)
|
||||
Button(action: addWorkout) {
|
||||
Label("Add Workout", systemImage: "plus")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ContentUnavailableView {
|
||||
@@ -34,16 +37,11 @@ struct WorkoutLibrary: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationBarTitle("Workout Templates")
|
||||
.navigationBarTitle("Workouts")
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .topBarLeading) {
|
||||
ToolbarItem() {
|
||||
EditButton()
|
||||
}
|
||||
ToolbarItem {
|
||||
Button(action: addWorkout) {
|
||||
Label("Add Workout", systemImage: "plus")
|
||||
}
|
||||
}
|
||||
}
|
||||
.sheet(item: $newWorkout) { workout in
|
||||
NavigationStack {
|
||||
@@ -52,10 +50,6 @@ struct WorkoutLibrary: View {
|
||||
.presentationDetents([.medium])
|
||||
.interactiveDismissDisabled()
|
||||
}
|
||||
} detail: {
|
||||
// TODO: What does this Detail do?
|
||||
Text("Select a workout")
|
||||
.navigationTitle("Movie")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user