diff --git a/Workouts/Views/Progress/ProgressTabView.swift b/Workouts/Views/Progress/ProgressTabView.swift index ab0cf43..02b6325 100644 --- a/Workouts/Views/Progress/ProgressTabView.swift +++ b/Workouts/Views/Progress/ProgressTabView.swift @@ -26,6 +26,29 @@ struct ProgressTabView: View { @Query(sort: \Workout.start, order: .reverse) private var workouts: [Workout] + /// Motivational openers for the tab title — each reads as a phrase completed + /// by "Progress" ("See Your Progress"), mirroring the Today board's rotating + /// greeting. One per day, rotating by day-of-era: stable all day, fresh the next. + private static let greetings: [String] = [ + "See Your", + "Own Your", + "Earn Your", + "Trust Your", + "Watch Your", + "Feel the", + "Proof of", + "Chase", + "Celebrate", + "Measure Your", + "Honor Your", + "Fuel Your", + ] + + private var greetingLine: String { + let day = Calendar.current.ordinality(of: .day, in: .era, for: Date()) ?? 0 + return Self.greetings[day % Self.greetings.count] + } + var body: some View { NavigationStack { ScrollView { @@ -57,7 +80,7 @@ struct ProgressTabView: View { } .defaultScrollAnchor(initialAnchor) .background(Color(.systemGroupedBackground)) - .navigationTitle("Progress") + .navigationTitle("\(greetingLine) Progress") } }