Add launch at login option, bump to v1.0.2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 09:08:34 +02:00
co-authored by Claude Opus 4.6
parent 052663b356
commit 4267650739
3 changed files with 23 additions and 6 deletions
+17
View File
@@ -1,11 +1,28 @@
import AppKit
import ServiceManagement
import SwiftUI
struct SettingsView: View {
@EnvironmentObject var coordinator: AppCoordinator
@State private var launchAtLogin = SMAppService.mainApp.status == .enabled
var body: some View {
Form {
Section("Allgemein") {
Toggle("Mit dem System starten", isOn: $launchAtLogin)
.onChange(of: launchAtLogin) { _, newValue in
do {
if newValue {
try SMAppService.mainApp.register()
} else {
try SMAppService.mainApp.unregister()
}
} catch {
launchAtLogin = SMAppService.mainApp.status == .enabled
}
}
}
Section("Nach der Aufnahme") {
Picker("Aktion:", selection: $coordinator.outputAction) {
ForEach(OutputAction.allCases) { action in