mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added Open Collective support option
This commit is contained in:
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -2,3 +2,4 @@ github: [exelban]
|
||||
patreon: exelban
|
||||
ko_fi: exelban
|
||||
custom: ["https://www.paypal.com/donate?hosted_button_id=3DS5JHDBATMTC"]
|
||||
open_collective: stats
|
||||
21
Stats/Supporting Files/Assets.xcassets/support/open_collective.imageset/Contents.json
vendored
Normal file
21
Stats/Supporting Files/Assets.xcassets/support/open_collective.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "open_collective.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Stats/Supporting Files/Assets.xcassets/support/open_collective.imageset/open_collective.png
vendored
Normal file
BIN
Stats/Supporting Files/Assets.xcassets/support/open_collective.imageset/open_collective.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -278,7 +278,7 @@ private class SettingsView: NSView {
|
||||
|
||||
private func supportView() -> NSViewController {
|
||||
let vc: NSViewController = NSViewController(nibName: nil, bundle: nil)
|
||||
let view: NSStackView = NSStackView(frame: NSRect(x: 0, y: 0, width: 160, height: 40))
|
||||
let view: NSStackView = NSStackView(frame: NSRect(x: 0, y: 0, width: 200, height: 40))
|
||||
view.spacing = 0
|
||||
view.orientation = .horizontal
|
||||
|
||||
@@ -286,6 +286,7 @@ private class SettingsView: NSView {
|
||||
view.addArrangedSubview(supportButton(name: "PayPal", image: "paypal", action: #selector(self.openPaypal)))
|
||||
view.addArrangedSubview(supportButton(name: "Ko-fi", image: "ko-fi", action: #selector(self.openKofi)))
|
||||
view.addArrangedSubview(supportButton(name: "Patreon", image: "patreon", action: #selector(self.openPatreon)))
|
||||
view.addArrangedSubview(supportButton(name: "Open Collective", image: "open_collective", action: #selector(self.openOpencollective)))
|
||||
|
||||
vc.view = view
|
||||
return vc
|
||||
@@ -338,6 +339,10 @@ private class SettingsView: NSView {
|
||||
NSWorkspace.shared.open(URL(string: "https://patreon.com/exelban")!)
|
||||
}
|
||||
|
||||
@objc private func openOpencollective(_ sender: NSButton) {
|
||||
NSWorkspace.shared.open(URL(string: "https://opencollective.com/stats")!)
|
||||
}
|
||||
|
||||
@objc private func closeApp(_ sender: Any) {
|
||||
NSApp.terminate(sender)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user