NetNewsWire/iOS/AppAssets.swift

315 lines
8.1 KiB
Swift
Raw Normal View History

//
// 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")!
}()
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
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")!
}()
2020-03-09 23:39:58 +01:00
static var accountNewsBlurImage: UIImage = {
return UIImage(named: "accountNewsBlur")!
}()
static var accountTheOldReaderImage: UIImage = {
return UIImage(named: "accountTheOldReader")!
}()
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")!
}()
static var articleExtractorOffSF: UIImage = {
return UIImage(systemName: "doc.plaintext")!
}()
2019-09-24 23:34:11 +02:00
static var articleExtractorOffTinted: UIImage = {
let image = UIImage(named: "articleExtractorOff")!
return image.tinted(color: AppAssets.primaryAccentColor)!
2019-09-24 23:34:11 +02:00
}()
static var articleExtractorOn: UIImage = {
return UIImage(named: "articleExtractorOn")!
}()
static var articleExtractorOnSF: UIImage = {
return UIImage(named: "articleExtractorOnSF")!
}()
2019-09-24 23:34:11 +02:00
static var articleExtractorOnTinted: UIImage = {
let image = UIImage(named: "articleExtractorOn")!
return image.tinted(color: AppAssets.primaryAccentColor)!
2019-09-24 23:34:11 +02:00
}()
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")!
2019-04-17 17:15:44 +02:00
}()
2021-02-24 01:07:09 +01:00
static var contextMenuReddit: UIImage = {
return UIImage(named: "contextMenuReddit")!
}()
static var contextMenuTwitter: UIImage = {
return UIImage(named: "contextMenuTwitter")!
}()
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 extensionPointReddit: RSImage = {
return RSImage(named: "extensionPointReddit")!
}()
static var extensionPointTwitter: UIImage = {
return UIImage(named: "extensionPointTwitter")!
}()
static var faviconTemplateImage: RSImage = {
return RSImage(named: "faviconTemplateImage")!
}()
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 01:07:09 +01:00
static var folderOutlinePlus: UIImage = {
UIImage(systemName: "folder.badge.plus")!
}()
static var fullScreenBackgroundColor: UIColor = {
return UIColor(named: "fullScreenBackgroundColor")!
}()
2019-09-28 14:00:18 +02:00
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 masterFolderImage: IconImage = {
return IconImage(UIImage(systemName: "folder.fill")!, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
}()
2021-02-01 01:25:34 +01:00
static var masterFolderImageNonIcon: UIImage = {
return UIImage(systemName: "folder.fill")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
}()
2019-08-19 22:45:52 +02:00
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")!
}()
2021-02-24 01:07:09 +01:00
static var plus: UIImage = {
UIImage(systemName: "plus")!
}()
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")!
}()
static var primaryAccentColor: UIColor {
return UIColor(named: "primaryAccentColor")!
}
2021-02-01 01:25:34 +01:00
static var redditOriginal: UIImage = {
return UIImage(named: "redditWhite")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
}()
static var safariImage: UIImage = {
return UIImage(systemName: "safari")!
}()
static var searchFeedImage: IconImage = {
return IconImage(UIImage(systemName: "magnifyingglass")!, isSymbol: true)
2019-06-29 20:53:34 +02:00
}()
static var secondaryAccentColor: UIColor {
return UIColor(named: "secondaryAccentColor")!
}
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")!
}()
static var smartFeedImage: UIImage = {
2019-09-12 02:29:27 +02:00
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, isBackgroundSupressed: 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, isBackgroundSupressed: true, preferredColor: UIColor.systemOrange.cgColor)
}
static var trashImage: UIImage = {
return UIImage(systemName: "trash")!
}()
2021-02-01 01:25:34 +01:00
static var twitterOriginal: UIImage = {
return UIImage(named: "twitterWhite")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
}()
static var unreadFeedImage: IconImage {
let image = UIImage(systemName: "largecircle.fill.circle")!
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
}
static var vibrantTextColor: UIColor = {
return UIColor(named: "vibrantTextColor")!
}()
static var controlBackgroundColor: UIColor = {
return UIColor(named: "controlBackgroundColor")!
}()
2021-02-01 01:25:34 +01: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
}
case .cloudKit:
return AppAssets.accountCloudKitImage
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
case .freshRSS:
return AppAssets.accountFreshRSSImage
2020-03-09 23:39:58 +01:00
case .newsBlur:
return AppAssets.accountNewsBlurImage
2020-10-24 21:23:48 +02:00
case .inoreader:
return AppAssets.accountInoreaderImage
2020-10-24 21:23:48 +02:00
case .bazQux:
return AppAssets.accountBazQuxImage
2020-10-24 21:23:48 +02:00
case .theOldReader:
return AppAssets.accountTheOldReaderImage
}
}
}