Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2026-01-25 23:21:49 -06:00
parent e64bbf57e1
commit 7f45041b52
7 changed files with 10 additions and 48 deletions

View File

@ -230,10 +230,6 @@
} }
} }
}, },
"A relaxed pace for building habits slowly" : {
"comment" : "Description of what \"Gentle\" focus style means for the user.",
"isCommentAutoGenerated" : true
},
"A week of activity shows commitment!" : { "A week of activity shows commitment!" : {
"comment" : "Tip suggesting that a week of activity indicates strong commitment to habits.", "comment" : "Tip suggesting that a week of activity indicates strong commitment to habits.",
"isCommentAutoGenerated" : true "isCommentAutoGenerated" : true
@ -412,10 +408,6 @@
}, },
"Arc History" : { "Arc History" : {
},
"Balanced daily check-ins" : {
"comment" : "Description of what the \"Steady\" focus style means for the user.",
"isCommentAutoGenerated" : true
}, },
"Before 11am" : { "Before 11am" : {
"comment" : "Time range description for the \"Morning\" time of day.", "comment" : "Time range description for the \"Morning\" time of day.",
@ -577,6 +569,7 @@
"isCommentAutoGenerated" : true "isCommentAutoGenerated" : true
}, },
"Choose the intensity of your arc" : { "Choose the intensity of your arc" : {
"extractionState" : "stale",
"localizations" : { "localizations" : {
"en" : { "en" : {
"stringUnit" : { "stringUnit" : {
@ -1204,6 +1197,7 @@
} }
}, },
"Focus style" : { "Focus style" : {
"extractionState" : "stale",
"localizations" : { "localizations" : {
"en" : { "en" : {
"stringUnit" : { "stringUnit" : {
@ -1225,10 +1219,6 @@
} }
} }
}, },
"Focused approach with more accountability" : {
"comment" : "Description of the \"Intense\" focus style.",
"isCommentAutoGenerated" : true
},
"Four-week arc in progress" : { "Four-week arc in progress" : {
"extractionState" : "stale", "extractionState" : "stale",
"localizations" : { "localizations" : {
@ -1319,6 +1309,7 @@
} }
}, },
"Gentle" : { "Gentle" : {
"extractionState" : "stale",
"localizations" : { "localizations" : {
"en" : { "en" : {
"stringUnit" : { "stringUnit" : {
@ -1568,6 +1559,7 @@
} }
}, },
"Intense" : { "Intense" : {
"extractionState" : "stale",
"localizations" : { "localizations" : {
"en" : { "en" : {
"stringUnit" : { "stringUnit" : {
@ -2512,6 +2504,7 @@
} }
}, },
"Steady" : { "Steady" : {
"extractionState" : "stale",
"localizations" : { "localizations" : {
"en" : { "en" : {
"stringUnit" : { "stringUnit" : {

View File

@ -10,10 +10,10 @@ struct AppSettingsData: PersistableData {
var reminderMinute: Int = 0 var reminderMinute: Int = 0
var hapticsEnabled: Bool = true var hapticsEnabled: Bool = true
var soundEnabled: Bool = true var soundEnabled: Bool = true
var ritualLengthDays: Int = 28
var lastModified: Date = .now var lastModified: Date = .now
var syncPriority: Int { ritualLengthDays } /// Sync priority based on reminder settings - higher values win conflicts
var syncPriority: Int { remindersEnabled ? reminderHour : 0 }
/// Returns the reminder time as DateComponents for scheduling. /// Returns the reminder time as DateComponents for scheduling.
var reminderTimeComponents: DateComponents { var reminderTimeComponents: DateComponents {

View File

@ -497,6 +497,7 @@ final class RitualStore: RitualStoreProviding {
} }
func createQuickRitual() { func createQuickRitual() {
let defaultDuration = 28
let habits = [ let habits = [
ArcHabit(title: String(localized: "Hydrate"), symbolName: "drop.fill"), ArcHabit(title: String(localized: "Hydrate"), symbolName: "drop.fill"),
ArcHabit(title: String(localized: "Move"), symbolName: "figure.walk"), ArcHabit(title: String(localized: "Move"), symbolName: "figure.walk"),
@ -504,7 +505,7 @@ final class RitualStore: RitualStoreProviding {
] ]
let arc = RitualArc( let arc = RitualArc(
startDate: Date(), startDate: Date(),
durationDays: Int(settingsStore.ritualLengthDays), durationDays: defaultDuration,
arcNumber: 1, arcNumber: 1,
isActive: true, isActive: true,
habits: habits habits: habits
@ -512,7 +513,7 @@ final class RitualStore: RitualStoreProviding {
let ritual = Ritual( let ritual = Ritual(
title: String(localized: "Custom Ritual"), title: String(localized: "Custom Ritual"),
theme: String(localized: "Your next chapter"), theme: String(localized: "Your next chapter"),
defaultDurationDays: Int(settingsStore.ritualLengthDays), defaultDurationDays: defaultDuration,
notes: String(localized: "A fresh ritual created from your focus today."), notes: String(localized: "A fresh ritual created from your focus today."),
arcs: [arc] arcs: [arc]
) )

View File

@ -64,11 +64,6 @@ final class SettingsStore: CloudSyncable {
set { update { $0.soundEnabled = newValue } } set { update { $0.soundEnabled = newValue } }
} }
var ritualLengthDays: Double {
get { Double(cloudSync.data.ritualLengthDays) }
set { update { $0.ritualLengthDays = Int(newValue) } }
}
var iCloudAvailable: Bool { cloudSync.iCloudAvailable } var iCloudAvailable: Bool { cloudSync.iCloudAvailable }
var iCloudEnabled: Bool { var iCloudEnabled: Bool {

View File

@ -70,26 +70,6 @@ struct SettingsView: View {
} }
} }
SettingsSectionHeader(
title: String(localized: "Ritual pacing"),
systemImage: "timer",
accentColor: AppAccent.primary
)
SettingsCard(backgroundColor: AppSurface.card, borderColor: AppBorder.subtle) {
SettingsSlider(
title: String(localized: "Ritual length"),
subtitle: String(localized: "Adjust arc duration"),
value: $store.ritualLengthDays,
in: AppMetrics.RitualLength.minimumDays...AppMetrics.RitualLength.maximumDays,
step: AppMetrics.RitualLength.stepDays,
format: SliderFormat.integer(unit: String(localized: "days")),
accentColor: AppAccent.primary,
leadingIcon: Image(systemName: "calendar"),
trailingIcon: Image(systemName: "calendar.circle.fill")
)
}
SettingsSectionHeader( SettingsSectionHeader(
title: String(localized: "iCloud Sync"), title: String(localized: "iCloud Sync"),
systemImage: "icloud", systemImage: "icloud",

View File

@ -18,10 +18,4 @@ enum AppMetrics {
static let yOffsetLarge: CGFloat = 10 static let yOffsetLarge: CGFloat = 10
static let xOffsetNone: CGFloat = 0 static let xOffsetNone: CGFloat = 0
} }
enum RitualLength {
static let minimumDays: Double = 14
static let maximumDays: Double = 42
static let stepDays: Double = 7
}
} }

View File

@ -67,7 +67,6 @@ Rituals is a paid, offline-first habit tracker built around customizable "ritual
### Settings Tab ### Settings Tab
- Daily reminder notifications with time picker - Daily reminder notifications with time picker
- Haptics and sound toggles (wired to habit check-ins) - Haptics and sound toggles (wired to habit check-ins)
- Ritual length default setting
- iCloud settings sync - iCloud settings sync
- Pro upgrade placeholder - Pro upgrade placeholder
- Debug tools: reset onboarding, app icon generation, branding preview - Debug tools: reset onboarding, app icon generation, branding preview