50 lines
1.1 KiB
Swift
50 lines
1.1 KiB
Swift
|
|
//
|
||
|
|
// SettingsView.swift
|
||
|
|
// App
|
||
|
|
//
|
||
|
|
// Created by James Magahern on 3/3/21.
|
||
|
|
//
|
||
|
|
|
||
|
|
import SwiftUI
|
||
|
|
|
||
|
|
struct SettingsCategoryCell: View {
|
||
|
|
@State var title: String = ""
|
||
|
|
|
||
|
|
var body: some View {
|
||
|
|
HStack {
|
||
|
|
Text(title)
|
||
|
|
.bold()
|
||
|
|
.frame(height: 34.0)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
struct SettingsView: View {
|
||
|
|
@Environment(\.presentationMode)
|
||
|
|
@Binding private var presentationMode
|
||
|
|
|
||
|
|
var body: some View {
|
||
|
|
NavigationView {
|
||
|
|
List {
|
||
|
|
Section(header: Text("Redirect Rules"), content: {
|
||
|
|
Text("To Do")
|
||
|
|
})
|
||
|
|
}
|
||
|
|
.listStyle(InsetGroupedListStyle())
|
||
|
|
.navigationBarTitle("Settings", displayMode: .inline)
|
||
|
|
.toolbar(content: {
|
||
|
|
#if !targetEnvironment(macCatalyst)
|
||
|
|
Button("Done", action: { presentationMode.dismiss() })
|
||
|
|
#endif
|
||
|
|
})
|
||
|
|
}
|
||
|
|
.navigationViewStyle(StackNavigationViewStyle())
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
struct SettingsView_Previews: PreviewProvider {
|
||
|
|
static var previews: some View {
|
||
|
|
SettingsView()
|
||
|
|
}
|
||
|
|
}
|