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 SwiftUI
|
||||||
|
import SwiftData
|
||||||
import IndieAbout
|
import IndieAbout
|
||||||
|
|
||||||
struct SettingsView: View {
|
struct SettingsView: View {
|
||||||
@Environment(SyncEngine.self) private var sync
|
@Environment(SyncEngine.self) private var sync
|
||||||
@Environment(AppServices.self) private var services
|
@Environment(AppServices.self) private var services
|
||||||
|
|
||||||
|
@Query private var splits: [Split]
|
||||||
|
|
||||||
@AppStorage("restSeconds") private var restSeconds: Int = 45
|
@AppStorage("restSeconds") private var restSeconds: Int = 45
|
||||||
@AppStorage("doneCountdownSeconds") private var doneCountdownSeconds: Int = 5
|
@AppStorage("doneCountdownSeconds") private var doneCountdownSeconds: Int = 5
|
||||||
@AppStorage("weightUnit") private var weightUnit: WeightUnit = .lb
|
@AppStorage("weightUnit") private var weightUnit: WeightUnit = .lb
|
||||||
@@ -56,13 +59,23 @@ struct SettingsView: View {
|
|||||||
NavigationLink {
|
NavigationLink {
|
||||||
SplitListView()
|
SplitListView()
|
||||||
} label: {
|
} label: {
|
||||||
|
HStack {
|
||||||
Label("Splits", systemImage: "dumbbell.fill")
|
Label("Splits", systemImage: "dumbbell.fill")
|
||||||
|
Spacer()
|
||||||
|
Text("\(splits.count)")
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
ExerciseLibraryView()
|
ExerciseLibraryView()
|
||||||
} label: {
|
} label: {
|
||||||
|
HStack {
|
||||||
Label("Exercises", systemImage: "figure.strengthtraining.traditional")
|
Label("Exercises", systemImage: "figure.strengthtraining.traditional")
|
||||||
|
Spacer()
|
||||||
|
Text("\(ExerciseMotionLibrary.exerciseNames.count)")
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user