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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user