diff --git a/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/Contents.json b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/Contents.json new file mode 100644 index 0000000..0789cf6 --- /dev/null +++ b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/Contents.json @@ -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 + } +} diff --git a/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x.png b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x.png new file mode 100644 index 0000000..6122438 Binary files /dev/null and b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x.png differ diff --git a/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x_light.png b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x_light.png new file mode 100644 index 0000000..f7772a1 Binary files /dev/null and b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share1x_light.png differ diff --git a/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x.png b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x.png new file mode 100644 index 0000000..14f83da Binary files /dev/null and b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x.png differ diff --git a/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x_light.png b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x_light.png new file mode 100644 index 0000000..7f515d4 Binary files /dev/null and b/Clocker/Media.xcassets/Sharing/Sharing Dynamic.imageset/share2x_light.png differ diff --git a/Clocker/Overall App/Themer.swift b/Clocker/Overall App/Themer.swift index cb36f4b..8a0d030 100644 --- a/Clocker/Overall App/Themer.swift +++ b/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"))! } } diff --git a/Clocker/Panel/ParentPanelController.swift b/Clocker/Panel/ParentPanelController.swift index fe83fbb..3c646e1 100644 --- a/Clocker/Panel/ParentPanelController.swift +++ b/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)