fix repetitive save of WorkoutItem, add: Onboarding, Defaults, Settings, Trainer/Trainee skeletons, reorder files, remove all Bindable

This commit is contained in:
Felix Förtsch
2024-09-04 18:44:28 +02:00
parent 0905ea7d3f
commit d82d0cd9fa
25 changed files with 426 additions and 134 deletions
+93
View File
@@ -0,0 +1,93 @@
//
// WorkoutLog.swift
// WorkoutsPlus
//
// Created by Felix Förtsch on 30.08.24.
//
import SwiftUI
struct WorkoutLog: View {
var body: some View {
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")
}
}
}
#Preview {
WorkoutLog()
}