Skip to content

Commit 99c4b49

Browse files
committed
Add Sponsor Button
1 parent 159f1ca commit 99c4b49

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
@@ -17251,6 +17251,9 @@
1725117251
}
1725217252
}
1725317253
},
17254+
"SponsorXcodes" : {
17255+
"extractionState" : "manual"
17256+
},
1725417257
"StopInstallation" : {
1725517258
"localizations" : {
1725617259
"ca" : {

0 commit comments

Comments
 (0)