// // DocsView.swift // Splits // // Created by Isaac Greene on 6/3/22. // import SwiftUI // this file will not have comments. // this code is considered simple enough to be // human-readable without aid, as long as // the reader has a basic understanding of // Swift and/or SwiftUI. let username = "admin" let password = "123" struct DocsView: View { @State var pass: String = "" @State var user: String = "" var body: some View { NavigationView { List { NavigationLink("Help", destination: HelpView()) NavigationLink("Change Log", destination: ChangeLog()) Section(header: Text("Features")) { NavigationLink("New", destination: NewFeatures()) NavigationLink("In Progress", destination: InProgressFeatures()) NavigationLink("Deprecated", destination: DeprecatedFeatures()) } Section(header: Text("Known Issues")) { NavigationLink("Recently Resolved", destination: RecentlyResolved()) NavigationLink("High Priority", destination: HighPriority()) NavigationLink("Medium Priority", destination: MediumPriority()) NavigationLink("Low Priority", destination: LowPriority()) } Section(header: Text("App Information")) { NavigationLink("Software License", destination: LicenseView()) Text("Version: 1.0.0") Text("Release date: 2022-06-10") Text("Start date: 2022-03-25") Link("Built with SwiftUI \(Image(systemName: "swift"))", destination: URL(string: "https://developer.apple.com/xcode/swiftui")!) } Section(header: Text("Login")) { SecureField("Username", text: $user) SecureField("Password", text: $pass) if (pass == password && user == username) { NavigationLink("Contacts", destination: SecretView()) } } } .navigationTitle("Docs") } } } struct DocsView_Previews: PreviewProvider { static var previews: some View { DocsView() } }