From ed1539659c7014ec2a16b6498a2cd406422266ba Mon Sep 17 00:00:00 2001 From: Svend Date: Sat, 8 Jun 2019 19:06:18 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=85=B3=E4=BA=8E=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=96=B0=E5=A2=9E=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xcdebugger/Breakpoints_v2.xcbkptlist | 2 +- uPic/AppDelegate.swift | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/uPic.xcodeproj/xcuserdata/svend.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/uPic.xcodeproj/xcuserdata/svend.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index c30cf49..c745893 100644 --- a/uPic.xcodeproj/xcuserdata/svend.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/uPic.xcodeproj/xcuserdata/svend.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -10,7 +10,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "uPic/AppDelegate.swift" - timestampString = "581680755.147431" + timestampString = "581684737.237993" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "27" diff --git a/uPic/AppDelegate.swift b/uPic/AppDelegate.swift index f134982..a5ed581 100644 --- a/uPic/AppDelegate.swift +++ b/uPic/AppDelegate.swift @@ -128,12 +128,20 @@ extension AppDelegate { let alert = NSAlert() alert.alertStyle = NSAlert.Style.informational alert.messageText = NSLocalizedString("about-window.title", comment: "关于窗口的标题:关于") - alert.informativeText = "\(appInfo) \(NSLocalizedString("about-window.message", comment: "关于窗口的消息:上传图片到 https://sm.ms"))" + alert.informativeText = "\(appInfo) \(NSLocalizedString("about-window.message", comment: "关于窗口的消息:上传图片到 https://sm.ms")) \n\nAuthor: Svend Jin \nWebsite: https://svend.cc \nGithub: https://github.com/gee1k/uPic" + let button = NSButton(title: "Github", target: nil, action: #selector(openGithub)) + alert.accessoryView = button alert.addButton(withTitle: NSLocalizedString("alert-info-button.titile", comment: "提示窗口确定按钮的标题:确定")) alert.window.titlebarAppearsTransparent = true alert.runModal() } + @objc func openGithub() { + if let url = URL(string: "https://github.com/gee1k/uPic"), NSWorkspace.shared.open(url) { + print("default browser was successfully opened") + } + } + @objc func changeOutputFormat(_ sender: NSMenuItem!) { let items:[NSMenuItem] = sender.menu!.items for item in items {