Add mock samples tab
This commit is contained in:
@@ -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)
|
||||
|
@@ -67,7 +67,7 @@ extension HKWorkoutActivityType {
|
||||
case .mixedMetabolicCardioTraining:
|
||||
return .figureMixedCardio
|
||||
case .paddleSports:
|
||||
return .heart
|
||||
return .oar2Crossed
|
||||
case .play:
|
||||
return .figurePlay
|
||||
case .preparationAndRecovery:
|
||||
|
35
HealthImport/Tabs/SamplesTab.swift
Normal file
35
HealthImport/Tabs/SamplesTab.swift
Normal 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)
|
||||
}
|
@@ -67,6 +67,7 @@ struct WorkoutDetailView: View {
|
||||
if isProcessingWorkout {
|
||||
ProgressView()
|
||||
.progressViewStyle(.circular)
|
||||
.padding(.trailing, 10)
|
||||
Text("Adding workout to health...")
|
||||
.foregroundStyle(.accent)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user