Add new images used in context menus to AppAssets where they belong

This commit is contained in:
Maurice Parker 2019-08-16 13:27:41 -05:00
parent aabe950b2b
commit 066616b005
2 changed files with 21 additions and 5 deletions

View File

@ -36,6 +36,14 @@ struct AppAssets {
return image.withTintColor(AppAssets.chevronDisclosureColor, renderingMode: .alwaysOriginal)
}()
static var copyImage: UIImage = {
return UIImage(systemName: "doc.on.doc")!
}()
static var editImage: UIImage = {
UIImage(systemName: "square.and.pencil")!
}()
static var faviconTemplateImage: RSImage = {
return RSImage(named: "faviconTemplateImage")!
}()
@ -52,6 +60,10 @@ struct AppAssets {
return UIColor(named: "netNewsWireBlueColor")!
}()
static var safariImage: UIImage = {
return UIImage(systemName: "safari")!
}()
static var selectedTextColor: UIColor = {
return UIColor(named: "selectedTextColor")!
}()
@ -89,4 +101,8 @@ struct AppAssets {
return UIColor(named: "timelineUnreadCircleColor")!
}()
static var trashImage: UIImage = {
return UIImage(systemName: "trash")!
}()
}

View File

@ -694,7 +694,7 @@ private extension MasterFeedViewController {
}
let title = NSLocalizedString("Open Home Page", comment: "Open Home Page")
let action = UIAction(title: title, image: UIImage(systemName: "safari")) { action in
let action = UIAction(title: title, image: AppAssets.safariImage) { action in
UIApplication.shared.open(url, options: [:])
}
return action
@ -724,7 +724,7 @@ private extension MasterFeedViewController {
}
let title = NSLocalizedString("Copy Feed URL", comment: "Copy Feed URL")
let action = UIAction(title: title, image: UIImage(systemName: "doc.on.doc")) { action in
let action = UIAction(title: title, image: AppAssets.copyImage) { action in
UIPasteboard.general.url = url
}
return action
@ -754,7 +754,7 @@ private extension MasterFeedViewController {
}
let title = NSLocalizedString("Copy Home Page URL", comment: "Copy Home Page URL")
let action = UIAction(title: title, image: UIImage(systemName: "doc.on.doc")) { action in
let action = UIAction(title: title, image: AppAssets.copyImage) { action in
UIPasteboard.general.url = url
}
return action
@ -778,7 +778,7 @@ private extension MasterFeedViewController {
func deleteAction(indexPath: IndexPath) -> UIAction {
let title = NSLocalizedString("Delete", comment: "Delete")
let action = UIAction(title: title, image: UIImage(systemName: "trash")) { action in
let action = UIAction(title: title, image: AppAssets.trashImage) { action in
self.delete(indexPath: indexPath)
}
return action
@ -786,7 +786,7 @@ private extension MasterFeedViewController {
func renameAction(indexPath: IndexPath) -> UIAction {
let title = NSLocalizedString("Rename", comment: "Rename")
let action = UIAction(title: title, image: UIImage(systemName: "square.and.pencil")) { action in
let action = UIAction(title: title, image: AppAssets.editImage) { action in
self.rename(indexPath: indexPath)
}
return action