feat: better automation, cleanup Autoupdate line

This commit is contained in:
Michael Freno
2026-01-11 18:08:15 -05:00
parent b627cca463
commit f3b4095ba9
3 changed files with 101 additions and 21 deletions

View File

@@ -55,27 +55,37 @@ struct GeneralSetupView: View {
// Software Updates Section
if !isAppStoreVersion {
VStack(alignment: .leading, spacing: 12) {
Text("Software Updates")
.font(.headline)
HStack {
VStack(alignment: .leading, spacing: 4) {
Text("Software Updates")
.font(.headline)
Toggle("Automatically check for updates", isOn: $updateManager.automaticallyChecksForUpdates)
.help("Check for new versions of Gaze in the background")
if let lastCheck = updateManager.lastUpdateCheckDate {
Text("Last checked: \(lastCheck, style: .relative)")
.font(.caption)
.foregroundColor(.secondary)
} else {
Text("Never checked for updates")
.font(.caption)
.foregroundColor(.secondary)
if let lastCheck = updateManager.lastUpdateCheckDate {
Text("Last checked: \(lastCheck, style: .relative)")
.font(.caption)
.foregroundColor(.secondary)
.italic()
} else {
Text("Never checked for updates")
.font(.caption)
.foregroundColor(.secondary)
.italic()
}
}
Spacer()
Button("Check for Updates Now") {
updateManager.checkForUpdates()
}
.buttonStyle(.bordered)
Toggle(
"Automatically check for updates",
isOn: $updateManager.automaticallyChecksForUpdates
)
.labelsHidden()
.help("Check for new versions of Gaze in the background")
}
.padding()
.glassEffectIfAvailable(GlassStyle.regular, in: .rect(cornerRadius: 12))