mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
simplifies Settings options
This commit is contained in:
6
iOS/Resources/Assets.xcassets/Settings/Contents.json
Normal file
6
iOS/Resources/Assets.xcassets/Settings/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
12
iOS/Resources/Assets.xcassets/Settings/app.account.imageset/Contents.json
vendored
Normal file
12
iOS/Resources/Assets.xcassets/Settings/app.account.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "app.account.pdf",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
iOS/Resources/Assets.xcassets/Settings/app.account.imageset/app.account.pdf
vendored
Normal file
BIN
iOS/Resources/Assets.xcassets/Settings/app.account.imageset/app.account.pdf
vendored
Normal file
Binary file not shown.
12
iOS/Resources/Assets.xcassets/Settings/app.appearance.imageset/Contents.json
vendored
Normal file
12
iOS/Resources/Assets.xcassets/Settings/app.appearance.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "app.appearance.pdf",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
iOS/Resources/Assets.xcassets/Settings/app.appearance.imageset/app.appearance.pdf
vendored
Normal file
BIN
iOS/Resources/Assets.xcassets/Settings/app.appearance.imageset/app.appearance.pdf
vendored
Normal file
Binary file not shown.
12
iOS/Resources/Assets.xcassets/Settings/app.extension.imageset/Contents.json
vendored
Normal file
12
iOS/Resources/Assets.xcassets/Settings/app.extension.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "app.extension.pdf",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
iOS/Resources/Assets.xcassets/Settings/app.extension.imageset/app.extension.pdf
vendored
Normal file
BIN
iOS/Resources/Assets.xcassets/Settings/app.extension.imageset/app.extension.pdf
vendored
Normal file
Binary file not shown.
12
iOS/Resources/Assets.xcassets/Settings/notifications.sounds.imageset/Contents.json
vendored
Normal file
12
iOS/Resources/Assets.xcassets/Settings/notifications.sounds.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "notifications.sounds.pdf",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
iOS/Resources/Assets.xcassets/Settings/notifications.sounds.imageset/notifications.sounds.pdf
vendored
Normal file
BIN
iOS/Resources/Assets.xcassets/Settings/notifications.sounds.imageset/notifications.sounds.pdf
vendored
Normal file
Binary file not shown.
12
iOS/Resources/Assets.xcassets/Settings/system.settings.imageset/Contents.json
vendored
Normal file
12
iOS/Resources/Assets.xcassets/Settings/system.settings.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "system.settings.pdf",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
iOS/Resources/Assets.xcassets/Settings/system.settings.imageset/system.settings.pdf
vendored
Normal file
BIN
iOS/Resources/Assets.xcassets/Settings/system.settings.imageset/system.settings.pdf
vendored
Normal file
Binary file not shown.
@@ -15,7 +15,7 @@ struct SettingsViewHeaders {
|
||||
|
||||
static func AddAccountHeader(_ showAddAccount: Binding<Bool>) -> some View {
|
||||
HStack {
|
||||
Text("Accounts")
|
||||
//Text("Accounts")
|
||||
Spacer()
|
||||
Button {
|
||||
showAddAccount.wrappedValue.toggle()
|
||||
@@ -43,12 +43,11 @@ struct SettingsViewRows {
|
||||
Label {
|
||||
Text("Open System Settings")
|
||||
} icon: {
|
||||
Image(systemName: "gear.circle.fill")
|
||||
Image("system.settings")
|
||||
.resizable()
|
||||
.renderingMode(.template)
|
||||
.foregroundColor(.gray)
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 25.0, height: 25.0)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
.onTapGesture {
|
||||
UIApplication.shared.open(URL(string: "\(UIApplication.openSettingsURLString)")!)
|
||||
@@ -60,14 +59,12 @@ struct SettingsViewRows {
|
||||
static var ConfigureNewArticleNotifications: some View {
|
||||
NavigationLink(destination: NotificationsViewControllerRepresentable().edgesIgnoringSafeArea(.all)) {
|
||||
Label {
|
||||
Text("New Article Notifications")
|
||||
Text("Notifications and Sounds")
|
||||
} icon: {
|
||||
Image(systemName: "bell.square.fill")
|
||||
Image("notifications.sounds")
|
||||
.resizable()
|
||||
.renderingMode(.template)
|
||||
.foregroundColor(.red)
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 25.0, height: 25.0)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,14 +74,12 @@ struct SettingsViewRows {
|
||||
static var AddAccount: some View {
|
||||
NavigationLink(destination: AddAccountViewControllerRepresentable().edgesIgnoringSafeArea(.all)) {
|
||||
Label {
|
||||
Text("Add Account")
|
||||
Text("Manage Accounts")
|
||||
} icon: {
|
||||
Image(systemName: "plus.app.fill")
|
||||
Image("app.account")
|
||||
.resizable()
|
||||
.renderingMode(.template)
|
||||
.foregroundColor(Color(uiColor: AppAssets.primaryAccentColor))
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 25.0, height: 25.0)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,12 +105,12 @@ struct SettingsViewRows {
|
||||
static var AddExtension: some View {
|
||||
NavigationLink(destination: NotificationsViewControllerRepresentable()) {
|
||||
Label {
|
||||
Text("Add Extension")
|
||||
Text("Manage Extensions")
|
||||
} icon: {
|
||||
Image(systemName: "puzzlepiece.extension")
|
||||
Image("app.extension")
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 25.0, height: 25.0)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,14 +214,12 @@ struct SettingsViewRows {
|
||||
static var ConfigureAppearance: some View {
|
||||
NavigationLink(destination: NotificationsViewControllerRepresentable().edgesIgnoringSafeArea(.all)) {
|
||||
Label {
|
||||
Text("Configure Appearance")
|
||||
Text("Appearance")
|
||||
} icon: {
|
||||
Image(systemName: "rectangle.trailinghalf.filled")
|
||||
Image("app.appearance")
|
||||
.resizable()
|
||||
.renderingMode(.template)
|
||||
.foregroundColor(.black)
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 25.0, height: 25.0)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -253,4 +246,16 @@ struct SettingsViewRows {
|
||||
show.wrappedValue.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
static var AboutNetNewsWire: some View {
|
||||
NavigationLink {
|
||||
AboutView()
|
||||
} label: {
|
||||
Label {
|
||||
Text("About NetNewsWire")
|
||||
} icon: {
|
||||
Image(systemName: "questionmark.square.dashed")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,50 +15,35 @@ struct SettingsView: View {
|
||||
@State private var showAddAccountView: Bool = false
|
||||
@State private var helpSheet: HelpSheet = .help
|
||||
@State private var showHelpSheet: Bool = false
|
||||
@State private var showAbout: Bool = false
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
List {
|
||||
Section("Notifications, Badge, Data, and More") {
|
||||
|
||||
// System Settings
|
||||
Section(footer: Text("Configure access to Siri, background app refresh, mobile data, and more.")) {
|
||||
SettingsViewRows.OpenSystemSettings
|
||||
SettingsViewRows.ConfigureNewArticleNotifications
|
||||
}
|
||||
|
||||
Section(header: SettingsViewHeaders.AddAccountHeader($showAddAccountView)) {
|
||||
SettingsViewRows.ActiveAccounts
|
||||
}
|
||||
|
||||
Section("Extensions") {
|
||||
Section(footer: Text("Add, delete, or disable accounts and extensions.")) {
|
||||
SettingsViewRows.AddAccount
|
||||
SettingsViewRows.AddExtension
|
||||
}
|
||||
|
||||
Section("Subscriptions") {
|
||||
SettingsViewRows.ImportSubscription
|
||||
SettingsViewRows.ExportSubscription
|
||||
}
|
||||
|
||||
Section("Timeline") {
|
||||
SettingsViewRows.SortOldestToNewest($appDefaults.timelineSortDirectionBool)
|
||||
SettingsViewRows.GroupByFeed($appDefaults.timelineGroupByFeed)
|
||||
SettingsViewRows.RefreshToClearReadArticles($appDefaults.refreshClearsReadArticles)
|
||||
SettingsViewRows.TimelineLayout
|
||||
}
|
||||
|
||||
Section("Articles") {
|
||||
SettingsViewRows.ThemeSelection
|
||||
SettingsViewRows.ConfirmMarkAllAsRead($appDefaults.confirmMarkAllAsRead)
|
||||
SettingsViewRows.OpenLinksInNetNewsWire($appDefaults.useSystemBrowser)
|
||||
SettingsViewRows.EnableFullScreenArticles($appDefaults.articleFullscreenEnabled)
|
||||
}
|
||||
|
||||
Section("Appearance") {
|
||||
Section(footer: Text("Configure the look and feel of NetNewsWire.")) {
|
||||
SettingsViewRows.ConfigureNewArticleNotifications
|
||||
SettingsViewRows.ConfigureAppearance
|
||||
}
|
||||
|
||||
Section("Help") {
|
||||
|
||||
|
||||
Section {
|
||||
ForEach(0..<HelpSheet.allCases.count, id: \.self) { i in
|
||||
SettingsViewRows.ShowHelpSheet(sheet: HelpSheet.allCases[i], selectedSheet: $helpSheet, $showHelpSheet)
|
||||
}
|
||||
SettingsViewRows.AboutNetNewsWire
|
||||
|
||||
}
|
||||
}
|
||||
.tint(Color(uiColor: AppAssets.primaryAccentColor))
|
||||
@@ -71,6 +56,9 @@ struct SettingsView: View {
|
||||
.sheet(isPresented: $showHelpSheet) {
|
||||
SafariView(url: helpSheet.url)
|
||||
}
|
||||
.sheet(isPresented: $showAbout) {
|
||||
AboutView()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user