Refactor ExtensionPoints to make them easier to create in the future.

This commit is contained in:
Maurice Parker
2020-04-14 16:47:05 -05:00
parent f5aac9516f
commit e206909237
16 changed files with 381 additions and 246 deletions

View File

@@ -14,7 +14,20 @@ import RSCore
final class SendToMicroBlogCommand: ExtensionPoint, SendToCommand {
let extensionPointType = ExtensionPointType.microblog
static var isSinglton: Bool = true
static var title: String = NSLocalizedString("Micro.blog", comment: "Micro.blog")
static var templateImage = AppAssets.extensionPointMicroblog
static var description: NSAttributedString = {
let attrString = SendToMicroBlogCommand.makeAttrString("This extension enables share menu functionality to send selected article text to Micro.blog. You need the Micro.blog application for this to work.")
let range = NSRange(location: 81, length: 10)
attrString.beginEditing()
attrString.addAttribute(NSAttributedString.Key.link, value: "https://micro.blog", range: range)
attrString.addAttribute(NSAttributedString.Key.foregroundColor, value: NSColor.systemBlue, range: range)
attrString.endEditing()
return attrString
}()
let extensionPointID = ExtensionPointIdentifer.microblog
var image: NSImage? {