diff --git a/Multiplatform/Shared/Add/AddWebFeedViewModel.swift b/Multiplatform/Shared/Add/AddWebFeedModel.swift similarity index 97% rename from Multiplatform/Shared/Add/AddWebFeedViewModel.swift rename to Multiplatform/Shared/Add/AddWebFeedModel.swift index a8f7a5280..1520d312e 100644 --- a/Multiplatform/Shared/Add/AddWebFeedViewModel.swift +++ b/Multiplatform/Shared/Add/AddWebFeedModel.swift @@ -1,5 +1,5 @@ // -// AddWebFeedViewModel.swift +// AddWebFeedModel.swift // NetNewsWire // // Created by Stuart Breckenridge on 4/7/20. @@ -30,7 +30,7 @@ enum AddWebFeedError: LocalizedError { } -class AddWebFeedViewModel: ObservableObject { +class AddWebFeedModel: ObservableObject { @Published var shouldDismiss: Bool = false @Published var providedURL: String = "" diff --git a/Multiplatform/Shared/Add/AddWebFeedView.swift b/Multiplatform/Shared/Add/AddWebFeedView.swift index 9e205ae8c..5741e6e1b 100644 --- a/Multiplatform/Shared/Add/AddWebFeedView.swift +++ b/Multiplatform/Shared/Add/AddWebFeedView.swift @@ -14,7 +14,7 @@ import RSCore struct AddWebFeedView: View { @Environment(\.presentationMode) private var presentationMode - @ObservedObject private var viewModel = AddWebFeedViewModel() + @ObservedObject private var viewModel = AddWebFeedModel() @ViewBuilder var body: some View { #if os(iOS) diff --git a/Multiplatform/Shared/AppAssets.swift b/Multiplatform/Shared/AppAssets.swift index b6930bb34..3ca181288 100644 --- a/Multiplatform/Shared/AppAssets.swift +++ b/Multiplatform/Shared/AppAssets.swift @@ -13,70 +13,102 @@ import Account struct AppAssets { static var accountLocalMacImage: RSImage! = { - return RSImage(named: "accountLocalMac") + return RSImage(named: "AccountLocalMac") }() static var accountLocalPadImage: RSImage = { - return RSImage(named: "accountLocalPad")! + return RSImage(named: "AccountLocalPad")! }() static var accountLocalPhoneImage: RSImage = { - return RSImage(named: "accountLocalPhone")! + return RSImage(named: "AccountLocalPhone")! }() static var accountCloudKitImage: RSImage = { - return RSImage(named: "accountCloudKit")! + return RSImage(named: "AccountCloudKit")! }() static var accountFeedbinImage: RSImage = { - return RSImage(named: "accountFeedbin")! + return RSImage(named: "AccountFeedbin")! }() static var accountFeedlyImage: RSImage = { - return RSImage(named: "accountFeedly")! + return RSImage(named: "AccountFeedly")! }() static var accountFeedWranglerImage: RSImage = { - return RSImage(named: "accountFeedWrangler")! + return RSImage(named: "AccountFeedWrangler")! }() static var accountFreshRSSImage: RSImage = { - return RSImage(named: "accountFreshRSS")! + return RSImage(named: "AccountFreshRSS")! }() static var accountNewsBlurImage: RSImage = { - return RSImage(named: "accountNewsBlur")! + return RSImage(named: "AccountNewsBlur")! }() + static var addMenuImage: Image = { + return Image(systemName: "plus") + }() + static var extensionPointMarsEdit: RSImage = { - return RSImage(named: "extensionPointMarsEdit")! + return RSImage(named: "ExtensionPointMarsEdit")! }() static var extensionPointMicroblog: RSImage = { - return RSImage(named: "extensionPointMicroblog")! + return RSImage(named: "ExtensionPointMicroblog")! }() static var extensionPointReddit: RSImage = { - return RSImage(named: "extensionPointReddit")! + return RSImage(named: "ExtensionPointReddit")! }() static var extensionPointTwitter: RSImage = { - return RSImage(named: "extensionPointTwitter")! + return RSImage(named: "ExtensionPointTwitter")! }() static var faviconTemplateImage: RSImage = { - return RSImage(named: "faviconTemplateImage")! + return RSImage(named: "FaviconTemplateImage")! }() - static var masterFolderImage: IconImage = { + static var settingsImage: Image = { + return Image(systemName: "gear") + }() + + static var masterFolderImage: IconImage { #if os(macOS) - return IconImage(NSImage(systemSymbolName: "folder.fill", accessibilityDescription: nil)!) + let image = NSImage(systemSymbolName: "folder.fill", accessibilityDescription: nil)! + let coloredImage = image.tinted(with: NSColor(named: "AccentColor")!) + return IconImage(coloredImage) #endif #if os(iOS) - return IconImage(UIImage(systemName: "folder.fill")!) + let image = UIImage(systemName: "folder.fill")! + let coloredImage = image.tinted(color: UIColor(named: "AccentColor")!)! + return IconImage(coloredImage) #endif + } + + static var markAllAsReadImage: Image = { + return Image("MarkAllAsRead") }() + static var markAllAsReadImagePDF: Image = { + return Image("MarkAllAsReadPDF") + }() + + static var nextUnreadArticleImage: Image = { + return Image(systemName: "chevron.down.circle") + }() + + static var openInBrowserImage: Image = { + return Image(systemName: "safari") + }() + + static var refreshImage: Image = { + return Image(systemName: "arrow.clockwise") + }() + static var searchFeedImage: IconImage = { #if os(macOS) return IconImage(NSImage(systemSymbolName: "magnifyingglass", accessibilityDescription: nil)!) @@ -86,6 +118,18 @@ struct AppAssets { #endif }() + static var sidebarUnreadCountBackground: Color = { + return Color("SidebarUnreadCountBackground") + }() + + static var sidebarUnreadCountForeground: Color = { + return Color("SidebarUnreadCountForeground") + }() + + static var shareImage: Image = { + Image(systemName: "square.and.arrow.up") + }() + static var smartFeedImage: RSImage = { #if os(macOS) return NSImage(systemSymbolName: "gear", accessibilityDescription: nil)! @@ -97,40 +141,76 @@ struct AppAssets { static var starredFeedImage: IconImage = { #if os(macOS) - return IconImage(NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!) + let image = NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)! + let coloredImage = image.tinted(with: NSColor(named: "StarColor")!) + return IconImage(coloredImage) #endif #if os(iOS) - return IconImage(UIImage(systemName: "star.fill")!) + let image = UIImage(systemName: "star.fill")! + let coloredImage = image.tinted(color: UIColor(named: "StarColor")!)! + return IconImage(coloredImage) #endif }() static var timelineStarred: Image = { - return Image(systemName: "star.fill") - + #if os(macOS) + let image = NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)! + let coloredImage = image.tinted(with: NSColor(named: "StarColor")!) + return Image(nsImage: coloredImage) + #endif + #if os(iOS) + let image = UIImage(systemName: "star.fill")! + let coloredImage = image.tinted(color: UIColor(named: "StarColor")!)! + return Image(uiImage: coloredImage) + #endif }() - static var timelineUnread: Image = { - return Image(systemName: "circle.fill") - - }() + static var timelineUnread: Image { + #if os(macOS) + let image = NSImage(systemSymbolName: "circle.fill", accessibilityDescription: nil)! + let coloredImage = image.tinted(with: NSColor(named: "AccentColor")!) + return Image(nsImage: coloredImage) + #endif + #if os(iOS) + let image = UIImage(systemName: "circle.fill")! + let coloredImage = image.tinted(color: UIColor(named: "AccentColor")!)! + return Image(uiImage: coloredImage) + #endif + } static var todayFeedImage: IconImage = { #if os(macOS) - return IconImage(NSImage(systemSymbolName: "sun.max.fill", accessibilityDescription: nil)!) + let image = NSImage(systemSymbolName: "sun.max.fill", accessibilityDescription: nil)! + let coloredImage = image.tinted(with: .orange) + return IconImage(coloredImage) #endif #if os(iOS) - return IconImage(UIImage(systemName: "sun.max.fill")!) + let image = UIImage(systemName: "sun.max.fill")! + let coloredImage = image.tinted(color: .orange)! + return IconImage(coloredImage) #endif }() - - static var unreadFeedImage: IconImage = { + + static var toggleStarred: Image = { + return Image(systemName: "star.fill") + }() + + static var toggleRead: Image = { + return Image(systemName: "largecircle.fill.circle") + }() + + static var unreadFeedImage: IconImage { #if os(macOS) - return IconImage(NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!) + let image = NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)! + let coloredImage = image.tinted(with: NSColor(named: "AccentColor")!) + return IconImage(coloredImage) #endif #if os(iOS) - return IconImage(UIImage(systemName: "largecircle.fill.circle")!) + let image = UIImage(systemName: "largecircle.fill.circle")! + let coloredImage = image.tinted(color: UIColor(named: "AccentColor")!)! + return IconImage(coloredImage) #endif - }() + } static func image(for accountType: AccountType) -> RSImage? { switch accountType { diff --git a/Multiplatform/Shared/Assets.xcassets/AccentColor.colorset/Contents.json b/Multiplatform/Shared/Assets.xcassets/AccentColor.colorset/Contents.json index bf3d625ad..4f1440c52 100644 --- a/Multiplatform/Shared/Assets.xcassets/AccentColor.colorset/Contents.json +++ b/Multiplatform/Shared/Assets.xcassets/AccentColor.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.945", - "green" : "0.502", - "red" : "0.176" + "blue" : "0.957", + "green" : "0.620", + "red" : "0.369" } }, "idiom" : "universal" diff --git a/Multiplatform/Shared/Assets.xcassets/MarkAllAsReadPDF.imageset/Contents.json b/Multiplatform/Shared/Assets.xcassets/MarkAllAsReadPDF.imageset/Contents.json new file mode 100644 index 000000000..f23296bcc --- /dev/null +++ b/Multiplatform/Shared/Assets.xcassets/MarkAllAsReadPDF.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "filename" : "MarkAllAsReadPDF.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" + } +} diff --git a/Multiplatform/Shared/Assets.xcassets/MarkAllAsReadPDF.imageset/MarkAllAsReadPDF.pdf b/Multiplatform/Shared/Assets.xcassets/MarkAllAsReadPDF.imageset/MarkAllAsReadPDF.pdf new file mode 100644 index 000000000..e2a044d56 Binary files /dev/null and b/Multiplatform/Shared/Assets.xcassets/MarkAllAsReadPDF.imageset/MarkAllAsReadPDF.pdf differ diff --git a/Multiplatform/Shared/Assets.xcassets/SidebarUnreadCountBackground.colorset/Contents.json b/Multiplatform/Shared/Assets.xcassets/SidebarUnreadCountBackground.colorset/Contents.json new file mode 100644 index 000000000..ceb10be63 --- /dev/null +++ b/Multiplatform/Shared/Assets.xcassets/SidebarUnreadCountBackground.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.500", + "blue" : "0.000", + "green" : "0.000", + "red" : "0.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Multiplatform/Shared/Assets.xcassets/SidebarUnreadCountForeground.colorset/Contents.json b/Multiplatform/Shared/Assets.xcassets/SidebarUnreadCountForeground.colorset/Contents.json new file mode 100644 index 000000000..91ae93460 --- /dev/null +++ b/Multiplatform/Shared/Assets.xcassets/SidebarUnreadCountForeground.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.900", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Multiplatform/Shared/Assets.xcassets/StarColor.colorset/Contents.json b/Multiplatform/Shared/Assets.xcassets/StarColor.colorset/Contents.json new file mode 100644 index 000000000..c464941a7 --- /dev/null +++ b/Multiplatform/Shared/Assets.xcassets/StarColor.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.204", + "green" : "0.776", + "red" : "0.976" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg b/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg index 58170a6ba..10e23abd9 100644 --- a/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg +++ b/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg @@ -1,7 +1,7 @@ - - Untitled + + markAllAsRead Created with Sketch. @@ -136,6 +136,11 @@ + + + + + diff --git a/Multiplatform/Shared/MainApp.swift b/Multiplatform/Shared/MainApp.swift index 3bd88b9ac..1be5b3720 100644 --- a/Multiplatform/Shared/MainApp.swift +++ b/Multiplatform/Shared/MainApp.swift @@ -34,61 +34,65 @@ struct MainApp: App { } .toolbar { - ToolbarItem { - Button(action: { showSheet = true }, label: { - Image(systemName: "plus").foregroundColor(.secondary) - }).help("Add Feed") + ToolbarItem() { + Menu { + Button("Add Web Feed", action: { showSheet = true }) + Button("Add Reddit Feed", action: { }) + Button("Add Twitter Feed", action: { }) + Button("Add Folder", action: { }) + } label : { + AppAssets.addMenuImage + } } ToolbarItem { Button(action: {}, label: { - Image(systemName: "folder.fill.badge.plus").foregroundColor(.pink) - }).help("New Folder") - } - - ToolbarItem { - Button(action: {}, label: { - Image(systemName: "arrow.clockwise").foregroundColor(.secondary) + AppAssets.refreshImage }).help("Refresh").padding(.trailing, 40) } - + ToolbarItem { Button(action: {}, label: { - Image(systemName: "circle.dashed").foregroundColor(.orange) + AppAssets.markAllAsReadImagePDF + .resizable() + .scaledToFit() + .frame(width: 20, height: 20, alignment: .center) }).help("Mark All as Read") } ToolbarItem { - Button(action: {}, label: { - Image(systemName: "arrow.triangle.turn.up.right.circle.fill").foregroundColor(.purple) - }).help("Go to Next Unread") + MacSearchField() + .frame(width: 200) } - + ToolbarItem { Button(action: {}, label: { - Image(systemName: "star.fill").foregroundColor(.yellow) + AppAssets.nextUnreadArticleImage + }).help("Go to Next Unread").padding(.trailing, 40) + } + + ToolbarItem { + Button(action: {}, label: { + AppAssets.toggleStarred }).help("Mark as Starred") } ToolbarItem { Button(action: {}, label: { - Image(systemName: "checkmark.circle.fill").foregroundColor(.green) + AppAssets.toggleRead }).help("Mark as Unread") } ToolbarItem { Button(action: {}, label: { - Image(systemName: "safari").foregroundColor(.blue) + AppAssets.openInBrowserImage }).help("Open in Browser") } ToolbarItem { Button(action: {}, label: { - Image(systemName: "square.and.arrow.up") + AppAssets.shareImage }).help("Share") } - ToolbarItem { - MacSearchField() - .frame(width: 300) - } + } } .commands { @@ -199,20 +203,3 @@ struct MainApp: App { #endif } } - -struct PreferredColorSchemeModifier: ViewModifier { - - var preferredColorScheme: UserInterfaceColorPalette - - @ViewBuilder - func body(content: Content) -> some View { - switch preferredColorScheme { - case .automatic: - content - case .dark: - content.preferredColorScheme(.dark) - case .light: - content.preferredColorScheme(.light) - } - } -} diff --git a/Multiplatform/Shared/Sidebar/SidebarToolbar.swift b/Multiplatform/Shared/Sidebar/SidebarToolbar.swift index 9aec8c5c8..90d4a7e39 100644 --- a/Multiplatform/Shared/Sidebar/SidebarToolbar.swift +++ b/Multiplatform/Shared/Sidebar/SidebarToolbar.swift @@ -22,19 +22,14 @@ fileprivate class SidebarToolbarViewModel: ObservableObject { } @Published var showActionSheet: Bool = false @Published var showAddSheet: Bool = false + } - struct SidebarToolbar: View { @EnvironmentObject private var appSettings: AppDefaults @StateObject private var viewModel = SidebarToolbarViewModel() - - var addActionSheetButtons = [ - Button(action: {}, label: { Text("Add Feed") }) - ] - var body: some View { VStack { Divider() @@ -42,7 +37,7 @@ struct SidebarToolbar: View { Button(action: { viewModel.sheetToShow = .settings }, label: { - Image(systemName: "gear") + AppAssets.settingsImage .font(.title3) .foregroundColor(.accentColor) }).help("Settings") @@ -58,7 +53,7 @@ struct SidebarToolbar: View { Button(action: { viewModel.showActionSheet = true }, label: { - Image(systemName: "plus") + AppAssets.addMenuImage .font(.title3) .foregroundColor(.accentColor) }) diff --git a/Multiplatform/Shared/Sidebar/UnreadCountView.swift b/Multiplatform/Shared/Sidebar/UnreadCountView.swift index f1c760bfd..72cf9d5ec 100644 --- a/Multiplatform/Shared/Sidebar/UnreadCountView.swift +++ b/Multiplatform/Shared/Sidebar/UnreadCountView.swift @@ -14,10 +14,12 @@ struct UnreadCountView: View { var body: some View { Text(verbatim: String(count)) - .font(.footnote) + .font(.caption) + .fontWeight(.bold) .padding(.horizontal, 7) .padding(.vertical, 1) - .background(SwiftUI.Color.gray.opacity(0.5)) + .background(AppAssets.sidebarUnreadCountBackground) + .foregroundColor(AppAssets.sidebarUnreadCountForeground) .cornerRadius(8) } } diff --git a/Multiplatform/Shared/SwiftUI Extensions/PreferredColorSchemeModifier.swift b/Multiplatform/Shared/SwiftUI Extensions/PreferredColorSchemeModifier.swift new file mode 100644 index 000000000..ba9a04d36 --- /dev/null +++ b/Multiplatform/Shared/SwiftUI Extensions/PreferredColorSchemeModifier.swift @@ -0,0 +1,27 @@ +// +// PreferredColorSchemeModifier.swift +// NetNewsWire +// +// Created by Maurice Parker on 7/3/20. +// Copyright © 2020 Ranchero Software. All rights reserved. +// + +import SwiftUI + +struct PreferredColorSchemeModifier: ViewModifier { + + var preferredColorScheme: UserInterfaceColorPalette + + @ViewBuilder + func body(content: Content) -> some View { + switch preferredColorScheme { + case .automatic: + content.preferredColorScheme(nil) + case .dark: + content.preferredColorScheme(.dark) + case .light: + content.preferredColorScheme(.light) + } + } + +} diff --git a/Multiplatform/Shared/Timeline/TimelineItemStatusView.swift b/Multiplatform/Shared/Timeline/TimelineItemStatusView.swift index bef9ff233..0db428879 100644 --- a/Multiplatform/Shared/Timeline/TimelineItemStatusView.swift +++ b/Multiplatform/Shared/Timeline/TimelineItemStatusView.swift @@ -19,12 +19,10 @@ struct TimelineItemStatusView: View { .resizable() .frame(width: 8, height: 8, alignment: .center) .padding(.all, 2) - .foregroundColor(.accentColor) case .showStar: AppAssets.timelineStarred .resizable() .frame(width: 10, height: 10, alignment: .center) - .foregroundColor(.yellow) case .showNone: AppAssets.timelineUnread .resizable() diff --git a/Multiplatform/Shared/Timeline/TimelineItemView.swift b/Multiplatform/Shared/Timeline/TimelineItemView.swift index 1e1a25ae8..252ef97ac 100644 --- a/Multiplatform/Shared/Timeline/TimelineItemView.swift +++ b/Multiplatform/Shared/Timeline/TimelineItemView.swift @@ -14,7 +14,14 @@ struct TimelineItemView: View { @StateObject var articleIconImageLoader = ArticleIconImageLoader() var timelineItem: TimelineItem - + + #if os(macOS) + var verticalPadding: CGFloat = 10 + #endif + #if os(iOS) + var verticalPadding: CGFloat = 0 + #endif + var body: some View { VStack { HStack(alignment: .top) { @@ -46,6 +53,7 @@ struct TimelineItemView: View { } } } + .padding(.vertical, verticalPadding) .onAppear { articleIconImageLoader.loadImage(for: timelineItem.article) } diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index cdeb0d3eb..dfe9076e6 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -27,8 +27,8 @@ 17930ED524AF10EE00A9BA52 /* AddWebFeedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17930ED324AF10EE00A9BA52 /* AddWebFeedView.swift */; }; 179DB1DFBCF9177104B12E0F /* AccountsNewsBlurWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 179DBBA2B22A659F81EED6F9 /* AccountsNewsBlurWindowController.swift */; }; 179DB3CE822BFCC2D774D9F4 /* AccountsNewsBlurWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 179DBBA2B22A659F81EED6F9 /* AccountsNewsBlurWindowController.swift */; }; - 17D232A824AFF10A0005F075 /* AddWebFeedViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D232A724AFF10A0005F075 /* AddWebFeedViewModel.swift */; }; - 17D232A924AFF10A0005F075 /* AddWebFeedViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D232A724AFF10A0005F075 /* AddWebFeedViewModel.swift */; }; + 17D232A824AFF10A0005F075 /* AddWebFeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D232A724AFF10A0005F075 /* AddWebFeedModel.swift */; }; + 17D232A924AFF10A0005F075 /* AddWebFeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17D232A724AFF10A0005F075 /* AddWebFeedModel.swift */; }; 3B3A32A5238B820900314204 /* FeedWranglerAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B3A328B238B820900314204 /* FeedWranglerAccountViewController.swift */; }; 3B826DCB2385C84800FC1ADB /* AccountsFeedWrangler.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3B826DB02385C84800FC1ADB /* AccountsFeedWrangler.xib */; }; 3B826DCC2385C84800FC1ADB /* AccountsFeedWranglerWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B826DCA2385C84800FC1ADB /* AccountsFeedWranglerWindowController.swift */; }; @@ -220,6 +220,8 @@ 517A757A24451C0700B553B9 /* OAuthSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 517A755524451BD500B553B9 /* OAuthSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 517A757B24451C1500B553B9 /* OAuthSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 517A755324451BD500B553B9 /* OAuthSwift.framework */; }; 517A757C24451C1500B553B9 /* OAuthSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 517A755324451BD500B553B9 /* OAuthSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 5181C5AD24AF89B1002E0F70 /* PreferredColorSchemeModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5181C5AC24AF89B1002E0F70 /* PreferredColorSchemeModifier.swift */; }; + 5181C5AE24AF89B1002E0F70 /* PreferredColorSchemeModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5181C5AC24AF89B1002E0F70 /* PreferredColorSchemeModifier.swift */; }; 5183CCD0226E1E880010922C /* NonIntrinsicLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCCF226E1E880010922C /* NonIntrinsicLabel.swift */; }; 5183CCDA226E31A50010922C /* NonIntrinsicImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCD9226E31A50010922C /* NonIntrinsicImageView.swift */; }; 5183CCE5226F4DFA0010922C /* RefreshInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5183CCE4226F4DFA0010922C /* RefreshInterval.swift */; }; @@ -1728,7 +1730,7 @@ 17930ED324AF10EE00A9BA52 /* AddWebFeedView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddWebFeedView.swift; sourceTree = ""; }; 179DBBA2B22A659F81EED6F9 /* AccountsNewsBlurWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountsNewsBlurWindowController.swift; sourceTree = ""; }; 17B223DB24AC24D2001E4592 /* TimelineLayoutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineLayoutView.swift; sourceTree = ""; }; - 17D232A724AFF10A0005F075 /* AddWebFeedViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddWebFeedViewModel.swift; sourceTree = ""; }; + 17D232A724AFF10A0005F075 /* AddWebFeedModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddWebFeedModel.swift; sourceTree = ""; }; 3B3A328B238B820900314204 /* FeedWranglerAccountViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedWranglerAccountViewController.swift; sourceTree = ""; }; 3B826DB02385C84800FC1ADB /* AccountsFeedWrangler.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AccountsFeedWrangler.xib; sourceTree = ""; }; 3B826DCA2385C84800FC1ADB /* AccountsFeedWranglerWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountsFeedWranglerWindowController.swift; sourceTree = ""; }; @@ -1845,6 +1847,7 @@ 517630222336657E00E15FFF /* WebViewProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewProvider.swift; sourceTree = ""; }; 517A745A2443665000B553B9 /* UIPageViewController-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIPageViewController-Extensions.swift"; sourceTree = ""; }; 517A754424451BD500B553B9 /* OAuthSwift.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OAuthSwift.xcodeproj; path = submodules/OAuthSwift/OAuthSwift.xcodeproj; sourceTree = ""; }; + 5181C5AC24AF89B1002E0F70 /* PreferredColorSchemeModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferredColorSchemeModifier.swift; sourceTree = ""; }; 5183CCCF226E1E880010922C /* NonIntrinsicLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonIntrinsicLabel.swift; sourceTree = ""; }; 5183CCD9226E31A50010922C /* NonIntrinsicImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonIntrinsicImageView.swift; sourceTree = ""; }; 5183CCE4226F4DFA0010922C /* RefreshInterval.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RefreshInterval.swift; sourceTree = ""; }; @@ -2408,7 +2411,7 @@ 17930ED224AF10CD00A9BA52 /* Add */ = { isa = PBXGroup; children = ( - 17D232A724AFF10A0005F075 /* AddWebFeedViewModel.swift */, + 17D232A724AFF10A0005F075 /* AddWebFeedModel.swift */, 17930ED324AF10EE00A9BA52 /* AddWebFeedView.swift */, ); path = Add; @@ -2578,6 +2581,7 @@ isa = PBXGroup; children = ( 514E6C0524AD2B5F00AC6F6E /* Image-Extensions.swift */, + 5181C5AC24AF89B1002E0F70 /* PreferredColorSchemeModifier.swift */, ); path = "SwiftUI Extensions"; sourceTree = ""; @@ -3968,46 +3972,46 @@ TargetAttributes = { 51314636235A7BBE00387FDC = { CreatedOnToolsVersion = 11.2; - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; LastSwiftMigration = 1120; ProvisioningStyle = Automatic; }; 513C5CE5232571C2003D4054 = { CreatedOnToolsVersion = 11.0; - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; }; 518B2ED12351B3DD00400001 = { CreatedOnToolsVersion = 11.2; - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; TestTargetID = 840D617B2029031C009BC708; }; 51C0513C24A77DF800194D5E = { CreatedOnToolsVersion = 12.0; - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; }; 51C0514324A77DF800194D5E = { CreatedOnToolsVersion = 12.0; - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; }; 6581C73220CED60000F4AD34 = { - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; }; 65ED3FA2235DEF6C0081F399 = { - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; }; 65ED4090235DEF770081F399 = { - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; }; 840D617B2029031C009BC708 = { CreatedOnToolsVersion = 9.3; - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.BackgroundModes = { @@ -4017,7 +4021,7 @@ }; 849C645F1ED37A5D003D8FC0 = { CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.HardenedRuntime = { @@ -4027,7 +4031,7 @@ }; 849C64701ED37A5D003D8FC0 = { CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = FQLBNX3GP7; + DevelopmentTeam = SHJK2V3AJG; ProvisioningStyle = Automatic; TestTargetID = 849C645F1ED37A5D003D8FC0; }; @@ -4832,6 +4836,7 @@ 51E4996924A8760C00B667CB /* ArticleStylesManager.swift in Sources */, 51E498F324A8085D00B667CB /* PseudoFeed.swift in Sources */, 51A5769624AE617200078888 /* ArticleContainerView.swift in Sources */, + 5181C5AD24AF89B1002E0F70 /* PreferredColorSchemeModifier.swift in Sources */, 51E4996B24A8762D00B667CB /* ArticleExtractor.swift in Sources */, 51E49A0324A91FF600B667CB /* SceneNavigationView.swift in Sources */, 51E4990124A808BB00B667CB /* FaviconURLFinder.swift in Sources */, @@ -4840,7 +4845,7 @@ 51A576BE24AE637400078888 /* ArticleView.swift in Sources */, 51E4995324A8734D00B667CB /* RedditFeedProvider-Extensions.swift in Sources */, 172199C924AB228900A31D04 /* SettingsView.swift in Sources */, - 17D232A824AFF10A0005F075 /* AddWebFeedViewModel.swift in Sources */, + 17D232A824AFF10A0005F075 /* AddWebFeedModel.swift in Sources */, 51E4994224A8713C00B667CB /* ArticleStatusSyncTimer.swift in Sources */, 51E498F624A8085D00B667CB /* SearchFeedDelegate.swift in Sources */, 51E498F224A8085D00B667CB /* SmartFeedsController.swift in Sources */, @@ -4915,12 +4920,13 @@ 51E4992224A8095600B667CB /* URL-Extensions.swift in Sources */, 51E4990424A808C300B667CB /* WebFeedIconDownloader.swift in Sources */, 51E498CB24A8085D00B667CB /* TodayFeedDelegate.swift in Sources */, - 17D232A924AFF10A0005F075 /* AddWebFeedViewModel.swift in Sources */, + 17D232A924AFF10A0005F075 /* AddWebFeedModel.swift in Sources */, 51E4993324A867E700B667CB /* AppNotifications.swift in Sources */, 51E4990624A808C300B667CB /* ImageDownloader.swift in Sources */, 51E4994F24A8734C00B667CB /* TwitterFeedProvider-Extensions.swift in Sources */, 51E498CA24A8085D00B667CB /* SmartFeedDelegate.swift in Sources */, 51E4990524A808C300B667CB /* FeaturedImageDownloader.swift in Sources */, + 5181C5AE24AF89B1002E0F70 /* PreferredColorSchemeModifier.swift in Sources */, 51E4991624A8090300B667CB /* ArticleUtilities.swift in Sources */, 51919FF224AB864A00541E64 /* TimelineModel.swift in Sources */, 51E4991A24A8090F00B667CB /* IconImage.swift in Sources */, diff --git a/Shared/Extensions/NSAttributedString+NetNewsWire.swift b/Shared/Extensions/NSAttributedString+NetNewsWire.swift index 4037b2489..f778dfb75 100644 --- a/Shared/Extensions/NSAttributedString+NetNewsWire.swift +++ b/Shared/Extensions/NSAttributedString+NetNewsWire.swift @@ -12,7 +12,6 @@ import RSParser import AppKit typealias Font = NSFont typealias FontDescriptor = NSFontDescriptor -typealias Color = NSColor private let boldTrait = NSFontDescriptor.SymbolicTraits.bold private let italicTrait = NSFontDescriptor.SymbolicTraits.italic @@ -21,7 +20,6 @@ private let monoSpaceTrait = NSFontDescriptor.SymbolicTraits.monoSpace import UIKit typealias Font = UIFont typealias FontDescriptor = UIFontDescriptor -typealias Color = UIColor private let boldTrait = UIFontDescriptor.SymbolicTraits.traitBold private let italicTrait = UIFontDescriptor.SymbolicTraits.traitItalic diff --git a/iOS/Resources/Assets.xcassets/secondaryAccentColor.colorset/Contents.json b/iOS/Resources/Assets.xcassets/secondaryAccentColor.colorset/Contents.json index 750f4b573..b94873d3d 100644 --- a/iOS/Resources/Assets.xcassets/secondaryAccentColor.colorset/Contents.json +++ b/iOS/Resources/Assets.xcassets/secondaryAccentColor.colorset/Contents.json @@ -1,23 +1,18 @@ { - "info" : { - "version" : 1, - "author" : "xcode" - }, "colors" : [ { - "idiom" : "universal", "color" : { "color-space" : "srgb", "components" : { - "red" : "0x08", "alpha" : "1.000", "blue" : "0xEE", - "green" : "0x6A" + "green" : "0x6A", + "red" : "0x08" } - } + }, + "idiom" : "universal" }, { - "idiom" : "universal", "appearances" : [ { "appearance" : "luminosity", @@ -27,12 +22,17 @@ "color" : { "color-space" : "srgb", "components" : { - "red" : "0x5E", "alpha" : "1.000", "blue" : "0xF4", - "green" : "0x9E" + "green" : "0x9E", + "red" : "0x5E" } - } + }, + "idiom" : "universal" } - ] -} \ No newline at end of file + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS/Resources/Assets.xcassets/starColor.colorset/Contents.json b/iOS/Resources/Assets.xcassets/starColor.colorset/Contents.json index b1d4071d7..4811237e1 100644 --- a/iOS/Resources/Assets.xcassets/starColor.colorset/Contents.json +++ b/iOS/Resources/Assets.xcassets/starColor.colorset/Contents.json @@ -1,20 +1,20 @@ { - "info" : { - "version" : 1, - "author" : "xcode" - }, "colors" : [ { - "idiom" : "universal", "color" : { "color-space" : "srgb", "components" : { - "red" : "249", "alpha" : "1.000", "blue" : "52", - "green" : "198" + "green" : "198", + "red" : "249" } - } + }, + "idiom" : "universal" } - ] -} \ No newline at end of file + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +}