Skip to content

Commit

Permalink
✨ 关于界面新增个人信息
Browse files Browse the repository at this point in the history
  • Loading branch information
gee1k committed Jun 8, 2019
1 parent c89ab23 commit ed15396
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "uPic/AppDelegate.swift"
timestampString = "581680755.147431"
timestampString = "581684737.237993"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "27"
Expand Down
10 changes: 9 additions & 1 deletion uPic/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ed15396

Please sign in to comment.