From 86e1a58b06e7430e792a878355557fd78e867a71 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 18 Jun 2019 17:38:20 -0500 Subject: [PATCH] Move About section to bottom of Settings and add build number --- iOS/Settings/SettingsView.swift | 48 ++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/iOS/Settings/SettingsView.swift b/iOS/Settings/SettingsView.swift index 6a0f7d5da..5cc2a4863 100644 --- a/iOS/Settings/SettingsView.swift +++ b/iOS/Settings/SettingsView.swift @@ -32,27 +32,6 @@ struct SettingsView : View { } } - Section(header: Text("ABOUT")) { - Text("About NetNewsWire") - PresentationButton(destination: SafariView(url: URL(string: "https://ranchero.com/netnewswire/")!)) { - Text("Website") - } - PresentationButton(destination: SafariView(url: URL(string: "https://github.com/brentsimmons/NetNewsWire")!)) { - Text("Github Repository") - } - PresentationButton(destination: SafariView(url: URL(string: "https://github.com/brentsimmons/NetNewsWire/issues")!)) { - Text("Bug Tracker") - } - PresentationButton(destination: SafariView(url: URL(string: "https://github.com/brentsimmons/NetNewsWire/tree/master/Technotes")!)) { - Text("Technotes") - } - PresentationButton(destination: SafariView(url: URL(string: "https://github.com/brentsimmons/NetNewsWire/blob/master/Technotes/HowToSupportNetNewsWire.markdown")!)) { - Text("How to Support NetNewsWire") - } - Text("Add NetNewsWire News Feed") - } - .foregroundColor(.primary) - Section(header: Text("TIMELINE")) { Toggle(isOn: $viewModel.sortOldestToNewest) { Text("Sort Oldest to Newest") @@ -85,6 +64,27 @@ struct SettingsView : View { } .foregroundColor(.primary) + Section(header: Text("ABOUT"), footer: buildFooter) { + Text("About NetNewsWire") + PresentationButton(destination: SafariView(url: URL(string: "https://ranchero.com/netnewswire/")!)) { + Text("Website") + } + PresentationButton(destination: SafariView(url: URL(string: "https://github.com/brentsimmons/NetNewsWire")!)) { + Text("Github Repository") + } + PresentationButton(destination: SafariView(url: URL(string: "https://github.com/brentsimmons/NetNewsWire/issues")!)) { + Text("Bug Tracker") + } + PresentationButton(destination: SafariView(url: URL(string: "https://github.com/brentsimmons/NetNewsWire/tree/master/Technotes")!)) { + Text("Technotes") + } + PresentationButton(destination: SafariView(url: URL(string: "https://github.com/brentsimmons/NetNewsWire/blob/master/Technotes/HowToSupportNetNewsWire.markdown")!)) { + Text("How to Support NetNewsWire") + } + Text("Add NetNewsWire News Feed") + } + .foregroundColor(.primary) + } .navigationBarTitle(Text("Settings"), displayMode: .inline) @@ -117,6 +117,12 @@ struct SettingsView : View { return ActionSheet(title: Text("Export Subscriptions..."), message: Text("Select the account to export out of."), buttons: buttons) } + var buildFooter: some View { + return Text(verbatim: "\(Bundle.main.appName) v \(Bundle.main.versionNumber) (Build \(Bundle.main.buildNumber))") + .font(.footnote) + .foregroundColor(.secondary) + } + // MARK: ViewModel class ViewModel: BindableObject {