Starting a workout — from the split picker or a split's exercise list — now drops straight into its log screen once the cache catches up, via a shared StartedWorkoutNavigator. Adds VoiceOver labels/values to the log checkboxes and the settings button, a color-independent numbered legend and spoken summary to the heart-rate-zone bar, and Dynamic Type scaling to the run-flow badges and timer. Claude-Session: https://claude.ai/code/session_01HJDQQDA9QdP8zByg43H5v3
63 lines
1.9 KiB
Swift
63 lines
1.9 KiB
Swift
//
|
|
// CalendarListItem.swift
|
|
// Workouts
|
|
//
|
|
// Created by rzen on 7/18/25 at 8:44 AM.
|
|
//
|
|
// Copyright 2025 Rouslan Zenetl. All Rights Reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct CalendarListItem: View {
|
|
var date: Date
|
|
var title: String
|
|
var subtitle: String?
|
|
var subtitle2: String?
|
|
var count: Int?
|
|
|
|
var body: some View {
|
|
HStack(alignment: .top) {
|
|
ZStack {
|
|
VStack {
|
|
Text(date.abbreviatedWeekday)
|
|
.font(.caption)
|
|
.foregroundColor(.secondary)
|
|
Text("\(date.dayOfMonth)")
|
|
.font(.headline)
|
|
.foregroundColor(.accentColor)
|
|
Text(date.abbreviatedMonth)
|
|
.font(.caption)
|
|
.foregroundColor(.secondary)
|
|
}
|
|
.padding([.trailing], 10)
|
|
}
|
|
// Read the date as one phrase instead of three disjoint "Mon" / "14" / "Jul" stops.
|
|
.accessibilityElement(children: .ignore)
|
|
.accessibilityLabel(date.formatted(date: .complete, time: .omitted))
|
|
HStack(alignment: .top) {
|
|
VStack(alignment: .leading) {
|
|
Text(title)
|
|
.font(.headline)
|
|
if let subtitle = subtitle {
|
|
Text(subtitle)
|
|
.font(.footnote)
|
|
}
|
|
if let subtitle2 = subtitle2 {
|
|
Text(subtitle2)
|
|
.font(.footnote)
|
|
}
|
|
}
|
|
if let count = count {
|
|
Spacer()
|
|
Text("\(count)")
|
|
.font(.caption)
|
|
.foregroundColor(.gray)
|
|
}
|
|
}
|
|
}
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.contentShape(Rectangle())
|
|
}
|
|
}
|