diff --git a/Threaded/Data/Navigator.swift b/Threaded/Data/Navigator.swift index 1557a7a..7482cdd 100644 --- a/Threaded/Data/Navigator.swift +++ b/Threaded/Data/Navigator.swift @@ -68,6 +68,7 @@ public enum RouterDestination: Hashable { case settings case privacy case account(acc: Account) + case about } extension View { @@ -80,6 +81,8 @@ extension View { PrivacyView() case .account(let acc): AccountView(account: acc) + case .about: + AboutView() } } } diff --git a/Threaded/Views/Settings/AboutView.swift b/Threaded/Views/Settings/AboutView.swift index 659cfb2..277f59c 100644 --- a/Threaded/Views/Settings/AboutView.swift +++ b/Threaded/Views/Settings/AboutView.swift @@ -4,7 +4,33 @@ import SwiftUI struct AboutView: View { var body: some View { - Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + List { + NavigationLink { + aboutApp + } label: { + Text("about.app") + .tint(Color.blue) + } + .listRowSeparator(.hidden) + .listRowBackground(Color.appBackground) + } + .listStyle(.plain) + .navigationTitle("about") + .navigationBarTitleDisplayMode(.inline) + } + + var aboutApp: some View { + ScrollView { + VStack (spacing: 15) { + Text("about.app.details") + .multilineTextAlignment(.leading) + Text("about.app.third-party") + .multilineTextAlignment(.leading) + } + .padding(.horizontal) + } + .navigationTitle("about.app") + .navigationBarTitleDisplayMode(.large) } } diff --git a/Threaded/Views/Settings/SettingsView.swift b/Threaded/Views/Settings/SettingsView.swift index d31a5de..eb8a7a6 100644 --- a/Threaded/Views/Settings/SettingsView.swift +++ b/Threaded/Views/Settings/SettingsView.swift @@ -8,13 +8,19 @@ struct SettingsView: View { var body: some View { List { + Button { + navigator.navigate(to: .about) + } label: { + Label("about", systemImage: "info.circle") + } + .listRowSeparator(.hidden) + Button { navigator.navigate(to: .privacy) } label: { Label("setting.privacy", systemImage: "lock") } -// .listRowSeparator(.hidden) - .listRowSeparator(.visible) + .listRowSeparator(.hidden) Button { UserDefaults.standard.removeObject(forKey: AppAccount.saveKey) @@ -24,7 +30,7 @@ struct SettingsView: View { .foregroundStyle(.red) } .tint(Color.red) - .listRowSeparator(.hidden) + .listRowSeparator(.visible, edges: .bottom) } .withCovers(sheetDestination: $sheet) .listStyle(.inset)