Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
e64bbf57e1
commit
7f45041b52
@ -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!" : {
|
||||
"comment" : "Tip suggesting that a week of activity indicates strong commitment to habits.",
|
||||
"isCommentAutoGenerated" : true
|
||||
@ -412,10 +408,6 @@
|
||||
},
|
||||
"Arc History" : {
|
||||
|
||||
},
|
||||
"Balanced daily check-ins" : {
|
||||
"comment" : "Description of what the \"Steady\" focus style means for the user.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"Before 11am" : {
|
||||
"comment" : "Time range description for the \"Morning\" time of day.",
|
||||
@ -577,6 +569,7 @@
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"Choose the intensity of your arc" : {
|
||||
"extractionState" : "stale",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
@ -1204,6 +1197,7 @@
|
||||
}
|
||||
},
|
||||
"Focus style" : {
|
||||
"extractionState" : "stale",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
@ -1225,10 +1219,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Focused approach with more accountability" : {
|
||||
"comment" : "Description of the \"Intense\" focus style.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"Four-week arc in progress" : {
|
||||
"extractionState" : "stale",
|
||||
"localizations" : {
|
||||
@ -1319,6 +1309,7 @@
|
||||
}
|
||||
},
|
||||
"Gentle" : {
|
||||
"extractionState" : "stale",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
@ -1568,6 +1559,7 @@
|
||||
}
|
||||
},
|
||||
"Intense" : {
|
||||
"extractionState" : "stale",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
@ -2512,6 +2504,7 @@
|
||||
}
|
||||
},
|
||||
"Steady" : {
|
||||
"extractionState" : "stale",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
|
||||
@ -10,10 +10,10 @@ struct AppSettingsData: PersistableData {
|
||||
var reminderMinute: Int = 0
|
||||
var hapticsEnabled: Bool = true
|
||||
var soundEnabled: Bool = true
|
||||
var ritualLengthDays: Int = 28
|
||||
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.
|
||||
var reminderTimeComponents: DateComponents {
|
||||
|
||||
@ -497,6 +497,7 @@ final class RitualStore: RitualStoreProviding {
|
||||
}
|
||||
|
||||
func createQuickRitual() {
|
||||
let defaultDuration = 28
|
||||
let habits = [
|
||||
ArcHabit(title: String(localized: "Hydrate"), symbolName: "drop.fill"),
|
||||
ArcHabit(title: String(localized: "Move"), symbolName: "figure.walk"),
|
||||
@ -504,7 +505,7 @@ final class RitualStore: RitualStoreProviding {
|
||||
]
|
||||
let arc = RitualArc(
|
||||
startDate: Date(),
|
||||
durationDays: Int(settingsStore.ritualLengthDays),
|
||||
durationDays: defaultDuration,
|
||||
arcNumber: 1,
|
||||
isActive: true,
|
||||
habits: habits
|
||||
@ -512,7 +513,7 @@ final class RitualStore: RitualStoreProviding {
|
||||
let ritual = Ritual(
|
||||
title: String(localized: "Custom Ritual"),
|
||||
theme: String(localized: "Your next chapter"),
|
||||
defaultDurationDays: Int(settingsStore.ritualLengthDays),
|
||||
defaultDurationDays: defaultDuration,
|
||||
notes: String(localized: "A fresh ritual created from your focus today."),
|
||||
arcs: [arc]
|
||||
)
|
||||
|
||||
@ -64,11 +64,6 @@ final class SettingsStore: CloudSyncable {
|
||||
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 iCloudEnabled: Bool {
|
||||
|
||||
@ -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(
|
||||
title: String(localized: "iCloud Sync"),
|
||||
systemImage: "icloud",
|
||||
|
||||
@ -18,10 +18,4 @@ enum AppMetrics {
|
||||
static let yOffsetLarge: CGFloat = 10
|
||||
static let xOffsetNone: CGFloat = 0
|
||||
}
|
||||
|
||||
enum RitualLength {
|
||||
static let minimumDays: Double = 14
|
||||
static let maximumDays: Double = 42
|
||||
static let stepDays: Double = 7
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +67,6 @@ Rituals is a paid, offline-first habit tracker built around customizable "ritual
|
||||
### Settings Tab
|
||||
- Daily reminder notifications with time picker
|
||||
- Haptics and sound toggles (wired to habit check-ins)
|
||||
- Ritual length default setting
|
||||
- iCloud settings sync
|
||||
- Pro upgrade placeholder
|
||||
- Debug tools: reset onboarding, app icon generation, branding preview
|
||||
|
||||
Loading…
Reference in New Issue
Block a user