2019-04-15 22:03:05 +02: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 17:35:53 +02:00
|
|
|
import Account
|
2019-04-15 22:03:05 +02:00
|
|
|
|
|
|
|
struct AppAssets {
|
2019-11-03 01:57:01 +01:00
|
|
|
|
2019-10-23 20:52:07 +02:00
|
|
|
static var accountLocalPadImage: UIImage = {
|
|
|
|
return UIImage(named: "accountLocalPad")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountLocalPhoneImage: UIImage = {
|
|
|
|
return UIImage(named: "accountLocalPhone")!
|
2019-10-23 17:35:53 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountFeedbinImage: UIImage = {
|
|
|
|
return UIImage(named: "accountFeedbin")!
|
|
|
|
}()
|
|
|
|
|
2019-11-11 01:04:21 +01:00
|
|
|
static var accountFeedlyImage: UIImage = {
|
|
|
|
return UIImage(named: "accountFeedly")!
|
|
|
|
}()
|
2019-11-25 06:26:03 +01:00
|
|
|
|
|
|
|
static var accountFeedWranglerImage: UIImage = {
|
|
|
|
return UIImage(named: "accountFeedWrangler")!
|
|
|
|
}()
|
2019-11-11 01:04:21 +01:00
|
|
|
|
2019-10-23 17:35:53 +02:00
|
|
|
static var accountFreshRSSImage: UIImage = {
|
|
|
|
return UIImage(named: "accountFreshRSS")!
|
|
|
|
}()
|
|
|
|
|
2019-09-24 23:34:11 +02:00
|
|
|
static var articleExtractorError: UIImage = {
|
2019-09-26 21:48:19 +02:00
|
|
|
return UIImage(named: "articleExtractorError")!
|
2019-09-24 23:34:11 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorOff: UIImage = {
|
|
|
|
return UIImage(named: "articleExtractorOff")!
|
|
|
|
}()
|
|
|
|
|
2019-11-26 03:36:15 +01:00
|
|
|
static var articleExtractorOffSF: UIImage = {
|
2019-11-26 02:43:43 +01:00
|
|
|
return UIImage(systemName: "doc.plaintext")!
|
|
|
|
}()
|
|
|
|
|
2019-09-24 23:34:11 +02:00
|
|
|
static var articleExtractorOffTinted: UIImage = {
|
|
|
|
let image = UIImage(named: "articleExtractorOff")!
|
|
|
|
return image.maskWithColor(color: AppAssets.primaryAccentColor.cgColor)!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorOn: UIImage = {
|
|
|
|
return UIImage(named: "articleExtractorOn")!
|
|
|
|
}()
|
|
|
|
|
2019-11-26 03:36:15 +01:00
|
|
|
static var articleExtractorOnSF: UIImage = {
|
|
|
|
return UIImage(named: "articleExtractorOnSF")!
|
2019-11-26 02:43:43 +01:00
|
|
|
}()
|
|
|
|
|
2019-09-24 23:34:11 +02:00
|
|
|
static var articleExtractorOnTinted: UIImage = {
|
|
|
|
let image = UIImage(named: "articleExtractorOn")!
|
|
|
|
return image.maskWithColor(color: AppAssets.primaryAccentColor.cgColor)!
|
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var iconBackgroundColor: UIColor = {
|
|
|
|
return UIColor(named: "iconBackgroundColor")!
|
2019-06-20 18:58:26 +02:00
|
|
|
}()
|
2019-06-14 22:33:13 +02:00
|
|
|
|
2019-08-23 19:27:45 +02:00
|
|
|
static var barBackgroundColor: UIColor = {
|
|
|
|
return UIColor(named: "barBackgroundColor")!
|
|
|
|
}()
|
|
|
|
|
2019-06-21 09:29:20 +02:00
|
|
|
static var circleClosedImage: UIImage = {
|
2019-09-18 03:26:49 +02:00
|
|
|
return UIImage(systemName: "largecircle.fill.circle")!
|
2019-04-15 22:03:05 +02:00
|
|
|
}()
|
|
|
|
|
2019-06-21 09:29:20 +02:00
|
|
|
static var circleOpenImage: UIImage = {
|
|
|
|
return UIImage(systemName: "circle")!
|
2019-04-15 22:03:05 +02:00
|
|
|
}()
|
|
|
|
|
2019-10-25 21:57:01 +02:00
|
|
|
static var disclosureImage: UIImage = {
|
|
|
|
return UIImage(named: "disclosure")!
|
2019-04-17 17:15:44 +02:00
|
|
|
}()
|
|
|
|
|
2019-08-16 20:27:41 +02:00
|
|
|
static var copyImage: UIImage = {
|
|
|
|
return UIImage(systemName: "doc.on.doc")!
|
|
|
|
}()
|
|
|
|
|
2019-10-24 03:22:31 +02:00
|
|
|
static var deactivateImage: UIImage = {
|
|
|
|
UIImage(systemName: "minus.circle")!
|
|
|
|
}()
|
|
|
|
|
2019-08-16 20:27:41 +02:00
|
|
|
static var editImage: UIImage = {
|
|
|
|
UIImage(systemName: "square.and.pencil")!
|
|
|
|
}()
|
|
|
|
|
2019-04-29 14:07:57 +02:00
|
|
|
static var faviconTemplateImage: RSImage = {
|
|
|
|
return RSImage(named: "faviconTemplateImage")!
|
|
|
|
}()
|
|
|
|
|
2019-11-21 22:55:50 +01:00
|
|
|
static var filterInactiveImage: UIImage = {
|
|
|
|
UIImage(systemName: "line.horizontal.3.decrease.circle")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var filterActiveImage: UIImage = {
|
|
|
|
UIImage(systemName: "line.horizontal.3.decrease.circle.fill")!
|
|
|
|
}()
|
|
|
|
|
2019-10-17 03:53:49 +02:00
|
|
|
static var fullScreenBackgroundColor: UIColor = {
|
|
|
|
return UIColor(named: "fullScreenBackgroundColor")!
|
|
|
|
}()
|
|
|
|
|
2019-09-28 14:00:18 +02:00
|
|
|
static var infoImage: UIImage = {
|
|
|
|
UIImage(systemName: "info.circle")!
|
|
|
|
}()
|
|
|
|
|
2019-08-20 00:26:09 +02:00
|
|
|
static var markAllInFeedAsReadImage: UIImage = {
|
|
|
|
return UIImage(systemName: "asterisk.circle")!
|
|
|
|
}()
|
|
|
|
|
2019-08-19 00:34:53 +02:00
|
|
|
static var markOlderAsReadDownImage: UIImage = {
|
|
|
|
return UIImage(systemName: "arrowtriangle.down.circle")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var markOlderAsReadUpImage: UIImage = {
|
|
|
|
return UIImage(systemName: "arrowtriangle.up.circle")!
|
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var masterFolderImage: IconImage = {
|
|
|
|
return IconImage(UIImage(systemName: "folder.fill")!)
|
2019-04-15 22:03:05 +02:00
|
|
|
}()
|
|
|
|
|
2019-08-19 22:45:52 +02:00
|
|
|
static var moreImage: UIImage = {
|
|
|
|
return UIImage(systemName: "ellipsis.circle")!
|
|
|
|
}()
|
|
|
|
|
2019-11-26 02:43:43 +01:00
|
|
|
static var nextArticleImage: UIImage = {
|
|
|
|
return UIImage(systemName: "chevron.down")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var nextUnreadArticleImage: UIImage = {
|
|
|
|
return UIImage(systemName: "chevron.down.circle")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var prevArticleImage: UIImage = {
|
|
|
|
return UIImage(systemName: "chevron.up")!
|
|
|
|
}()
|
|
|
|
|
2019-08-19 22:45:52 +02:00
|
|
|
static var openInSidebarImage: UIImage = {
|
|
|
|
return UIImage(systemName: "arrow.turn.down.left")!
|
|
|
|
}()
|
|
|
|
|
2019-09-18 09:49:57 +02:00
|
|
|
static var primaryAccentColor: UIColor = {
|
|
|
|
return UIColor(named: "primaryAccentColor")!
|
|
|
|
}()
|
|
|
|
|
2019-08-16 20:27:41 +02:00
|
|
|
static var safariImage: UIImage = {
|
|
|
|
return UIImage(systemName: "safari")!
|
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var searchFeedImage: IconImage = {
|
|
|
|
return IconImage(UIImage(systemName: "magnifyingglass")!)
|
2019-06-29 20:53:34 +02:00
|
|
|
}()
|
|
|
|
|
2019-09-18 09:49:57 +02:00
|
|
|
static var secondaryAccentColor: UIColor = {
|
|
|
|
return UIColor(named: "secondaryAccentColor")!
|
|
|
|
}()
|
|
|
|
|
2019-11-01 15:55:17 +01:00
|
|
|
static var sectionHeaderColor: UIColor = {
|
|
|
|
return UIColor(named: "sectionHeaderColor")!
|
|
|
|
}()
|
|
|
|
|
2019-08-20 01:09:38 +02:00
|
|
|
static var shareImage: UIImage = {
|
|
|
|
return UIImage(systemName: "square.and.arrow.up")!
|
|
|
|
}()
|
|
|
|
|
2019-06-21 09:29:20 +02:00
|
|
|
static var smartFeedImage: UIImage = {
|
2019-09-12 02:29:27 +02:00
|
|
|
return UIImage(systemName: "gear")!
|
2019-04-28 22:11:02 +02:00
|
|
|
}()
|
|
|
|
|
2019-04-15 22:03:05 +02:00
|
|
|
static var starColor: UIColor = {
|
|
|
|
return UIColor(named: "starColor")!
|
|
|
|
}()
|
|
|
|
|
2019-06-21 09:29:20 +02:00
|
|
|
static var starClosedImage: UIImage = {
|
|
|
|
return UIImage(systemName: "star.fill")!
|
2019-04-15 22:03:05 +02:00
|
|
|
}()
|
|
|
|
|
2019-06-21 09:29:20 +02:00
|
|
|
static var starOpenImage: UIImage = {
|
|
|
|
return UIImage(systemName: "star")!
|
2019-04-15 22:03:05 +02:00
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var starredFeedImage: IconImage = {
|
|
|
|
return IconImage(UIImage(systemName: "star.fill")!)
|
2019-09-18 03:26:49 +02:00
|
|
|
}()
|
|
|
|
|
2019-11-09 03:11:17 +01:00
|
|
|
static var tickMarkColor: UIColor = {
|
|
|
|
return UIColor(named: "tickMarkColor")!
|
|
|
|
}()
|
|
|
|
|
2019-06-21 09:29:20 +02:00
|
|
|
static var timelineStarImage: UIImage = {
|
|
|
|
let image = UIImage(systemName: "star.fill")!
|
2019-08-03 23:34:35 +02:00
|
|
|
return image.withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal)
|
2019-04-15 22:03:05 +02:00
|
|
|
}()
|
2019-06-21 09:29:20 +02:00
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var todayFeedImage: IconImage = {
|
|
|
|
return IconImage(UIImage(systemName: "sun.max.fill")!)
|
2019-09-18 03:26:49 +02:00
|
|
|
}()
|
|
|
|
|
2019-08-16 20:27:41 +02:00
|
|
|
static var trashImage: UIImage = {
|
|
|
|
return UIImage(systemName: "trash")!
|
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var unreadFeedImage: IconImage = {
|
|
|
|
return IconImage(UIImage(systemName: "largecircle.fill.circle")!)
|
2019-09-18 03:26:49 +02:00
|
|
|
}()
|
|
|
|
|
2019-10-22 10:31:25 +02:00
|
|
|
static var vibrantTextColor: UIColor = {
|
|
|
|
return UIColor(named: "vibrantTextColor")!
|
|
|
|
}()
|
|
|
|
|
2019-10-28 21:16:56 +01:00
|
|
|
static var controlBackgroundColor: UIColor = {
|
|
|
|
return UIColor(named: "controlBackgroundColor")!
|
2019-10-27 05:30:44 +01:00
|
|
|
}()
|
|
|
|
|
2019-10-23 17:35:53 +02:00
|
|
|
static func image(for accountType: AccountType) -> UIImage? {
|
|
|
|
switch accountType {
|
|
|
|
case .onMyMac:
|
2019-10-23 20:52:07 +02:00
|
|
|
if UIDevice.current.userInterfaceIdiom == .pad {
|
|
|
|
return AppAssets.accountLocalPadImage
|
|
|
|
} else {
|
|
|
|
return AppAssets.accountLocalPhoneImage
|
|
|
|
}
|
2019-10-23 17:35:53 +02:00
|
|
|
case .feedbin:
|
|
|
|
return AppAssets.accountFeedbinImage
|
2019-11-11 01:04:21 +01:00
|
|
|
case .feedly:
|
|
|
|
return AppAssets.accountFeedlyImage
|
2019-11-25 06:26:03 +01:00
|
|
|
case .feedWrangler:
|
|
|
|
return AppAssets.accountFeedWranglerImage
|
2019-10-23 17:35:53 +02:00
|
|
|
case .freshRSS:
|
|
|
|
return AppAssets.accountFreshRSSImage
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-15 22:03:05 +02:00
|
|
|
}
|