Add new images used in context menus to AppAssets where they belong
This commit is contained in:
parent
aabe950b2b
commit
066616b005
@ -36,6 +36,14 @@ struct AppAssets {
|
|||||||
return image.withTintColor(AppAssets.chevronDisclosureColor, renderingMode: .alwaysOriginal)
|
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 = {
|
static var faviconTemplateImage: RSImage = {
|
||||||
return RSImage(named: "faviconTemplateImage")!
|
return RSImage(named: "faviconTemplateImage")!
|
||||||
}()
|
}()
|
||||||
@ -52,6 +60,10 @@ struct AppAssets {
|
|||||||
return UIColor(named: "netNewsWireBlueColor")!
|
return UIColor(named: "netNewsWireBlueColor")!
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
static var safariImage: UIImage = {
|
||||||
|
return UIImage(systemName: "safari")!
|
||||||
|
}()
|
||||||
|
|
||||||
static var selectedTextColor: UIColor = {
|
static var selectedTextColor: UIColor = {
|
||||||
return UIColor(named: "selectedTextColor")!
|
return UIColor(named: "selectedTextColor")!
|
||||||
}()
|
}()
|
||||||
@ -89,4 +101,8 @@ struct AppAssets {
|
|||||||
return UIColor(named: "timelineUnreadCircleColor")!
|
return UIColor(named: "timelineUnreadCircleColor")!
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
static var trashImage: UIImage = {
|
||||||
|
return UIImage(systemName: "trash")!
|
||||||
|
}()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -694,7 +694,7 @@ private extension MasterFeedViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let title = NSLocalizedString("Open Home Page", comment: "Open Home Page")
|
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: [:])
|
UIApplication.shared.open(url, options: [:])
|
||||||
}
|
}
|
||||||
return action
|
return action
|
||||||
@ -724,7 +724,7 @@ private extension MasterFeedViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let title = NSLocalizedString("Copy Feed URL", comment: "Copy Feed URL")
|
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
|
UIPasteboard.general.url = url
|
||||||
}
|
}
|
||||||
return action
|
return action
|
||||||
@ -754,7 +754,7 @@ private extension MasterFeedViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let title = NSLocalizedString("Copy Home Page URL", comment: "Copy Home Page URL")
|
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
|
UIPasteboard.general.url = url
|
||||||
}
|
}
|
||||||
return action
|
return action
|
||||||
@ -778,7 +778,7 @@ private extension MasterFeedViewController {
|
|||||||
|
|
||||||
func deleteAction(indexPath: IndexPath) -> UIAction {
|
func deleteAction(indexPath: IndexPath) -> UIAction {
|
||||||
let title = NSLocalizedString("Delete", comment: "Delete")
|
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)
|
self.delete(indexPath: indexPath)
|
||||||
}
|
}
|
||||||
return action
|
return action
|
||||||
@ -786,7 +786,7 @@ private extension MasterFeedViewController {
|
|||||||
|
|
||||||
func renameAction(indexPath: IndexPath) -> UIAction {
|
func renameAction(indexPath: IndexPath) -> UIAction {
|
||||||
let title = NSLocalizedString("Rename", comment: "Rename")
|
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)
|
self.rename(indexPath: indexPath)
|
||||||
}
|
}
|
||||||
return action
|
return action
|
||||||
|
Loading…
x
Reference in New Issue
Block a user