Add mock samples tab

This commit is contained in:
Christoph Hagen
2024-03-19 14:44:49 +01:00
parent a2228d63b2
commit 21d57ecab1
5 changed files with 46 additions and 1 deletions

View File

@@ -56,6 +56,9 @@ struct HealthImportApp: App {
.environmentObject(database)
.tabItem { Label("Workouts", systemSymbol: .figureRun) }
.tag(TabSelection.workouts)
SamplesTab(database: database)
.tabItem { Label("Health", systemSymbol: .heartFill) }
.tag(TabSelection.samples)
DatabasesTab(database: database, databases: databaseList)
.tabItem {Label("Databases", systemSymbol: .archivebox) }
.tag(TabSelection.databases)

View File

@@ -67,7 +67,7 @@ extension HKWorkoutActivityType {
case .mixedMetabolicCardioTraining:
return .figureMixedCardio
case .paddleSports:
return .heart
return .oar2Crossed
case .play:
return .figurePlay
case .preparationAndRecovery:

View File

@@ -0,0 +1,35 @@
import SwiftUI
struct SamplesTab: View {
@ObservedObject
var database: Database
var body: some View {
NavigationStack {
List {
Label("Activity", systemSymbol: .flame)
Label("Body Measurements", systemSymbol: .figure)
Label("Cycle Tracking", systemSymbol: .circleHexagonpath)
Label("Hearing", systemSymbol: .ear)
Label("Heart", systemSymbol: .heartFill)
Label("Medications", systemSymbol: .pills)
Label("Mental Wellbeing", systemSymbol: .brainHeadProfile)
Label("Mobility", systemSymbol: .arrowLeftAndRight)
Label("Nutrition", systemSymbol: .carrot)
Label("Respiratory", systemSymbol: .lungs)
Label("Sleep", systemSymbol: .bedDouble)
Label("Symptoms", systemSymbol: .listBulletClipboard)
Label("Vitals", systemSymbol: .waveformPathEcgRectangle)
Label("Other Data", systemSymbol: .cross)
}
.navigationTitle("Health")
}
}
}
#Preview {
SamplesTab(database: Database())
.preferredColorScheme(.dark)
}

View File

@@ -67,6 +67,7 @@ struct WorkoutDetailView: View {
if isProcessingWorkout {
ProgressView()
.progressViewStyle(.circular)
.padding(.trailing, 10)
Text("Adding workout to health...")
.foregroundStyle(.accent)
} else {