Restructure into a three-tab app with Progress, goals, and Meditation
The UX redesign's first landing (spec in UX-REDESIGN.md): ContentView becomes a Today / Progress / Settings TabView, "Routine" replaces "Split" in every user-facing string and view name (code-level types keep their names), and workout starting moves to shared WorkoutStarter / StartedWorkoutNavigator plumbing. - New Progress tab: weekly goal streaks, workout trends, per-exercise weight progression, achievements, and the full history list (WorkoutLogsView -> WorkoutHistoryView). - Goals: stable categories workouts roll up to, managed from Settings. - New Meditation exercise + starter routine; timed sits record to Apple Health as Mind & Body sessions. Claude-Session: https://claude.ai/code/session_012qw2itfzKyEJ1HpsFt8Ex4
This commit is contained in:
+24
-14
@@ -11,20 +11,30 @@ struct ContentView: View {
|
||||
@Environment(LiveRunState.self) private var liveRun
|
||||
|
||||
var body: some View {
|
||||
WorkoutLogsView()
|
||||
// Prop the phone up and it runs the live Apple Watch workout — two-way: drive from
|
||||
// either device and the other follows.
|
||||
.fullScreenCover(isPresented: Binding(
|
||||
get: { liveRun.presentable != nil },
|
||||
set: { presenting in if !presenting { liveRun.mute() } }
|
||||
)) {
|
||||
if let frame = liveRun.presentable {
|
||||
// Re-key on the followed log so a flow-mode auto-advance (the driver
|
||||
// moving to the next exercise) rebuilds the mirror for the new exercise
|
||||
// instead of leaving a stale one pinned to the previous log.
|
||||
LiveRunCoverView(frame: frame) { liveRun.mute() }
|
||||
.id(frame.logID)
|
||||
}
|
||||
TabView {
|
||||
Tab("Today", systemImage: "sun.max.fill") {
|
||||
TodayView()
|
||||
}
|
||||
Tab("Progress", systemImage: "chart.line.uptrend.xyaxis") {
|
||||
ProgressTabView()
|
||||
}
|
||||
Tab("Settings", systemImage: "gearshape.2") {
|
||||
SettingsView()
|
||||
}
|
||||
}
|
||||
// Prop the phone up and it runs the live Apple Watch workout — two-way: drive from
|
||||
// either device and the other follows.
|
||||
.fullScreenCover(isPresented: Binding(
|
||||
get: { liveRun.presentable != nil },
|
||||
set: { presenting in if !presenting { liveRun.mute() } }
|
||||
)) {
|
||||
if let frame = liveRun.presentable {
|
||||
// Re-key on the followed log so a flow-mode auto-advance (the driver
|
||||
// moving to the next exercise) rebuilds the mirror for the new exercise
|
||||
// instead of leaving a stale one pinned to the previous log.
|
||||
LiveRunCoverView(frame: frame) { liveRun.mute() }
|
||||
.id(frame.logID)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user