2020-06-28 10:05:01 +02:00
|
|
|
//
|
|
|
|
// AppAssets.swift
|
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 6/27/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
import RSCore
|
|
|
|
import Account
|
|
|
|
|
|
|
|
struct AppAssets {
|
2020-07-06 22:30:32 +02:00
|
|
|
|
|
|
|
#if os(iOS)
|
|
|
|
static var accentColor: UIColor! = {
|
|
|
|
return UIColor(named: "AccentColor")
|
|
|
|
}()
|
|
|
|
#endif
|
2020-06-28 10:05:01 +02:00
|
|
|
|
2020-12-02 13:37:42 +01:00
|
|
|
static var accountBazQux: RSImage! = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountBazQux")
|
2020-12-02 13:37:42 +01:00
|
|
|
}()
|
|
|
|
|
2020-06-28 10:05:01 +02:00
|
|
|
static var accountLocalMacImage: RSImage! = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountLocalMac")
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountLocalPadImage: RSImage = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountLocalPad")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountLocalPhoneImage: RSImage = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountLocalPhone")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountCloudKitImage: RSImage = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountCloudKit")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountFeedbinImage: RSImage = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountFeedbin")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountFeedlyImage: RSImage = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountFeedly")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountFeedWranglerImage: RSImage = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountFeedWrangler")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountFreshRSSImage: RSImage = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountFreshRSS")!
|
2020-12-02 13:37:42 +01:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountInoreader: RSImage! = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountInoreader")
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountNewsBlurImage: RSImage = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountNewsBlur")!
|
2020-12-02 13:37:42 +01:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var accountTheOldReader: RSImage! = {
|
2020-12-07 20:35:00 +01:00
|
|
|
return RSImage(named: "accountTheOldReader")
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
2020-07-04 02:19:40 +02:00
|
|
|
static var addMenuImage: Image = {
|
|
|
|
return Image(systemName: "plus")
|
|
|
|
}()
|
|
|
|
|
2020-07-06 01:53:18 +02:00
|
|
|
static var articleExtractorError: Image = {
|
|
|
|
return Image("ArticleExtractorError")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorOff: Image = {
|
|
|
|
return Image(systemName: "doc.plaintext")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorOn: Image = {
|
|
|
|
return Image("ArticleExtractorOn")
|
|
|
|
}()
|
|
|
|
|
2020-07-13 02:43:25 +02:00
|
|
|
static var checkmarkImage: Image = {
|
|
|
|
return Image(systemName: "checkmark")
|
|
|
|
}()
|
|
|
|
|
2020-07-04 18:57:51 +02:00
|
|
|
static var copyImage: Image = {
|
|
|
|
return Image(systemName: "doc.on.doc")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var deleteImage: Image = {
|
|
|
|
return Image(systemName: "trash")
|
|
|
|
}()
|
|
|
|
|
2020-06-28 10:05:01 +02:00
|
|
|
static var extensionPointMarsEdit: RSImage = {
|
2020-07-04 02:19:40 +02:00
|
|
|
return RSImage(named: "ExtensionPointMarsEdit")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var extensionPointMicroblog: RSImage = {
|
2020-07-04 02:19:40 +02:00
|
|
|
return RSImage(named: "ExtensionPointMicroblog")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var extensionPointReddit: RSImage = {
|
2020-07-04 02:19:40 +02:00
|
|
|
return RSImage(named: "ExtensionPointReddit")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var extensionPointTwitter: RSImage = {
|
2020-07-04 02:19:40 +02:00
|
|
|
return RSImage(named: "ExtensionPointTwitter")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
|
|
|
static var faviconTemplateImage: RSImage = {
|
2020-07-04 17:24:37 +02:00
|
|
|
return RSImage(named: "FaviconTemplateImage")!
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
2020-07-05 22:11:45 +02:00
|
|
|
static var filterInactiveImage: Image = {
|
|
|
|
return Image(systemName: "line.horizontal.3.decrease.circle")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var filterActiveImage: Image = {
|
|
|
|
return Image(systemName: "line.horizontal.3.decrease.circle.fill")
|
|
|
|
}()
|
|
|
|
|
2020-07-04 21:13:12 +02:00
|
|
|
static var getInfoImage: Image = {
|
|
|
|
return Image(systemName: "info.circle")
|
|
|
|
}()
|
|
|
|
|
2020-07-07 04:14:05 +02:00
|
|
|
#if os(macOS)
|
2020-07-21 04:01:25 +02:00
|
|
|
static var nsIconBackgroundColor: NSColor = {
|
2020-07-07 04:14:05 +02:00
|
|
|
return NSColor(named: "IconBackgroundColor")!
|
|
|
|
}()
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if os(iOS)
|
2020-07-21 04:01:25 +02:00
|
|
|
static var uiIconBackgroundColor: UIColor = {
|
2020-07-07 04:14:05 +02:00
|
|
|
return UIColor(named: "IconBackgroundColor")!
|
|
|
|
}()
|
|
|
|
#endif
|
|
|
|
|
2020-07-21 04:01:25 +02:00
|
|
|
static var iconBackgroundColor: Color = {
|
|
|
|
return Color("IconBackgroundColor")
|
|
|
|
}()
|
|
|
|
|
2020-07-18 00:59:35 +02:00
|
|
|
static var markBelowAsReadImage: Image = {
|
|
|
|
return Image(systemName: "arrowtriangle.down.circle")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var markAboveAsReadImage: Image = {
|
|
|
|
return Image(systemName: "arrowtriangle.up.circle")
|
|
|
|
}()
|
|
|
|
|
2020-07-06 01:53:18 +02:00
|
|
|
static var nextArticleImage: Image = {
|
|
|
|
return Image(systemName: "chevron.down")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var prevArticleImage: Image = {
|
|
|
|
return Image(systemName: "chevron.up")
|
|
|
|
}()
|
|
|
|
|
2020-07-04 18:57:51 +02:00
|
|
|
static var renameImage: Image = {
|
|
|
|
return Image(systemName: "textformat")
|
|
|
|
}()
|
|
|
|
|
2020-07-04 02:19:40 +02:00
|
|
|
static var settingsImage: Image = {
|
|
|
|
return Image(systemName: "gear")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var masterFolderImage: IconImage {
|
2020-06-28 10:05:01 +02:00
|
|
|
#if os(macOS)
|
2020-07-04 02:19:40 +02:00
|
|
|
let image = NSImage(systemSymbolName: "folder.fill", accessibilityDescription: nil)!
|
|
|
|
let coloredImage = image.tinted(with: NSColor(named: "AccentColor")!)
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(coloredImage, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
|
|
|
#if os(iOS)
|
2020-07-04 02:19:40 +02:00
|
|
|
let image = UIImage(systemName: "folder.fill")!
|
|
|
|
let coloredImage = image.tinted(color: UIColor(named: "AccentColor")!)!
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(coloredImage, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
2020-07-04 02:19:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static var markAllAsReadImage: Image = {
|
|
|
|
return Image("MarkAllAsRead")
|
|
|
|
}()
|
|
|
|
|
2020-07-20 00:44:41 +02:00
|
|
|
static var markAllAsReadImagePNG: Image = {
|
|
|
|
return Image("MarkAllAsReadPNG")
|
2020-07-04 02:19:40 +02:00
|
|
|
}()
|
2020-07-20 00:44:41 +02:00
|
|
|
|
2020-07-04 02:19:40 +02:00
|
|
|
static var nextUnreadArticleImage: Image = {
|
|
|
|
return Image(systemName: "chevron.down.circle")
|
2020-06-28 10:05:01 +02:00
|
|
|
}()
|
|
|
|
|
2020-07-04 02:19:40 +02:00
|
|
|
static var openInBrowserImage: Image = {
|
|
|
|
return Image(systemName: "safari")
|
|
|
|
}()
|
|
|
|
|
2020-07-06 01:53:18 +02:00
|
|
|
static var readClosedImage: Image = {
|
|
|
|
return Image(systemName: "largecircle.fill.circle")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var readOpenImage: Image = {
|
|
|
|
return Image(systemName: "circle")
|
|
|
|
}()
|
|
|
|
|
2020-07-04 02:19:40 +02:00
|
|
|
static var refreshImage: Image = {
|
|
|
|
return Image(systemName: "arrow.clockwise")
|
|
|
|
}()
|
|
|
|
|
2020-06-28 10:05:01 +02:00
|
|
|
static var searchFeedImage: IconImage = {
|
|
|
|
#if os(macOS)
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(NSImage(systemSymbolName: "magnifyingglass", accessibilityDescription: nil)!, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
|
|
|
#if os(iOS)
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(UIImage(systemName: "magnifyingglass")!, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
|
|
|
}()
|
|
|
|
|
2020-07-04 02:41:38 +02:00
|
|
|
static var sidebarUnreadCountBackground: Color = {
|
|
|
|
return Color("SidebarUnreadCountBackground")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var sidebarUnreadCountForeground: Color = {
|
|
|
|
return Color("SidebarUnreadCountForeground")
|
|
|
|
}()
|
|
|
|
|
2020-07-04 02:19:40 +02:00
|
|
|
static var shareImage: Image = {
|
|
|
|
Image(systemName: "square.and.arrow.up")
|
|
|
|
}()
|
|
|
|
|
2020-07-06 01:53:18 +02:00
|
|
|
static var starClosedImage: Image = {
|
|
|
|
return Image(systemName: "star.fill")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var starOpenImage: Image = {
|
|
|
|
return Image(systemName: "star")
|
|
|
|
}()
|
|
|
|
|
2020-06-28 10:05:01 +02:00
|
|
|
static var smartFeedImage: RSImage = {
|
|
|
|
#if os(macOS)
|
|
|
|
return NSImage(systemSymbolName: "gear", accessibilityDescription: nil)!
|
|
|
|
#endif
|
|
|
|
#if os(iOS)
|
|
|
|
return UIImage(systemName: "gear")!
|
|
|
|
#endif
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var starredFeedImage: IconImage = {
|
|
|
|
#if os(macOS)
|
2020-07-04 02:19:40 +02:00
|
|
|
let image = NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
|
|
|
|
let coloredImage = image.tinted(with: NSColor(named: "StarColor")!)
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(coloredImage, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
|
|
|
#if os(iOS)
|
2020-07-04 02:19:40 +02:00
|
|
|
let image = UIImage(systemName: "star.fill")!
|
|
|
|
let coloredImage = image.tinted(color: UIColor(named: "StarColor")!)!
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(coloredImage, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
|
|
|
}()
|
|
|
|
|
2020-07-01 23:33:07 +02:00
|
|
|
static var timelineStarred: Image = {
|
2020-07-04 02:19:40 +02:00
|
|
|
#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
|
2020-07-01 23:33:07 +02:00
|
|
|
}()
|
|
|
|
|
2020-07-04 02:19:40 +02:00
|
|
|
static var timelineUnread: Image {
|
|
|
|
#if os(macOS)
|
|
|
|
let image = NSImage(systemSymbolName: "circle.fill", accessibilityDescription: nil)!
|
2020-07-08 23:22:15 +02:00
|
|
|
let coloredImage = image.tinted(with: NSColor.controlAccentColor)
|
2020-07-04 02:19:40 +02:00
|
|
|
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
|
|
|
|
}
|
2020-07-01 23:33:07 +02:00
|
|
|
|
2020-07-20 01:20:05 +02:00
|
|
|
static var timelineUnreadSelected: Image {
|
|
|
|
return Image(systemName: "circle.fill")
|
|
|
|
}
|
|
|
|
|
2020-06-28 10:05:01 +02:00
|
|
|
static var todayFeedImage: IconImage = {
|
|
|
|
#if os(macOS)
|
2020-07-04 02:19:40 +02:00
|
|
|
let image = NSImage(systemSymbolName: "sun.max.fill", accessibilityDescription: nil)!
|
|
|
|
let coloredImage = image.tinted(with: .orange)
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(coloredImage, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
|
|
|
#if os(iOS)
|
2020-07-04 02:19:40 +02:00
|
|
|
let image = UIImage(systemName: "sun.max.fill")!
|
|
|
|
let coloredImage = image.tinted(color: .orange)!
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(coloredImage, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
|
|
|
}()
|
2020-07-04 02:19:40 +02:00
|
|
|
|
|
|
|
static var unreadFeedImage: IconImage {
|
2020-06-28 10:05:01 +02:00
|
|
|
#if os(macOS)
|
2020-07-04 02:19:40 +02:00
|
|
|
let image = NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!
|
|
|
|
let coloredImage = image.tinted(with: NSColor(named: "AccentColor")!)
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(coloredImage, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
|
|
|
#if os(iOS)
|
2020-07-04 02:19:40 +02:00
|
|
|
let image = UIImage(systemName: "largecircle.fill.circle")!
|
|
|
|
let coloredImage = image.tinted(color: UIColor(named: "AccentColor")!)!
|
2020-07-21 04:01:25 +02:00
|
|
|
return IconImage(coloredImage, isSymbol: true)
|
2020-06-28 10:05:01 +02:00
|
|
|
#endif
|
2020-07-04 02:19:40 +02:00
|
|
|
}
|
2020-08-10 02:36:31 +02:00
|
|
|
|
|
|
|
static var sidebarToggleImage: Image {
|
|
|
|
return Image(systemName: "sidebar.left")
|
|
|
|
}
|
2020-06-28 10:05:01 +02:00
|
|
|
|
2020-07-09 05:27:59 +02:00
|
|
|
#if os(macOS)
|
|
|
|
static var webStatusBarBackground: NSColor = {
|
|
|
|
return NSColor(named: "WebStatusBarBackground")!
|
|
|
|
}()
|
|
|
|
#endif
|
|
|
|
|
2020-06-28 10:05:01 +02:00
|
|
|
static func image(for accountType: AccountType) -> RSImage? {
|
|
|
|
switch accountType {
|
|
|
|
case .onMyMac:
|
|
|
|
#if os(macOS)
|
|
|
|
return AppAssets.accountLocalMacImage
|
|
|
|
#endif
|
|
|
|
#if os(iOS)
|
|
|
|
if UIDevice.current.userInterfaceIdiom == .pad {
|
|
|
|
return AppAssets.accountLocalPadImage
|
|
|
|
} else {
|
|
|
|
return AppAssets.accountLocalPhoneImage
|
|
|
|
}
|
|
|
|
#endif
|
2020-12-02 13:37:42 +01:00
|
|
|
case .bazQux:
|
|
|
|
return AppAssets.accountBazQux
|
2020-06-28 10:05:01 +02:00
|
|
|
case .cloudKit:
|
|
|
|
return AppAssets.accountCloudKitImage
|
|
|
|
case .feedbin:
|
|
|
|
return AppAssets.accountFeedbinImage
|
|
|
|
case .feedly:
|
|
|
|
return AppAssets.accountFeedlyImage
|
|
|
|
case .feedWrangler:
|
|
|
|
return AppAssets.accountFeedWranglerImage
|
|
|
|
case .freshRSS:
|
|
|
|
return AppAssets.accountFreshRSSImage
|
|
|
|
case .newsBlur:
|
|
|
|
return AppAssets.accountNewsBlurImage
|
2020-12-02 13:37:42 +01:00
|
|
|
case .inoreader:
|
|
|
|
return AppAssets.accountInoreader
|
|
|
|
case .theOldReader:
|
|
|
|
return AppAssets.accountTheOldReader
|
|
|
|
|
2020-06-28 10:05:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|