Browse Source

quick additions!

pull/92/head
Abhishek 5 years ago
parent
commit
85762c9512
  1. 54
      Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/Contents.json
  2. BIN
      Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x.png
  3. BIN
      Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x_light.png
  4. BIN
      Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x.png
  5. BIN
      Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x_light.png
  6. 2
      Clocker/Overall App/Themer.swift
  7. 28
      Clocker/Panel/ParentPanelController.swift

54
Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/Contents.json vendored

@ -0,0 +1,54 @@
{
"images" : [
{
"filename" : "share1x_light.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "share1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "share2x_light.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "share2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

BIN
Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x_light.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x_light.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

2
Clocker/Overall App/Themer.swift

@ -306,7 +306,7 @@ extension Themer {
case .dark:
return NSImage(named: NSImage.Name("SharingDarkIcon"))!
case .system:
return NSImage(named: NSImage.shareTemplateName)!
return NSImage(named: NSImage.Name("Sharing Dynamic"))!
}
}

28
Clocker/Panel/ParentPanelController.swift

@ -955,20 +955,38 @@ class ParentPanelController: NSWindowController {
Logger.log(object: custom, for: "Opened Localization Link")
}
@objc func rate() {
guard let sourceURL = URL(string: AboutUsConstants.AppStoreLink) else { return }
NSWorkspace.shared.open(sourceURL)
}
@IBAction func showMoreOptions(_ sender: NSButton) {
let menuItem = NSMenu(title: "More Options")
let terminateOption = NSMenuItem(title: "Quit Clocker",
action: #selector(terminateClocker), keyEquivalent: "")
let rateClocker = NSMenuItem(title: "Support Clocker",
action: #selector(terminateClocker), keyEquivalent: "")
let sendFeedback = NSMenuItem(title: "Send Feedback",
let rateClocker = NSMenuItem(title: "Support Clocker...",
action: #selector(rate), keyEquivalent: "")
let sendFeedback = NSMenuItem(title: "Send Feedback...",
action: #selector(reportIssue), keyEquivalent: "")
let localizeClocker = NSMenuItem(title: "Localize Clocker in your own language",
let localizeClocker = NSMenuItem(title: "Localize Clocker...",
action: #selector(openCrowdin), keyEquivalent: "")
menuItem.addItem(terminateOption)
let appDisplayName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") ?? "Clocker"
let shortVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") ?? "N/A"
let longVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") ?? "N/A"
let versionInfo = "\(appDisplayName) \(shortVersion) (\(longVersion))"
let clockerVersionInfo = NSMenuItem(title: versionInfo, action: nil, keyEquivalent: "")
clockerVersionInfo.isEnabled = false
menuItem.addItem(rateClocker)
menuItem.addItem(sendFeedback)
menuItem.addItem(localizeClocker)
menuItem.addItem(NSMenuItem.separator())
menuItem.addItem(clockerVersionInfo)
menuItem.addItem(NSMenuItem.separator())
menuItem.addItem(terminateOption)
NSMenu.popUpContextMenu(menuItem,
with: NSApp.currentEvent!,
for: sender)

Loading…
Cancel
Save