|
|
|
|
@ -13,12 +13,14 @@ enum PresetSection: Int, Identifiable, CaseIterable { |
|
|
|
|
case workout |
|
|
|
|
case chill |
|
|
|
|
case cooking |
|
|
|
|
case other |
|
|
|
|
|
|
|
|
|
var presets: [Preset] { |
|
|
|
|
switch self { |
|
|
|
|
case .cooking: return [.softBoiled, .mediumBoiledEggs, .hardBoiledEggs] |
|
|
|
|
case .workout: return [.runningSplits] |
|
|
|
|
case .chill: return [.nap, .meditation] |
|
|
|
|
case .other: return [.toothbrushing] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -27,11 +29,11 @@ enum PresetSection: Int, Identifiable, CaseIterable { |
|
|
|
|
case .cooking: return NSLocalizedString("Cooking", comment: "") |
|
|
|
|
case .workout: return NSLocalizedString("Workout", comment: "") |
|
|
|
|
case .chill: return NSLocalizedString("Chill", comment: "") |
|
|
|
|
case .other: return NSLocalizedString("Other", comment: "") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct CountdownIntervalGroup { |
|
|
|
|
var repeatCount: Int |
|
|
|
|
var intervals: [CountdownInterval] |
|
|
|
|
@ -51,6 +53,7 @@ enum Preset: Int, Identifiable, CaseIterable { |
|
|
|
|
case meditation |
|
|
|
|
case nap |
|
|
|
|
case runningSplits |
|
|
|
|
case toothbrushing |
|
|
|
|
|
|
|
|
|
var localizedName: String { |
|
|
|
|
switch self { |
|
|
|
|
@ -60,6 +63,7 @@ enum Preset: Int, Identifiable, CaseIterable { |
|
|
|
|
case .meditation: return NSLocalizedString("Meditation", comment: "") |
|
|
|
|
case .nap: return NSLocalizedString("Nap", comment: "") |
|
|
|
|
case .runningSplits: return NSLocalizedString("Running splits", comment: "") |
|
|
|
|
case .toothbrushing: return NSLocalizedString("Toothbrushing", comment: "") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -81,7 +85,8 @@ enum Preset: Int, Identifiable, CaseIterable { |
|
|
|
|
case .hardBoiledEggs: return 10 * 60 |
|
|
|
|
case .meditation: return 15 * 60 |
|
|
|
|
case .nap: return 20 * 60 |
|
|
|
|
case .runningSplits: return 13 |
|
|
|
|
case .runningSplits: return 0.0 |
|
|
|
|
case .toothbrushing: return 2 * 60.0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -109,6 +114,7 @@ enum Preset: Int, Identifiable, CaseIterable { |
|
|
|
|
case .meditation: return [] |
|
|
|
|
case .nap: return [] |
|
|
|
|
case .runningSplits: return [] |
|
|
|
|
case .toothbrushing: return [] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|