21ee05053e
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.
49 lines
981 B
Swift
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
|
|
}
|
|
}
|
|
}
|