NetNewsWire/Multiplatform/macOS/Preferences/Views/GeneralPreferencesView.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

34 lines
976 B
Swift

//
// GeneralPreferencesView.swift
// macOS
//
// Created by Stuart Breckenridge on 27/6/20.
//
import SwiftUI
struct GeneralPreferencesView: View {
@ObservedObject private var preferences = MacPreferences()
var body: some View {
VStack {
Form {
Picker("Refresh Feeds",
selection: $preferences.refreshFrequency,
content: {
ForEach(0..<preferences.refreshIntervals.count, content: {
Text(preferences.refreshIntervals[$0])
})
}).frame(width: 300, alignment: .center)
Toggle("Open webpages in background in browser", isOn: $preferences.openInBackground)
Toggle("Show Unread Count in Dock", isOn: $preferences.showUnreadCountInDock)
}
Spacer()
}.frame(width: 300, alignment: .center)
}
}