Merge branch 'master' into google_reader_compatible_syncing

This commit is contained in:
Jeremy Beker
2019-06-19 07:56:54 -04:00
21 changed files with 89 additions and 145 deletions

View File

@@ -11,7 +11,7 @@ import Account
struct SettingsAddAccountView : View {
var body: some View {
List {
Form {
PresentationButton(destination: SettingsLocalAccountView(name: "")) {
SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: Account.defaultLocalAccountName)
}
@@ -21,7 +21,6 @@ struct SettingsAddAccountView : View {
}
.padding(4)
}
.listStyle(.grouped)
.navigationBarTitle(Text("Add Account"), displayMode: .inline)
}
}

View File

@@ -17,7 +17,7 @@ struct SettingsDetailAccountView : View {
@State private var showFeedbinCredentials = false
var body: some View {
List {
Form {
Section {
HStack {
Text("Name")
@@ -63,7 +63,6 @@ struct SettingsDetailAccountView : View {
}
}
}
.listStyle(.grouped)
.navigationBarTitle(Text(verbatim: viewModel.nameForDisplay), displayMode: .inline)
}

View File

@@ -19,7 +19,7 @@ struct SettingsFeedbinAccountView : View {
var body: some View {
NavigationView {
List {
Form {
Section(header:
SettingsAccountLabelView(accountImage: "accountFeedbin", accountLabel: "Feedbin").padding()
) {
@@ -57,7 +57,6 @@ struct SettingsFeedbinAccountView : View {
}
}
.disabled(busy)
.listStyle(.grouped)
.navigationBarTitle(Text(""), displayMode: .inline)
.navigationBarItems(leading:
Button(action: { self.dismiss() }) { Text("Cancel") }

View File

@@ -15,7 +15,7 @@ struct SettingsLocalAccountView : View {
var body: some View {
NavigationView {
List {
Form {
Section(header:
SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: Account.defaultLocalAccountName).padding()
) {
@@ -35,7 +35,6 @@ struct SettingsLocalAccountView : View {
}
}
}
.listStyle(.grouped)
.navigationBarTitle(Text(""), displayMode: .inline)
.navigationBarItems(leading: Button(action: { self.dismiss() }) { Text("Cancel") } )
}

View File

@@ -19,7 +19,7 @@ struct SettingsView : View {
var body: some View {
NavigationView {
List {
Form {
Section(header: Text("ACCOUNTS")) {
ForEach(viewModel.accounts.identified(by: \.self)) { account in
@@ -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,8 +64,28 @@ 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)
}
.listStyle(.grouped)
.navigationBarTitle(Text("Settings"), displayMode: .inline)
}
@@ -118,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 {

View File

@@ -59,7 +59,7 @@ extension DetailAccountViewController {
}
let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor
bgView.backgroundColor = AppAssets.netNewsWireBlueColor
cell.selectedBackgroundView = bgView
return cell
}

View File

@@ -25,7 +25,7 @@ class RefreshIntervalViewController: UITableViewController {
cell.textLabel?.adjustsFontForContentSizeCategory = true
let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor
bgView.backgroundColor = AppAssets.netNewsWireBlueColor
cell.selectedBackgroundView = bgView
let userRefreshInterval = AppDefaults.refreshInterval

View File

@@ -93,7 +93,7 @@ class SettingsViewController: UITableViewController {
}
let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor
bgView.backgroundColor = AppAssets.netNewsWireBlueColor
cell.selectedBackgroundView = bgView
return cell

View File

@@ -25,7 +25,7 @@ class TimelineNumberOfLinesViewController: UITableViewController {
cell.textLabel?.adjustsFontForContentSizeCategory = true
let bgView = UIView()
bgView.backgroundColor = AppAssets.selectionBackgroundColor
bgView.backgroundColor = AppAssets.netNewsWireBlueColor
cell.selectedBackgroundView = bgView
cell.textLabel?.text = "\(2 + indexPath.row)" + NSLocalizedString(" lines", comment: "Lines")