retain order of the exercises during persistence process
This commit is contained in:
@@ -13,83 +13,7 @@ struct ContentView: View {
|
||||
|
||||
var body: some View {
|
||||
TabView {
|
||||
NavigationView() {
|
||||
List() {
|
||||
NavigationLink(destination: Text("WorkoutLogDetails")) {
|
||||
HStack(alignment: .top) {
|
||||
Image(systemName: "figure.run")
|
||||
.padding(.trailing)
|
||||
.padding(.top)
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Text("23.01.1988")
|
||||
Text("14:37 Uhr")
|
||||
Spacer()
|
||||
}
|
||||
Text("Marathon")
|
||||
.fontWeight(.semibold)
|
||||
HStack {
|
||||
Text("34 km/42 km")
|
||||
Text("•")
|
||||
Text("5:12 min/km")
|
||||
}.foregroundStyle(.gray)
|
||||
HStack {
|
||||
Text("1 h")
|
||||
Text("•")
|
||||
Text("1.337 kcal")
|
||||
}
|
||||
.foregroundStyle(.gray)
|
||||
}
|
||||
}
|
||||
}
|
||||
NavigationLink(destination: Text("WorkoutLogDetails")) {
|
||||
HStack {
|
||||
Image(systemName: "figure.run")
|
||||
.padding(.trailing)
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Text("23.01.1988")
|
||||
Text("14:37 Uhr")
|
||||
Spacer()
|
||||
|
||||
}
|
||||
Text("Recommended Routine")
|
||||
.fontWeight(.semibold)
|
||||
HStack {
|
||||
Text("6/12 sets")
|
||||
Text("•")
|
||||
Text("50 %")
|
||||
}.foregroundStyle(.gray)
|
||||
HStack {
|
||||
Text("57 m")
|
||||
Text("•")
|
||||
Text("357 kcal")
|
||||
}
|
||||
.foregroundStyle(.gray)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.listStyle(.plain)
|
||||
.navigationBarTitle("Workout Logs")
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .topBarLeading) {
|
||||
EditButton()
|
||||
}
|
||||
ToolbarItem(placement: .topBarLeading) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.tabItem {
|
||||
Image(systemName: "pencil.and.list.clipboard")
|
||||
Text("Log")
|
||||
}
|
||||
Text("Training Plans")
|
||||
.tabItem {
|
||||
Image(systemName: "calendar.badge.clock")
|
||||
Text("Plans & Goals")
|
||||
}
|
||||
WorkoutLog()
|
||||
WorkoutLibrary()
|
||||
.tabItem {
|
||||
Image(systemName: "figure.run.square.stack")
|
||||
@@ -100,11 +24,16 @@ struct ContentView: View {
|
||||
Image(systemName: "figure.run")
|
||||
Text("Exercises")
|
||||
}
|
||||
// Text("Settings")
|
||||
// .tabItem {
|
||||
// Image(systemName: "gear")
|
||||
// Text("Settings")
|
||||
// }
|
||||
DebugExerciseList()
|
||||
.tabItem {
|
||||
Image(systemName: "hammer")
|
||||
Text("Debug")
|
||||
}
|
||||
Settings()
|
||||
.tabItem {
|
||||
Image(systemName: "gear")
|
||||
Text("Settings")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user