mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 08:17:16 +00:00
💄 Add `MainFeedCollectionViewController` 💄 Add and hook up UICollectionView in Storyboard 🚧 Collection view loads temp cells 🚧 UICollectionView - Adds capsule shape for iPad selection - Add filter button, newItem button, settings button - Configures the collection view based on platform - implementsDidSelectItem at - Clears cell background on iPad - Adds cell textColor for iPad - Storyboard changes 🚧 Adds unread count and favicon support 🚧 Smartfeed icons now display 🚧 iPhone cells are consistent in light/dark mode 💄 Sidebar modernised Known bug: Sidebar text doesn’t adapt to dark/light mode changes on iPad 💄 Modern Sidebars Fixes some accessibilty issues and adds swipe actions. 🩹 Become firstResponder 🩹 Workaround #4691 💡 Remove print statement 💄 Fixes to storyboard - adjusts constraints on timeline header view - launch screens now adopt look of liquid glass Restore coordinator behaviour ⚡️ Tweaks to MainFeedCollectionViewController - On iPhone, returning to the feeds view deselect the current feed with an animation. - On iPhone, prefers large titles defaults to `false` - Capsule background with smaller corner radius for iPhone added for selected status. 🩹 Fixes folder height 💄 Fix unread count vertical alignment 💄 Restores header & use UICellConfigurationState 💄 Sidebar tweaks 💄 Folders now highlight on as drop target 💄 Sidebar fixes - Moves more code to cell configuation state - Allows sidebar to move to larger sizes 🩹 Fixes #4694 folder expansion using keyboard 💄 Adds new cell types for the Timeline ♻️ Remove dead code and re-orders to viewWillApp 🩹 Reordering of code from viewWA to viewDA 💄 Removes unused code, tweaks layout 💄 Multiple tweaks to sidebar and timeline 💄 Add missing constraint ♿️ Puts timeline metadata in a stackview 🎨 Adds stackview function 💄 🚑️ Moves to modern UISliders Timeline customiser now uses modern UISliders as they have tickmark functionality. `TickMarkSlider` marked as deprecated. 💄 Make All Unread cell icon tint correctly 💄 Extend edges under opaque bars on timeline 💄 Image View Controller uses modern button style 🚚 Renames `MainTimelinePseudoFeedCell` 💄 Improve feed selection animations 🩹 Use shouldSelectItem to handle selection logic 🩹 Fix fill settings for stack view 💄 Comment out usage of MainTimelineTitleView 🔧 Remove iOS cells from macOS target 💄 Give columns some flexibility 💄 Fix chevron size and alignment 💄 Don’t prefer large navigation bar titles They create a delay in animation on iPhone. 🩹 Fixes nav bar subtitle performance 🎨 Minor refactor - Switch logic in cell state - Prefer traitCollection.userInterfaceIdiom ➕ Add updated mac code for the About view 💄 NSGlassVisualEffectView for About
288 lines
7.4 KiB
Swift
288 lines
7.4 KiB
Swift
//
|
|
// AppAssets.swift
|
|
// NetNewsWire
|
|
//
|
|
// Created by Maurice Parker on 4/8/19.
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
//
|
|
import UIKit
|
|
import RSCore
|
|
import Account
|
|
|
|
struct AppAssets {
|
|
|
|
static var accountBazQuxImage: UIImage = {
|
|
return UIImage(named: "accountBazQux")!
|
|
}()
|
|
|
|
static var accountCloudKitImage: UIImage = {
|
|
return UIImage(named: "accountCloudKit")!
|
|
}()
|
|
|
|
static var accountFeedbinImage: UIImage = {
|
|
return UIImage(named: "accountFeedbin")!
|
|
}()
|
|
|
|
static var accountFeedlyImage: UIImage = {
|
|
return UIImage(named: "accountFeedly")!
|
|
}()
|
|
|
|
static var accountFreshRSSImage: UIImage = {
|
|
return UIImage(named: "accountFreshRSS")!
|
|
}()
|
|
|
|
static var accountInoreaderImage: UIImage = {
|
|
return UIImage(named: "accountInoreader")!
|
|
}()
|
|
|
|
static var accountLocalPadImage: UIImage = {
|
|
return UIImage(named: "accountLocalPad")!
|
|
}()
|
|
|
|
static var accountLocalPhoneImage: UIImage = {
|
|
return UIImage(named: "accountLocalPhone")!
|
|
}()
|
|
|
|
static var accountNewsBlurImage: UIImage = {
|
|
return UIImage(named: "accountNewsBlur")!
|
|
}()
|
|
|
|
static var accountTheOldReaderImage: UIImage = {
|
|
return UIImage(named: "accountTheOldReader")!
|
|
}()
|
|
|
|
static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")!
|
|
|
|
static var articleExtractorError: UIImage = {
|
|
return UIImage(named: "articleExtractorError")!
|
|
}()
|
|
|
|
static var articleExtractorOff: UIImage = {
|
|
return UIImage(named: "articleExtractorOff")!
|
|
}()
|
|
|
|
static var articleExtractorOffSF: UIImage = {
|
|
return UIImage(systemName: "doc.plaintext")!
|
|
}()
|
|
|
|
static var articleExtractorOffTinted: UIImage = {
|
|
let image = UIImage(named: "articleExtractorOff")!
|
|
return image.tinted(color: AppAssets.primaryAccentColor)!
|
|
}()
|
|
|
|
static var articleExtractorOn: UIImage = {
|
|
return UIImage(named: "articleExtractorOn")!
|
|
}()
|
|
|
|
static var articleExtractorOnSF: UIImage = {
|
|
return UIImage(named: "articleExtractorOnSF")!
|
|
}()
|
|
|
|
static var articleExtractorOnTinted: UIImage = {
|
|
let image = UIImage(named: "articleExtractorOn")!
|
|
return image.tinted(color: AppAssets.primaryAccentColor)!
|
|
}()
|
|
|
|
static var iconBackgroundColor: UIColor = {
|
|
return UIColor(named: "iconBackgroundColor")!
|
|
}()
|
|
|
|
static var circleClosedImage: UIImage = {
|
|
return UIImage(systemName: "largecircle.fill.circle")!
|
|
}()
|
|
|
|
static var circleOpenImage: UIImage = {
|
|
return UIImage(systemName: "circle")!
|
|
}()
|
|
|
|
static var disclosureImage: UIImage = {
|
|
return UIImage(named: "disclosure")!
|
|
}()
|
|
|
|
static var copyImage: UIImage = {
|
|
return UIImage(systemName: "doc.on.doc")!
|
|
}()
|
|
|
|
static var deactivateImage: UIImage = {
|
|
UIImage(systemName: "minus.circle")!
|
|
}()
|
|
|
|
static var editImage: UIImage = {
|
|
UIImage(systemName: "square.and.pencil")!
|
|
}()
|
|
|
|
static var faviconTemplateImage: RSImage = {
|
|
return RSImage(named: "faviconTemplateImage")!
|
|
}()
|
|
|
|
static var filterImage: UIImage = {
|
|
UIImage(systemName: "line.3.horizontal.decrease")!
|
|
}()
|
|
|
|
static var folderOutlinePlus: UIImage = {
|
|
UIImage(systemName: "folder.badge.plus")!
|
|
}()
|
|
|
|
static var fullScreenBackgroundColor: UIColor = {
|
|
return UIColor(named: "fullScreenBackgroundColor")!
|
|
}()
|
|
|
|
static var infoImage: UIImage = {
|
|
UIImage(systemName: "info.circle")!
|
|
}()
|
|
|
|
static var markAllAsReadImage: UIImage = {
|
|
return UIImage(named: "markAllAsRead")!
|
|
}()
|
|
|
|
static var markBelowAsReadImage: UIImage = {
|
|
return UIImage(systemName: "arrowtriangle.down.circle")!
|
|
}()
|
|
|
|
static var markAboveAsReadImage: UIImage = {
|
|
return UIImage(systemName: "arrowtriangle.up.circle")!
|
|
}()
|
|
|
|
static var mainFolderImage: IconImage = {
|
|
return IconImage(UIImage(systemName: "folder")!, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
|
|
}()
|
|
|
|
static var mainFolderImageNonIcon: UIImage = {
|
|
return UIImage(systemName: "folder")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
|
|
}()
|
|
|
|
static var moreImage: UIImage = {
|
|
return UIImage(systemName: "ellipsis.circle")!
|
|
}()
|
|
|
|
static var nextArticleImage: UIImage = {
|
|
return UIImage(systemName: "chevron.down")!
|
|
}()
|
|
|
|
static var nextUnreadArticleImage: UIImage = {
|
|
return UIImage(systemName: "chevron.down.circle")!
|
|
}()
|
|
|
|
static var plus: UIImage = {
|
|
UIImage(systemName: "plus")!
|
|
}()
|
|
|
|
static var prevArticleImage: UIImage = {
|
|
return UIImage(systemName: "chevron.up")!
|
|
}()
|
|
|
|
static var openInSidebarImage: UIImage = {
|
|
return UIImage(systemName: "arrow.turn.down.left")!
|
|
}()
|
|
|
|
static var primaryAccentColor: UIColor {
|
|
return UIColor(named: "primaryAccentColor")!
|
|
}
|
|
|
|
static var safariImage: UIImage = {
|
|
return UIImage(systemName: "safari")!
|
|
}()
|
|
|
|
static var searchFeedImage: IconImage = {
|
|
return IconImage(UIImage(systemName: "magnifyingglass")!, isSymbol: true)
|
|
}()
|
|
|
|
static var secondaryAccentColor: UIColor {
|
|
return UIColor(named: "secondaryAccentColor")!
|
|
}
|
|
|
|
static var sectionHeaderColor: UIColor = {
|
|
return UIColor(named: "sectionHeaderColor")!
|
|
}()
|
|
|
|
static var shareImage: UIImage = {
|
|
return UIImage(systemName: "square.and.arrow.up")!
|
|
}()
|
|
|
|
static var smartFeedImage: UIImage = {
|
|
return UIImage(systemName: "gear")!
|
|
}()
|
|
|
|
static var starColor: UIColor = {
|
|
return UIColor(named: "starColor")!
|
|
}()
|
|
|
|
static var starClosedImage: UIImage = {
|
|
return UIImage(systemName: "star.fill")!
|
|
}()
|
|
|
|
static var starOpenImage: UIImage = {
|
|
return UIImage(systemName: "star")!
|
|
}()
|
|
|
|
static var starredFeedImage: IconImage {
|
|
let image = UIImage(systemName: "star.fill")!
|
|
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.starColor.cgColor)
|
|
}
|
|
|
|
static var tickMarkColor: UIColor = {
|
|
return UIColor(named: "tickMarkColor")!
|
|
}()
|
|
|
|
static var timelineStarImage: UIImage = {
|
|
let image = UIImage(systemName: "star.fill")!
|
|
return image.withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal)
|
|
}()
|
|
|
|
static var todayFeedImage: IconImage {
|
|
let image = UIImage(systemName: "sun.max.fill")!
|
|
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: UIColor.systemOrange.cgColor)
|
|
}
|
|
|
|
static var trashImage: UIImage = {
|
|
return UIImage(systemName: "trash")!
|
|
}()
|
|
|
|
static var unreadCellIndicatorImage: IconImage {
|
|
let image = UIImage(systemName: "circle.fill")!
|
|
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
|
|
}
|
|
|
|
static var unreadFeedImage: IconImage {
|
|
let image = UIImage(systemName: "largecircle.fill.circle")!
|
|
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
|
|
}
|
|
|
|
static var vibrantTextColor: UIColor = {
|
|
return UIColor(named: "vibrantTextColor")!
|
|
}()
|
|
|
|
static var controlBackgroundColor: UIColor = {
|
|
return UIColor(named: "controlBackgroundColor")!
|
|
}()
|
|
|
|
|
|
static func image(for accountType: AccountType) -> UIImage? {
|
|
switch accountType {
|
|
case .onMyMac:
|
|
if UIDevice.current.userInterfaceIdiom == .pad {
|
|
return AppAssets.accountLocalPadImage
|
|
} else {
|
|
return AppAssets.accountLocalPhoneImage
|
|
}
|
|
case .cloudKit:
|
|
return AppAssets.accountCloudKitImage
|
|
case .feedbin:
|
|
return AppAssets.accountFeedbinImage
|
|
case .feedly:
|
|
return AppAssets.accountFeedlyImage
|
|
case .freshRSS:
|
|
return AppAssets.accountFreshRSSImage
|
|
case .newsBlur:
|
|
return AppAssets.accountNewsBlurImage
|
|
case .inoreader:
|
|
return AppAssets.accountInoreaderImage
|
|
case .bazQux:
|
|
return AppAssets.accountBazQuxImage
|
|
case .theOldReader:
|
|
return AppAssets.accountTheOldReaderImage
|
|
}
|
|
}
|
|
|
|
}
|