2019-04-15 15:03:05 -05:00
|
|
|
//
|
|
|
|
// AppAssets.swift
|
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 4/8/19.
|
|
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
import UIKit
|
|
|
|
import RSCore
|
2019-10-23 10:35:53 -05:00
|
|
|
import Account
|
2019-04-15 15:03:05 -05:00
|
|
|
|
|
|
|
struct AppAssets {
|
2019-11-02 19:57:01 -05:00
|
|
|
|
2020-10-24 14:30:59 -05:00
|
|
|
static var accountBazQuxImage: UIImage = {
|
|
|
|
return UIImage(named: "accountBazQux")!
|
2019-10-23 10:35:53 -05:00
|
|
|
}()
|
|
|
|
|
2020-03-28 17:51:14 -05:00
|
|
|
static var accountCloudKitImage: UIImage = {
|
|
|
|
return UIImage(named: "accountCloudKit")!
|
|
|
|
}()
|
|
|
|
|
2019-10-23 10:35:53 -05:00
|
|
|
static var accountFeedbinImage: UIImage = {
|
|
|
|
return UIImage(named: "accountFeedbin")!
|
|
|
|
}()
|
|
|
|
|
2019-11-10 18:04:21 -06:00
|
|
|
static var accountFeedlyImage: UIImage = {
|
|
|
|
return UIImage(named: "accountFeedly")!
|
|
|
|
}()
|
2019-11-25 00:26:03 -05:00
|
|
|
|
|
|
|
static var accountFeedWranglerImage: UIImage = {
|
|
|
|
return UIImage(named: "accountFeedWrangler")!
|
|
|
|
}()
|
2019-11-10 18:04:21 -06:00
|
|
|
|
2019-10-23 10:35:53 -05:00
|
|
|
static var accountFreshRSSImage: UIImage = {
|
|
|
|
return UIImage(named: "accountFreshRSS")!
|
|
|
|
}()
|
|
|
|
|
2020-10-24 14:30:59 -05:00
|
|
|
static var accountInoreaderImage: UIImage = {
|
|
|
|
return UIImage(named: "accountInoreader")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountLocalPadImage: UIImage = {
|
|
|
|
return UIImage(named: "accountLocalPad")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountLocalPhoneImage: UIImage = {
|
|
|
|
return UIImage(named: "accountLocalPhone")!
|
|
|
|
}()
|
|
|
|
|
2020-03-09 18:39:58 -04:00
|
|
|
static var accountNewsBlurImage: UIImage = {
|
|
|
|
return UIImage(named: "accountNewsBlur")!
|
|
|
|
}()
|
|
|
|
|
2020-10-24 14:30:59 -05:00
|
|
|
static var accountTheOldReaderImage: UIImage = {
|
|
|
|
return UIImage(named: "accountTheOldReader")!
|
|
|
|
}()
|
|
|
|
|
2019-09-24 16:34:11 -05:00
|
|
|
static var articleExtractorError: UIImage = {
|
2019-09-26 14:48:19 -05:00
|
|
|
return UIImage(named: "articleExtractorError")!
|
2019-09-24 16:34:11 -05:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorOff: UIImage = {
|
|
|
|
return UIImage(named: "articleExtractorOff")!
|
|
|
|
}()
|
|
|
|
|
2019-11-25 20:36:15 -06:00
|
|
|
static var articleExtractorOffSF: UIImage = {
|
2019-11-25 19:43:43 -06:00
|
|
|
return UIImage(systemName: "doc.plaintext")!
|
|
|
|
}()
|
|
|
|
|
2019-09-24 16:34:11 -05:00
|
|
|
static var articleExtractorOffTinted: UIImage = {
|
|
|
|
let image = UIImage(named: "articleExtractorOff")!
|
2020-01-26 22:32:18 -07:00
|
|
|
return image.tinted(color: AppAssets.primaryAccentColor)!
|
2019-09-24 16:34:11 -05:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorOn: UIImage = {
|
|
|
|
return UIImage(named: "articleExtractorOn")!
|
|
|
|
}()
|
|
|
|
|
2019-11-25 20:36:15 -06:00
|
|
|
static var articleExtractorOnSF: UIImage = {
|
|
|
|
return UIImage(named: "articleExtractorOnSF")!
|
2019-11-25 19:43:43 -06:00
|
|
|
}()
|
|
|
|
|
2019-09-24 16:34:11 -05:00
|
|
|
static var articleExtractorOnTinted: UIImage = {
|
|
|
|
let image = UIImage(named: "articleExtractorOn")!
|
2020-01-26 22:32:18 -07:00
|
|
|
return image.tinted(color: AppAssets.primaryAccentColor)!
|
2019-09-24 16:34:11 -05:00
|
|
|
}()
|
|
|
|
|
2019-11-05 18:05:57 -06:00
|
|
|
static var iconBackgroundColor: UIColor = {
|
|
|
|
return UIColor(named: "iconBackgroundColor")!
|
2019-06-20 11:58:26 -05:00
|
|
|
}()
|
2019-06-14 15:33:13 -05:00
|
|
|
|
2019-06-21 15:29:20 +08:00
|
|
|
static var circleClosedImage: UIImage = {
|
2019-09-17 20:26:49 -05:00
|
|
|
return UIImage(systemName: "largecircle.fill.circle")!
|
2019-04-15 15:03:05 -05:00
|
|
|
}()
|
|
|
|
|
2019-06-21 15:29:20 +08:00
|
|
|
static var circleOpenImage: UIImage = {
|
|
|
|
return UIImage(systemName: "circle")!
|
2019-04-15 15:03:05 -05:00
|
|
|
}()
|
|
|
|
|
2019-10-25 14:57:01 -05:00
|
|
|
static var disclosureImage: UIImage = {
|
|
|
|
return UIImage(named: "disclosure")!
|
2019-04-17 10:15:44 -05:00
|
|
|
}()
|
|
|
|
|
2019-08-16 13:27:41 -05:00
|
|
|
static var copyImage: UIImage = {
|
|
|
|
return UIImage(systemName: "doc.on.doc")!
|
|
|
|
}()
|
|
|
|
|
2019-10-23 20:22:31 -05:00
|
|
|
static var deactivateImage: UIImage = {
|
|
|
|
UIImage(systemName: "minus.circle")!
|
|
|
|
}()
|
|
|
|
|
2019-08-16 13:27:41 -05:00
|
|
|
static var editImage: UIImage = {
|
|
|
|
UIImage(systemName: "square.and.pencil")!
|
|
|
|
}()
|
|
|
|
|
2019-04-29 07:07:57 -05:00
|
|
|
static var faviconTemplateImage: RSImage = {
|
|
|
|
return RSImage(named: "faviconTemplateImage")!
|
|
|
|
}()
|
|
|
|
|
2019-11-21 15:55:50 -06:00
|
|
|
static var filterInactiveImage: UIImage = {
|
|
|
|
UIImage(systemName: "line.horizontal.3.decrease.circle")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var filterActiveImage: UIImage = {
|
|
|
|
UIImage(systemName: "line.horizontal.3.decrease.circle.fill")!
|
|
|
|
}()
|
|
|
|
|
2021-02-24 08:07:09 +08:00
|
|
|
static var folderOutlinePlus: UIImage = {
|
|
|
|
UIImage(systemName: "folder.badge.plus")!
|
|
|
|
}()
|
|
|
|
|
2019-10-16 20:53:49 -05:00
|
|
|
static var fullScreenBackgroundColor: UIColor = {
|
|
|
|
return UIColor(named: "fullScreenBackgroundColor")!
|
|
|
|
}()
|
|
|
|
|
2019-09-28 07:00:18 -05:00
|
|
|
static var infoImage: UIImage = {
|
|
|
|
UIImage(systemName: "info.circle")!
|
|
|
|
}()
|
|
|
|
|
2020-01-06 18:07:04 -07:00
|
|
|
static var markAllAsReadImage: UIImage = {
|
|
|
|
return UIImage(named: "markAllAsRead")!
|
2019-08-19 17:26:09 -05:00
|
|
|
}()
|
|
|
|
|
2020-01-03 08:16:55 +01:00
|
|
|
static var markBelowAsReadImage: UIImage = {
|
2019-08-18 17:34:53 -05:00
|
|
|
return UIImage(systemName: "arrowtriangle.down.circle")!
|
|
|
|
}()
|
|
|
|
|
2020-01-03 08:16:55 +01:00
|
|
|
static var markAboveAsReadImage: UIImage = {
|
2019-08-18 17:34:53 -05:00
|
|
|
return UIImage(systemName: "arrowtriangle.up.circle")!
|
|
|
|
}()
|
|
|
|
|
2019-11-05 18:05:57 -06:00
|
|
|
static var masterFolderImage: IconImage = {
|
2020-12-06 16:58:22 -06:00
|
|
|
return IconImage(UIImage(systemName: "folder.fill")!, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
|
2019-04-15 15:03:05 -05:00
|
|
|
}()
|
|
|
|
|
2021-02-01 08:25:34 +08:00
|
|
|
static var masterFolderImageNonIcon: UIImage = {
|
|
|
|
return UIImage(systemName: "folder.fill")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
|
|
|
|
}()
|
|
|
|
|
2019-08-19 15:45:52 -05:00
|
|
|
static var moreImage: UIImage = {
|
|
|
|
return UIImage(systemName: "ellipsis.circle")!
|
|
|
|
}()
|
|
|
|
|
2019-11-25 19:43:43 -06:00
|
|
|
static var nextArticleImage: UIImage = {
|
|
|
|
return UIImage(systemName: "chevron.down")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var nextUnreadArticleImage: UIImage = {
|
|
|
|
return UIImage(systemName: "chevron.down.circle")!
|
|
|
|
}()
|
|
|
|
|
2021-02-24 08:07:09 +08:00
|
|
|
static var plus: UIImage = {
|
|
|
|
UIImage(systemName: "plus")!
|
|
|
|
}()
|
|
|
|
|
2019-11-25 19:43:43 -06:00
|
|
|
static var prevArticleImage: UIImage = {
|
|
|
|
return UIImage(systemName: "chevron.up")!
|
|
|
|
}()
|
|
|
|
|
2019-08-19 15:45:52 -05:00
|
|
|
static var openInSidebarImage: UIImage = {
|
|
|
|
return UIImage(systemName: "arrow.turn.down.left")!
|
|
|
|
}()
|
|
|
|
|
2020-12-06 16:01:43 -06:00
|
|
|
static var primaryAccentColor: UIColor {
|
2019-09-18 02:49:57 -05:00
|
|
|
return UIColor(named: "primaryAccentColor")!
|
2020-12-06 16:01:43 -06:00
|
|
|
}
|
2019-09-18 02:49:57 -05:00
|
|
|
|
2019-08-16 13:27:41 -05:00
|
|
|
static var safariImage: UIImage = {
|
|
|
|
return UIImage(systemName: "safari")!
|
|
|
|
}()
|
|
|
|
|
2019-11-05 18:05:57 -06:00
|
|
|
static var searchFeedImage: IconImage = {
|
2020-10-24 18:15:59 -05:00
|
|
|
return IconImage(UIImage(systemName: "magnifyingglass")!, isSymbol: true)
|
2019-06-29 13:53:34 -05:00
|
|
|
}()
|
|
|
|
|
2020-12-06 16:01:43 -06:00
|
|
|
static var secondaryAccentColor: UIColor {
|
2019-09-18 02:49:57 -05:00
|
|
|
return UIColor(named: "secondaryAccentColor")!
|
2020-12-06 16:01:43 -06:00
|
|
|
}
|
2019-09-18 02:49:57 -05:00
|
|
|
|
2019-11-01 09:55:17 -05:00
|
|
|
static var sectionHeaderColor: UIColor = {
|
|
|
|
return UIColor(named: "sectionHeaderColor")!
|
|
|
|
}()
|
|
|
|
|
2019-08-19 18:09:38 -05:00
|
|
|
static var shareImage: UIImage = {
|
|
|
|
return UIImage(systemName: "square.and.arrow.up")!
|
|
|
|
}()
|
|
|
|
|
2019-06-21 15:29:20 +08:00
|
|
|
static var smartFeedImage: UIImage = {
|
2019-09-11 19:29:27 -05:00
|
|
|
return UIImage(systemName: "gear")!
|
2019-04-28 15:11:02 -05:00
|
|
|
}()
|
|
|
|
|
2019-04-15 15:03:05 -05:00
|
|
|
static var starColor: UIColor = {
|
|
|
|
return UIColor(named: "starColor")!
|
|
|
|
}()
|
|
|
|
|
2019-06-21 15:29:20 +08:00
|
|
|
static var starClosedImage: UIImage = {
|
|
|
|
return UIImage(systemName: "star.fill")!
|
2019-04-15 15:03:05 -05:00
|
|
|
}()
|
|
|
|
|
2019-06-21 15:29:20 +08:00
|
|
|
static var starOpenImage: UIImage = {
|
|
|
|
return UIImage(systemName: "star")!
|
2019-04-15 15:03:05 -05:00
|
|
|
}()
|
|
|
|
|
2020-12-06 16:01:43 -06:00
|
|
|
static var starredFeedImage: IconImage {
|
|
|
|
let image = UIImage(systemName: "star.fill")!
|
|
|
|
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.starColor.cgColor)
|
|
|
|
}
|
2019-09-17 20:26:49 -05:00
|
|
|
|
2019-11-08 20:11:17 -06:00
|
|
|
static var tickMarkColor: UIColor = {
|
|
|
|
return UIColor(named: "tickMarkColor")!
|
|
|
|
}()
|
|
|
|
|
2019-06-21 15:29:20 +08:00
|
|
|
static var timelineStarImage: UIImage = {
|
|
|
|
let image = UIImage(systemName: "star.fill")!
|
2019-08-03 16:34:35 -05:00
|
|
|
return image.withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal)
|
2019-04-15 15:03:05 -05:00
|
|
|
}()
|
2019-06-21 15:29:20 +08:00
|
|
|
|
2020-12-06 16:01:43 -06:00
|
|
|
static var todayFeedImage: IconImage {
|
|
|
|
let image = UIImage(systemName: "sun.max.fill")!
|
|
|
|
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: UIColor.systemOrange.cgColor)
|
|
|
|
}
|
2019-09-17 20:26:49 -05:00
|
|
|
|
2019-08-16 13:27:41 -05:00
|
|
|
static var trashImage: UIImage = {
|
|
|
|
return UIImage(systemName: "trash")!
|
|
|
|
}()
|
|
|
|
|
2020-12-06 16:01:43 -06:00
|
|
|
static var unreadFeedImage: IconImage {
|
|
|
|
let image = UIImage(systemName: "largecircle.fill.circle")!
|
|
|
|
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
|
|
|
|
}
|
2019-09-17 20:26:49 -05:00
|
|
|
|
2019-10-22 03:31:25 -05:00
|
|
|
static var vibrantTextColor: UIColor = {
|
|
|
|
return UIColor(named: "vibrantTextColor")!
|
|
|
|
}()
|
|
|
|
|
2019-10-28 15:16:56 -05:00
|
|
|
static var controlBackgroundColor: UIColor = {
|
|
|
|
return UIColor(named: "controlBackgroundColor")!
|
2019-10-26 21:30:44 -07:00
|
|
|
}()
|
|
|
|
|
2021-02-01 08:25:34 +08:00
|
|
|
|
2019-10-23 10:35:53 -05:00
|
|
|
static func image(for accountType: AccountType) -> UIImage? {
|
|
|
|
switch accountType {
|
|
|
|
case .onMyMac:
|
2019-10-23 13:52:07 -05:00
|
|
|
if UIDevice.current.userInterfaceIdiom == .pad {
|
|
|
|
return AppAssets.accountLocalPadImage
|
|
|
|
} else {
|
|
|
|
return AppAssets.accountLocalPhoneImage
|
|
|
|
}
|
2020-03-28 17:51:14 -05:00
|
|
|
case .cloudKit:
|
|
|
|
return AppAssets.accountCloudKitImage
|
2019-10-23 10:35:53 -05:00
|
|
|
case .feedbin:
|
|
|
|
return AppAssets.accountFeedbinImage
|
2019-11-10 18:04:21 -06:00
|
|
|
case .feedly:
|
|
|
|
return AppAssets.accountFeedlyImage
|
2019-11-25 00:26:03 -05:00
|
|
|
case .feedWrangler:
|
|
|
|
return AppAssets.accountFeedWranglerImage
|
2019-10-23 10:35:53 -05:00
|
|
|
case .freshRSS:
|
|
|
|
return AppAssets.accountFreshRSSImage
|
2020-03-09 18:39:58 -04:00
|
|
|
case .newsBlur:
|
|
|
|
return AppAssets.accountNewsBlurImage
|
2020-10-24 14:23:48 -05:00
|
|
|
case .inoreader:
|
2020-10-24 14:30:59 -05:00
|
|
|
return AppAssets.accountInoreaderImage
|
2020-10-24 14:23:48 -05:00
|
|
|
case .bazQux:
|
2020-10-24 14:30:59 -05:00
|
|
|
return AppAssets.accountBazQuxImage
|
2020-10-24 14:23:48 -05:00
|
|
|
case .theOldReader:
|
2020-10-24 14:30:59 -05:00
|
|
|
return AppAssets.accountTheOldReaderImage
|
2019-10-23 10:35:53 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-15 15:03:05 -05:00
|
|
|
}
|