Display & Behaviors

This commit is contained in:
Stuart Breckenridge
2022-11-13 00:06:32 +08:00
parent 9fc6c54222
commit 1576bcd87a
3 changed files with 20 additions and 13 deletions

View File

@@ -14,7 +14,7 @@ struct AppearanceManagementView: View {
var body: some View {
List {
Section("Application Appearance") {
Section("Application") {
HStack {
appLightButton()
Spacer()
@@ -25,20 +25,22 @@ struct AppearanceManagementView: View {
.listRowBackground(Color.clear)
}
Section("Timeline Appearance") {
Section("Timeline") {
SettingsViewRows.SortOldestToNewest($appDefaults.timelineSortDirectionBool)
SettingsViewRows.GroupByFeed($appDefaults.timelineGroupByFeed)
SettingsViewRows.RefreshToClearReadArticles($appDefaults.refreshClearsReadArticles)
}
Section("Article Appearance") {
Section("Article") {
SettingsViewRows.ThemeSelection
SettingsViewRows.ConfirmMarkAllAsRead($appDefaults.confirmMarkAllAsRead)
SettingsViewRows.OpenLinksInNetNewsWire($appDefaults.useSystemBrowser)
SettingsViewRows.EnableFullScreenArticles($appDefaults.articleFullscreenEnabled)
SettingsViewRows.OpenLinksInNetNewsWire(Binding<Bool>(
get: { !appDefaults.useSystemBrowser },
set: { appDefaults.useSystemBrowser = !$0 }
))
}
}
.navigationTitle(Text("Appearance"))
.navigationTitle(Text("Display & Behaviors"))
.tint(Color(uiColor: AppAssets.primaryAccentColor))
}

View File

@@ -213,7 +213,7 @@ struct SettingsViewRows {
static var ConfigureAppearance: some View {
NavigationLink(destination: AppearanceManagementView()) {
Label {
Text("Appearance")
Text("Display & Behaviors")
} icon: {
Image("app.appearance")
.resizable()
@@ -258,3 +258,10 @@ struct SettingsViewRows {
}
}
}
extension Binding where Value == Bool {
func negate() -> Bool {
return !(self.wrappedValue)
}
}

View File

@@ -22,22 +22,20 @@ struct SettingsView: View {
List {
// System Settings
Section(footer: Text("Configure access to Siri, background app refresh, mobile data, and more.")) {
Section(footer: Text("Configure NetNewsWire's access to Siri, background app refresh, mobile data, and more.")) {
SettingsViewRows.OpenSystemSettings
}
Section(footer: Text("Add, delete, or disable accounts and extensions.")) {
Section(footer: Text("Add, delete, enable or disable accounts and extensions.")) {
SettingsViewRows.AddAccount
SettingsViewRows.AddExtension
}
Section(footer: Text("Configure the look and feel of NetNewsWire.")) {
Section(footer: Text("Configure the look, feel, and behavior of NetNewsWire.")) {
SettingsViewRows.ConfigureAppearance
SettingsViewRows.ConfigureNewArticleNotifications
}
Section {
ForEach(0..<HelpSheet.allCases.count, id: \.self) { i in
SettingsViewRows.ShowHelpSheet(sheet: HelpSheet.allCases[i], selectedSheet: $helpSheet, $showHelpSheet)