fix: target dependancies

This commit is contained in:
Michael Freno
2026-01-13 16:00:33 -05:00
parent c357e02369
commit 3eac9a2767
2 changed files with 119 additions and 113 deletions

View File

@@ -42,10 +42,13 @@ struct GeneralSetupView: View {
.foregroundColor(.secondary)
}
Spacer()
Toggle("", isOn: Binding(
Toggle(
"",
isOn: Binding(
get: { settingsManager.settings.launchAtLogin },
set: { settingsManager.settings.launchAtLogin = $0 }
))
)
)
.labelsHidden()
.onChange(of: settingsManager.settings.launchAtLogin) { isEnabled in
applyLaunchAtLoginSetting(enabled: isEnabled)
@@ -119,10 +122,12 @@ struct GeneralSetupView: View {
Text(size.displayName)
.font(.caption)
.fontWeight(
settingsManager.settings.subtleReminderSize == size ? .semibold : .regular
settingsManager.settings.subtleReminderSize == size
? .semibold : .regular
)
.foregroundColor(
settingsManager.settings.subtleReminderSize == size ? .primary : .secondary)
settingsManager.settings.subtleReminderSize == size
? .primary : .secondary)
}
.frame(maxWidth: .infinity, minHeight: 60)
.padding(.vertical, 12)
@@ -139,7 +144,7 @@ struct GeneralSetupView: View {
.padding()
.glassEffectIfAvailable(GlassStyle.regular, in: .rect(cornerRadius: 12))
// Links Section
#if !APPSTORE
VStack(spacing: 12) {
Text("Support & Contribute")
.font(.headline)
@@ -174,7 +179,6 @@ struct GeneralSetupView: View {
.glassEffectIfAvailable(
GlassStyle.regular.interactive(), in: .rect(cornerRadius: 10))
#if !APPSTORE
Button(action: {
if let url = URL(string: "https://buymeacoffee.com/mikefreno") {
NSWorkspace.shared.open(url)
@@ -205,9 +209,9 @@ struct GeneralSetupView: View {
.glassEffectIfAvailable(
GlassStyle.regular.tint(.orange).interactive(),
in: .rect(cornerRadius: 10))
#endif
}
.padding()
#endif
}
}
Spacer()

View File

@@ -14,7 +14,6 @@ struct UserTimersView: View {
var body: some View {
VStack(spacing: 0) {
// Fixed header section
VStack(spacing: 16) {
Image(systemName: "clock.badge.checkmark")
.font(.system(size: 60))
@@ -25,7 +24,6 @@ struct UserTimersView: View {
.padding(.top, 20)
.padding(.bottom, 30)
// Vertically centered content
Spacer()
VStack(spacing: 30) {
Text("Create your own reminder schedules")
@@ -40,9 +38,11 @@ struct UserTimersView: View {
.foregroundColor(.white)
}
.padding()
.glassEffectIfAvailable(GlassStyle.regular.tint(.purple), in: .rect(cornerRadius: 8))
.glassEffectIfAvailable(
GlassStyle.regular.tint(.purple), in: .rect(cornerRadius: 8))
VStack(alignment: .leading, spacing: 12) {
#if APPSTORE
HStack {
Text("Active Timers (\(userTimers.count)/3)")
.font(.headline)
@@ -56,6 +56,7 @@ struct UserTimersView: View {
.buttonStyle(.borderedProminent)
}
}
#endif
if userTimers.isEmpty {
VStack(spacing: 12) {
@@ -156,7 +157,9 @@ struct UserTimerRow: View {
.font(.subheadline)
.fontWeight(.medium)
.lineLimit(1)
Text("\(timer.type.displayName)\(timer.timeOnScreenSeconds)s on screen • \(timer.intervalMinutes) min interval")
Text(
"\(timer.type.displayName)\(timer.timeOnScreenSeconds)s on screen • \(timer.intervalMinutes) min interval"
)
.font(.caption)
.foregroundColor(.secondary)
}
@@ -188,7 +191,8 @@ struct UserTimerRow: View {
}
Button("Cancel", role: .cancel) {}
} message: {
Text("Are you sure you want to delete this timer? This action cannot be undone.")
Text(
"Are you sure you want to delete this timer? This action cannot be undone.")
}
}
}
@@ -209,7 +213,7 @@ struct UserTimerEditSheet: View {
var onSave: (UserTimer) -> Void
var onCancel: () -> Void
@State private var title: String
@State private var title: String
@State private var message: String
@State private var type: UserTimerType
@State private var timeOnScreen: Int
@@ -297,11 +301,9 @@ struct UserTimerEditSheet: View {
}
.pickerStyle(.segmented)
.onChange(of: type) { newType in
// When switching to subtle, set timeOnScreen to 3 (not user-configurable)
if newType == .subtle {
timeOnScreen = 3
} else if timeOnScreen == 3 {
// When switching from subtle to overlay, set to default overlay duration
timeOnScreen = 10
}
}