Files
workouts/Workouts/Views/Common/CheckboxStatus.swift
T
rzen 21ee05053e Make the brand purple the accent color and exercise Done check
Populate the previously-empty AccentColor asset (iOS + watch) with the
logo purple — a deep shade in light mode, brightened for dark mode and
the watch's black background. The exercise Done check now uses that
accent color and the in-progress indicator reads as a neutral gray, on
both iPhone and Apple Watch.
2026-06-20 17:48:05 -04:00

49 lines
981 B
Swift

//
// CheckboxStatus.swift
// Workouts
//
// Created by rzen on 7/20/25 at 11:07 AM.
//
// Copyright 2025 Rouslan Zenetl. All Rights Reserved.
//
import SwiftUI
enum CheckboxStatus {
case checked
case unchecked
case intermediate
case cancelled
var color: Color {
switch self {
case .checked: .accentColor
case .unchecked: .gray
case .intermediate: .gray
case .cancelled: .red
}
}
var systemName: String {
switch self {
case .checked: "checkmark.circle.fill"
case .unchecked: "circle"
case .intermediate: "ellipsis.circle"
case .cancelled: "xmark.circle"
}
}
}
// MARK: - WorkoutStatus Extension
extension WorkoutStatus {
var checkboxStatus: CheckboxStatus {
switch self {
case .notStarted: .unchecked
case .inProgress: .intermediate
case .completed: .checked
case .skipped: .cancelled
}
}
}