NetNewsWire/Multiplatform/macOS/Preferences/Views/AdvancedPreferencesView.swift
Stuart Breckenridge 1f6f5fa054 Adds Mac Preferences
This makes use of `@AppStorage` for preferences. Severeral more need to migrated from AppDefaults etc.
2020-06-29 21:04:50 +08:00

50 lines
1.4 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// AdvancedPreferencesView.swift
// macOS
//
// Created by Stuart Breckenridge on 27/6/20.
//
import SwiftUI
struct AdvancedPreferencesView: View {
@StateObject var preferences: MacPreferences
var body: some View {
VStack {
Form {
Toggle("Check for app updates automatically", isOn: $preferences.checkForUpdatesAutomatically)
Toggle("Download Test Builds", isOn: $preferences.downloadTestBuilds)
HStack {
Spacer()
Text("If youre not sure, don't enable test builds. Test builds may have bugs, which may include crashing bugs and data loss.").foregroundColor(.secondary)
Spacer()
}
HStack {
Spacer()
Button("Check for Updates", action: {})
Spacer()
}.padding(.vertical, 12)
Toggle("Send Crash Logs Automatically", isOn: $preferences.sendCrashLogs)
Spacer()
HStack {
Spacer()
Button("Privacy Policy", action: {})
Spacer()
}.padding(.top, 12)
}
Spacer()
}.frame(width: 300, alignment: .center)
}
}