Show split and exercise counts in Settings library rows
Claude-Session: https://claude.ai/code/session_01P152LxjZ4vePHsSorQa5Jf
This commit is contained in:
@@ -6,12 +6,15 @@
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import SwiftData
|
||||
import IndieAbout
|
||||
|
||||
struct SettingsView: View {
|
||||
@Environment(SyncEngine.self) private var sync
|
||||
@Environment(AppServices.self) private var services
|
||||
|
||||
@Query private var splits: [Split]
|
||||
|
||||
@AppStorage("restSeconds") private var restSeconds: Int = 45
|
||||
@AppStorage("doneCountdownSeconds") private var doneCountdownSeconds: Int = 5
|
||||
@AppStorage("weightUnit") private var weightUnit: WeightUnit = .lb
|
||||
@@ -56,13 +59,23 @@ struct SettingsView: View {
|
||||
NavigationLink {
|
||||
SplitListView()
|
||||
} label: {
|
||||
Label("Splits", systemImage: "dumbbell.fill")
|
||||
HStack {
|
||||
Label("Splits", systemImage: "dumbbell.fill")
|
||||
Spacer()
|
||||
Text("\(splits.count)")
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
|
||||
NavigationLink {
|
||||
ExerciseLibraryView()
|
||||
} label: {
|
||||
Label("Exercises", systemImage: "figure.strengthtraining.traditional")
|
||||
HStack {
|
||||
Label("Exercises", systemImage: "figure.strengthtraining.traditional")
|
||||
Spacer()
|
||||
Text("\(ExerciseMotionLibrary.exerciseNames.count)")
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user