2018-02-18 03:19:25 +01:00
|
|
|
//
|
2019-05-21 12:42:40 +02:00
|
|
|
// AppAssets.swift
|
2018-08-29 07:18:24 +02:00
|
|
|
// NetNewsWire
|
2018-02-18 03:19:25 +01:00
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 2/17/18.
|
|
|
|
// Copyright © 2018 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import AppKit
|
2019-04-15 22:03:05 +02:00
|
|
|
import RSCore
|
2019-11-16 19:02:58 +01:00
|
|
|
import Account
|
2018-02-18 03:19:25 +01:00
|
|
|
|
|
|
|
extension NSImage.Name {
|
2018-12-09 21:32:33 +01:00
|
|
|
static let star = NSImage.Name("star")
|
|
|
|
static let timelineStar = NSImage.Name("timelineStar")
|
2018-02-18 03:19:25 +01:00
|
|
|
}
|
|
|
|
|
2019-05-21 12:42:40 +02:00
|
|
|
struct AppAssets {
|
2018-02-18 03:19:25 +01:00
|
|
|
|
2020-03-18 21:48:44 +01:00
|
|
|
static var accountCloudKit: RSImage! = {
|
|
|
|
return RSImage(named: "accountCloudKit")
|
|
|
|
}()
|
|
|
|
|
2019-05-01 13:49:50 +02:00
|
|
|
static var accountLocal: RSImage! = {
|
2019-05-01 19:37:13 +02:00
|
|
|
return RSImage(named: "accountLocal")
|
2019-05-01 13:49:50 +02:00
|
|
|
}()
|
|
|
|
|
2019-05-01 17:28:13 +02:00
|
|
|
static var accountFeedbin: RSImage! = {
|
2019-05-01 19:37:13 +02:00
|
|
|
return RSImage(named: "accountFeedbin")
|
2019-05-01 17:28:13 +02:00
|
|
|
}()
|
|
|
|
|
2019-09-20 21:47:40 +02:00
|
|
|
static var accountFeedly: RSImage! = {
|
|
|
|
return RSImage(named: "accountFeedly")
|
|
|
|
}()
|
|
|
|
|
2019-09-28 06:44:58 +02:00
|
|
|
static var accountFeedWrangler: RSImage! = {
|
|
|
|
return RSImage(named: "accountFeedWrangler")
|
|
|
|
}()
|
|
|
|
|
2019-06-20 14:22:51 +02:00
|
|
|
static var accountFreshRSS: RSImage! = {
|
|
|
|
return RSImage(named: "accountFreshRSS")
|
2019-06-19 22:40:03 +02:00
|
|
|
}()
|
2020-03-23 00:52:48 +01:00
|
|
|
|
|
|
|
static var accountNewsBlur: RSImage! = {
|
|
|
|
return RSImage(named: "accountNewsBlur")
|
|
|
|
}()
|
2019-06-19 22:40:03 +02:00
|
|
|
|
2019-09-19 22:44:31 +02:00
|
|
|
static var articleExtractor: RSImage! = {
|
|
|
|
return RSImage(named: "articleExtractor")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorError: RSImage! = {
|
|
|
|
return RSImage(named: "articleExtractorError")
|
|
|
|
}()
|
|
|
|
|
2019-11-12 20:05:52 +01:00
|
|
|
static var articleExtractorInactiveDark: RSImage! = {
|
|
|
|
return RSImage(named: "articleExtractorInactiveDark")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorInactiveLight: RSImage! = {
|
|
|
|
return RSImage(named: "articleExtractorInactiveLight")
|
|
|
|
}()
|
|
|
|
|
2019-09-19 22:44:31 +02:00
|
|
|
static var articleExtractorProgress1: RSImage! = {
|
|
|
|
return RSImage(named: "articleExtractorProgress1")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorProgress2: RSImage! = {
|
|
|
|
return RSImage(named: "articleExtractorProgress2")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorProgress3: RSImage! = {
|
|
|
|
return RSImage(named: "articleExtractorProgress3")
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var articleExtractorProgress4: RSImage! = {
|
|
|
|
return RSImage(named: "articleExtractorProgress4")
|
|
|
|
}()
|
|
|
|
|
2020-04-07 22:25:33 +02:00
|
|
|
static var extensionPointMarsEdit: RSImage = {
|
|
|
|
return RSImage(named: "extensionPointMarsEdit")!
|
2020-04-07 15:06:47 +02:00
|
|
|
}()
|
|
|
|
|
2020-04-07 22:25:33 +02:00
|
|
|
static var extensionPointMicroblog: RSImage = {
|
|
|
|
return RSImage(named: "extensionPointMicroblog")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var extensionPointTwitter: RSImage = {
|
|
|
|
return RSImage(named: "extensionPointTwitter")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var extensionPreference: RSImage? = {
|
|
|
|
return RSImage(contentsOfFile: "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/KEXT.icns")
|
|
|
|
}()
|
|
|
|
|
2019-05-21 12:42:40 +02:00
|
|
|
static var faviconTemplateImage: RSImage = {
|
|
|
|
return RSImage(named: "faviconTemplateImage")!
|
|
|
|
}()
|
2019-06-14 22:33:13 +02:00
|
|
|
|
2020-03-22 21:39:37 +01:00
|
|
|
static var filterActive: RSImage = {
|
|
|
|
return RSImage(named: "filterActive")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var filterInactive: RSImage = {
|
|
|
|
return RSImage(named: "filterInactive")!
|
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var iconLightBackgroundColor: NSColor = {
|
|
|
|
return NSColor(named: NSColor.Name("iconLightBackgroundColor"))!
|
2019-06-14 22:33:13 +02:00
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var iconDarkBackgroundColor: NSColor = {
|
|
|
|
return NSColor(named: NSColor.Name("iconDarkBackgroundColor"))!
|
2019-06-14 22:33:13 +02:00
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var masterFolderImage: IconImage = {
|
|
|
|
return IconImage(RSImage(named: NSImage.folderName)!)
|
2019-06-14 22:33:13 +02:00
|
|
|
}()
|
2019-09-18 03:26:49 +02:00
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var searchFeedImage: IconImage = {
|
|
|
|
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!)
|
2019-09-18 03:26:49 +02:00
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var starredFeedImage: IconImage = {
|
|
|
|
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!)
|
2019-09-18 03:26:49 +02:00
|
|
|
}()
|
|
|
|
|
2020-03-22 21:39:37 +01:00
|
|
|
static var timelineStar: RSImage! = {
|
|
|
|
return RSImage(named: .timelineStar)
|
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var todayFeedImage: IconImage = {
|
|
|
|
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!)
|
2019-09-18 03:26:49 +02:00
|
|
|
}()
|
|
|
|
|
2019-11-06 01:05:57 +01:00
|
|
|
static var unreadFeedImage: IconImage = {
|
|
|
|
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!)
|
2019-09-18 03:26:49 +02:00
|
|
|
}()
|
|
|
|
|
2019-10-22 20:39:15 +02:00
|
|
|
static var swipeMarkReadImage: RSImage = {
|
|
|
|
return RSImage(named: "swipeMarkRead")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var swipeMarkUnreadImage: RSImage = {
|
|
|
|
return RSImage(named: "swipeMarkUnread")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var swipeMarkStarredImage: RSImage = {
|
|
|
|
return RSImage(named: "swipeMarkStarred")!
|
|
|
|
}()
|
|
|
|
|
|
|
|
static var swipeMarkUnstarredImage: RSImage = {
|
|
|
|
return RSImage(named: "swipeMarkUnstarred")!
|
|
|
|
}()
|
|
|
|
|
2020-02-28 01:27:12 +01:00
|
|
|
static var swipeMarkUnstarredColor: NSColor = {
|
|
|
|
return NSColor(named: NSColor.Name("swipeMarkUnstarredColor"))!
|
|
|
|
}()
|
|
|
|
|
2019-11-16 19:02:58 +01:00
|
|
|
static func image(for accountType: AccountType) -> NSImage? {
|
|
|
|
switch accountType {
|
|
|
|
case .onMyMac:
|
|
|
|
return AppAssets.accountLocal
|
2020-03-18 21:48:44 +01:00
|
|
|
case .cloudKit:
|
|
|
|
return AppAssets.accountCloudKit
|
2019-11-16 19:02:58 +01:00
|
|
|
case .feedbin:
|
|
|
|
return AppAssets.accountFeedbin
|
|
|
|
case .feedly:
|
|
|
|
return AppAssets.accountFeedly
|
2019-11-21 18:28:08 +01:00
|
|
|
case .feedWrangler:
|
|
|
|
return AppAssets.accountFeedWrangler
|
2019-11-16 19:02:58 +01:00
|
|
|
case .freshRSS:
|
|
|
|
return AppAssets.accountFreshRSS
|
2020-03-23 00:52:48 +01:00
|
|
|
case .newsBlur:
|
|
|
|
return AppAssets.accountNewsBlur
|
2019-11-16 19:02:58 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-18 03:19:25 +01:00
|
|
|
}
|