fix: target dependancies
This commit is contained in:
@@ -42,47 +42,50 @@ struct GeneralSetupView: View {
|
|||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
Toggle("", isOn: Binding(
|
Toggle(
|
||||||
get: { settingsManager.settings.launchAtLogin },
|
"",
|
||||||
set: { settingsManager.settings.launchAtLogin = $0 }
|
isOn: Binding(
|
||||||
))
|
get: { settingsManager.settings.launchAtLogin },
|
||||||
.labelsHidden()
|
set: { settingsManager.settings.launchAtLogin = $0 }
|
||||||
.onChange(of: settingsManager.settings.launchAtLogin) { isEnabled in
|
)
|
||||||
applyLaunchAtLoginSetting(enabled: isEnabled)
|
)
|
||||||
}
|
.labelsHidden()
|
||||||
|
.onChange(of: settingsManager.settings.launchAtLogin) { isEnabled in
|
||||||
|
applyLaunchAtLoginSetting(enabled: isEnabled)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
.glassEffectIfAvailable(GlassStyle.regular, in: .rect(cornerRadius: 12))
|
.glassEffectIfAvailable(GlassStyle.regular, in: .rect(cornerRadius: 12))
|
||||||
|
|
||||||
// Software Updates Section
|
// Software Updates Section
|
||||||
#if !APPSTORE
|
#if !APPSTORE
|
||||||
HStack {
|
HStack {
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
Text("Software Updates")
|
Text("Software Updates")
|
||||||
.font(.headline)
|
.font(.headline)
|
||||||
|
|
||||||
if let lastCheck = updateManager.lastUpdateCheckDate {
|
if let lastCheck = updateManager.lastUpdateCheckDate {
|
||||||
Text("Last checked: \(lastCheck, style: .relative)")
|
Text("Last checked: \(lastCheck, style: .relative)")
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
.italic()
|
.italic()
|
||||||
} else {
|
} else {
|
||||||
Text("Never checked for updates")
|
Text("Never checked for updates")
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
.italic()
|
.italic()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
Button("Check for Updates Now") {
|
Button("Check for Updates Now") {
|
||||||
updateManager.checkForUpdates()
|
updateManager.checkForUpdates()
|
||||||
}
|
}
|
||||||
.buttonStyle(.bordered)
|
.buttonStyle(.bordered)
|
||||||
|
|
||||||
Toggle(
|
Toggle(
|
||||||
"Automatically check for updates",
|
"Automatically check for updates",
|
||||||
isOn: $updateManager.automaticallyChecksForUpdates
|
isOn: $updateManager.automaticallyChecksForUpdates
|
||||||
)
|
)
|
||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
@@ -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,75 +144,74 @@ 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)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
// GitHub Link
|
// GitHub Link
|
||||||
Button(action: {
|
Button(action: {
|
||||||
if let url = URL(string: "https://github.com/mikefreno/Gaze") {
|
if let url = URL(string: "https://github.com/mikefreno/Gaze") {
|
||||||
NSWorkspace.shared.open(url)
|
NSWorkspace.shared.open(url)
|
||||||
}
|
|
||||||
}) {
|
|
||||||
HStack {
|
|
||||||
Image(systemName: "chevron.left.forwardslash.chevron.right")
|
|
||||||
.font(.title3)
|
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
|
||||||
Text("View on GitHub")
|
|
||||||
.font(.subheadline)
|
|
||||||
.fontWeight(.semibold)
|
|
||||||
Text("Star the repo, report issues, contribute")
|
|
||||||
.font(.caption)
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
}
|
}
|
||||||
Spacer()
|
}) {
|
||||||
Image(systemName: "arrow.up.right")
|
HStack {
|
||||||
.font(.caption)
|
Image(systemName: "chevron.left.forwardslash.chevron.right")
|
||||||
|
.font(.title3)
|
||||||
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
|
Text("View on GitHub")
|
||||||
|
.font(.subheadline)
|
||||||
|
.fontWeight(.semibold)
|
||||||
|
Text("Star the repo, report issues, contribute")
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
}
|
||||||
|
Spacer()
|
||||||
|
Image(systemName: "arrow.up.right")
|
||||||
|
.font(.caption)
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.contentShape(RoundedRectangle(cornerRadius: 10))
|
||||||
}
|
}
|
||||||
.padding()
|
.buttonStyle(.plain)
|
||||||
.frame(maxWidth: .infinity)
|
|
||||||
.contentShape(RoundedRectangle(cornerRadius: 10))
|
|
||||||
}
|
|
||||||
.buttonStyle(.plain)
|
|
||||||
.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)
|
|
||||||
}
|
|
||||||
}) {
|
|
||||||
HStack {
|
|
||||||
Image(systemName: "cup.and.saucer.fill")
|
|
||||||
.font(.title3)
|
|
||||||
.foregroundColor(.brown)
|
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
|
||||||
Text("Buy Me a Coffee")
|
|
||||||
.font(.subheadline)
|
|
||||||
.fontWeight(.semibold)
|
|
||||||
Text("Support development of Gaze")
|
|
||||||
.font(.caption)
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
}
|
}
|
||||||
Spacer()
|
}) {
|
||||||
Image(systemName: "arrow.up.right")
|
HStack {
|
||||||
.font(.caption)
|
Image(systemName: "cup.and.saucer.fill")
|
||||||
|
.font(.title3)
|
||||||
|
.foregroundColor(.brown)
|
||||||
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
|
Text("Buy Me a Coffee")
|
||||||
|
.font(.subheadline)
|
||||||
|
.fontWeight(.semibold)
|
||||||
|
Text("Support development of Gaze")
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
}
|
||||||
|
Spacer()
|
||||||
|
Image(systemName: "arrow.up.right")
|
||||||
|
.font(.caption)
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.cornerRadius(10)
|
||||||
|
.contentShape(RoundedRectangle(cornerRadius: 10))
|
||||||
}
|
}
|
||||||
.padding()
|
.buttonStyle(.plain)
|
||||||
.frame(maxWidth: .infinity)
|
.glassEffectIfAvailable(
|
||||||
.cornerRadius(10)
|
GlassStyle.regular.tint(.orange).interactive(),
|
||||||
.contentShape(RoundedRectangle(cornerRadius: 10))
|
in: .rect(cornerRadius: 10))
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.padding()
|
||||||
.glassEffectIfAvailable(
|
#endif
|
||||||
GlassStyle.regular.tint(.orange).interactive(),
|
|
||||||
in: .rect(cornerRadius: 10))
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
.padding()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|||||||
@@ -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,22 +38,25 @@ 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) {
|
||||||
HStack {
|
#if APPSTORE
|
||||||
Text("Active Timers (\(userTimers.count)/3)")
|
HStack {
|
||||||
.font(.headline)
|
Text("Active Timers (\(userTimers.count)/3)")
|
||||||
Spacer()
|
.font(.headline)
|
||||||
if userTimers.count < 3 {
|
Spacer()
|
||||||
Button(action: {
|
if userTimers.count < 3 {
|
||||||
showingAddTimer = true
|
Button(action: {
|
||||||
}) {
|
showingAddTimer = true
|
||||||
Label("Add Timer", systemImage: "plus.circle.fill")
|
}) {
|
||||||
|
Label("Add Timer", systemImage: "plus.circle.fill")
|
||||||
|
}
|
||||||
|
.buttonStyle(.borderedProminent)
|
||||||
}
|
}
|
||||||
.buttonStyle(.borderedProminent)
|
|
||||||
}
|
}
|
||||||
}
|
#endif
|
||||||
|
|
||||||
if userTimers.isEmpty {
|
if userTimers.isEmpty {
|
||||||
VStack(spacing: 12) {
|
VStack(spacing: 12) {
|
||||||
@@ -156,9 +157,11 @@ 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(
|
||||||
.font(.caption)
|
"\(timer.type.displayName) • \(timer.timeOnScreenSeconds)s on screen • \(timer.intervalMinutes) min interval"
|
||||||
.foregroundColor(.secondary)
|
)
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
@@ -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.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -209,7 +213,7 @@ struct UserTimerEditSheet: View {
|
|||||||
var onSave: (UserTimer) -> Void
|
var onSave: (UserTimer) -> Void
|
||||||
var onCancel: () -> Void
|
var onCancel: () -> Void
|
||||||
|
|
||||||
@State private var title: String
|
@State private var title: String
|
||||||
@State private var message: String
|
@State private var message: String
|
||||||
@State private var type: UserTimerType
|
@State private var type: UserTimerType
|
||||||
@State private var timeOnScreen: Int
|
@State private var timeOnScreen: Int
|
||||||
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user