feat: better automation, cleanup Autoupdate line
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user