Skip to content

Commit 7686620

Browse files
authored
Merge pull request #481 from XcodesOrg/matt/sponsorLink
Add Sponsor/Donate Button
2 parents e4d21ac + 99c4b49 commit 7686620

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

Xcodes/Frontend/About/AboutView.swift

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,18 @@ struct AboutView: View {
4545
}
4646
.buttonStyle(LinkButtonStyle())
4747
}
48-
49-
Text(Bundle.main.humanReadableCopyright!)
50-
.font(.footnote)
48+
HStack {
49+
Text(Bundle.main.humanReadableCopyright!)
50+
.font(.footnote)
51+
Button(action: {
52+
openURL(URL(string: "https://opencollective.com/xcodesapp")!)
53+
}) {
54+
HStack {
55+
Image(systemName: "heart.circle")
56+
Text("SponsorXcodes")
57+
}
58+
}
59+
}
5160
}
5261
}
5362
.padding()

Xcodes/Frontend/XcodeList/BottomStatusBar.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import SwiftUI
1111

1212
struct BottomStatusModifier: ViewModifier {
1313
@EnvironmentObject var appState: AppState
14+
@SwiftUI.Environment(\.openURL) var openURL: OpenURLAction
1415

1516
func body(content: Content) -> some View {
1617
VStack(spacing: 0) {
@@ -21,6 +22,14 @@ struct BottomStatusModifier: ViewModifier {
2122
Text(appState.bottomStatusBarMessage)
2223
.font(.subheadline)
2324
Spacer()
25+
Button(action: {
26+
openURL(URL(string: "https://opencollective.com/xcodesapp")!)
27+
}) {
28+
HStack {
29+
Image(systemName: "heart.circle")
30+
Text("SponsorXcodes")
31+
}
32+
}
2433
Text(Bundle.main.shortVersion!)
2534
.font(.subheadline)
2635
}

Xcodes/Resources/Localizable.xcstrings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17359,6 +17359,9 @@
1735917359
}
1736017360
}
1736117361
},
17362+
"SponsorXcodes" : {
17363+
"extractionState" : "manual"
17364+
},
1736217365
"StopInstallation" : {
1736317366
"localizations" : {
1736417367
"ca" : {

0 commit comments

Comments
 (0)