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

View File

@@ -14,7 +14,6 @@ struct UserTimersView: View {
var body: some View { var body: some View {
VStack(spacing: 0) { VStack(spacing: 0) {
// Fixed header section
VStack(spacing: 16) { VStack(spacing: 16) {
Image(systemName: "clock.badge.checkmark") Image(systemName: "clock.badge.checkmark")
.font(.system(size: 60)) .font(.system(size: 60))
@@ -25,7 +24,6 @@ struct UserTimersView: View {
.padding(.top, 20) .padding(.top, 20)
.padding(.bottom, 30) .padding(.bottom, 30)
// Vertically centered content
Spacer() Spacer()
VStack(spacing: 30) { VStack(spacing: 30) {
Text("Create your own reminder schedules") Text("Create your own reminder schedules")
@@ -40,9 +38,11 @@ struct UserTimersView: View {
.foregroundColor(.white) .foregroundColor(.white)
} }
.padding() .padding()
.glassEffectIfAvailable(GlassStyle.regular.tint(.purple), in: .rect(cornerRadius: 8)) .glassEffectIfAvailable(
GlassStyle.regular.tint(.purple), in: .rect(cornerRadius: 8))
VStack(alignment: .leading, spacing: 12) { VStack(alignment: .leading, spacing: 12) {
#if APPSTORE
HStack { HStack {
Text("Active Timers (\(userTimers.count)/3)") Text("Active Timers (\(userTimers.count)/3)")
.font(.headline) .font(.headline)
@@ -56,6 +56,7 @@ struct UserTimersView: View {
.buttonStyle(.borderedProminent) .buttonStyle(.borderedProminent)
} }
} }
#endif
if userTimers.isEmpty { if userTimers.isEmpty {
VStack(spacing: 12) { VStack(spacing: 12) {
@@ -156,7 +157,9 @@ struct UserTimerRow: View {
.font(.subheadline) .font(.subheadline)
.fontWeight(.medium) .fontWeight(.medium)
.lineLimit(1) .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) .font(.caption)
.foregroundColor(.secondary) .foregroundColor(.secondary)
} }
@@ -188,7 +191,8 @@ struct UserTimerRow: View {
} }
Button("Cancel", role: .cancel) {} Button("Cancel", role: .cancel) {}
} message: { } 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.")
} }
} }
} }
@@ -297,11 +301,9 @@ struct UserTimerEditSheet: View {
} }
.pickerStyle(.segmented) .pickerStyle(.segmented)
.onChange(of: type) { newType in .onChange(of: type) { newType in
// When switching to subtle, set timeOnScreen to 3 (not user-configurable)
if newType == .subtle { if newType == .subtle {
timeOnScreen = 3 timeOnScreen = 3
} else if timeOnScreen == 3 { } else if timeOnScreen == 3 {
// When switching from subtle to overlay, set to default overlay duration
timeOnScreen = 10 timeOnScreen = 10
} }
} }