Skip to content

Commit 7e0673e

Browse files
Add external links
1 parent c10c7cb commit 7e0673e

File tree

6 files changed

+65
-20
lines changed

6 files changed

+65
-20
lines changed

Fyreplace.xcodeproj/project.pbxproj

+8-6
Original file line numberDiff line numberDiff line change
@@ -780,9 +780,10 @@
780780
FYREPLACE_API_URL_DEV = "https://dev.rest.api.fyreplace.app";
781781
FYREPLACE_API_URL_LOCAL = "http://localhost:8080";
782782
FYREPLACE_API_URL_MAIN = "https://rest.api.fyreplace.app";
783-
FYREPLACE_PRIVACY_POLICY = "https://fyreplace.net/privacy-policy";
784-
FYREPLACE_TERMS_OF_SERVICE = "https://fyreplace.net/terms-of-service";
785-
FYREPLACE_WEBSITE = "https://fyreplace.net";
783+
FYREPLACE_INFO_URL_PRIVACY_POLICY = "https://fyreplace.net/privacy-policy";
784+
FYREPLACE_INFO_URL_SOURCE_CODE = "https://github.com/fyreplace";
785+
FYREPLACE_INFO_URL_TERMS_OF_SERVICE = "https://fyreplace.net/terms-of-service";
786+
FYREPLACE_INFO_URL_WEBSITE = "https://fyreplace.net";
786787
GCC_C_LANGUAGE_STANDARD = gnu17;
787788
GCC_DYNAMIC_NO_PIC = NO;
788789
GCC_NO_COMMON_BLOCKS = YES;
@@ -852,9 +853,10 @@
852853
FYREPLACE_API_URL_DEV = "https://dev.rest.api.fyreplace.app";
853854
FYREPLACE_API_URL_LOCAL = "";
854855
FYREPLACE_API_URL_MAIN = "https://rest.api.fyreplace.app";
855-
FYREPLACE_PRIVACY_POLICY = "https://fyreplace.net/privacy-policy";
856-
FYREPLACE_TERMS_OF_SERVICE = "https://fyreplace.net/terms-of-service";
857-
FYREPLACE_WEBSITE = "https://fyreplace.net";
856+
FYREPLACE_INFO_URL_PRIVACY_POLICY = "https://fyreplace.net/privacy-policy";
857+
FYREPLACE_INFO_URL_SOURCE_CODE = "https://github.com/fyreplace";
858+
FYREPLACE_INFO_URL_TERMS_OF_SERVICE = "https://fyreplace.net/terms-of-service";
859+
FYREPLACE_INFO_URL_WEBSITE = "https://fyreplace.net";
858860
GCC_C_LANGUAGE_STANDARD = gnu17;
859861
GCC_NO_COMMON_BLOCKS = YES;
860862
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

Fyreplace/Commands/HelpCommands.swift

+4-9
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,9 @@ private struct HelpCommandsLinks: View {
1313
private var config
1414

1515
var body: some View {
16-
Link(destination: config.app.info.website) {
17-
Text("App.Help.Website")
18-
}
19-
Link(destination: config.app.info.termsOfService) {
20-
Text("App.Help.TermsOfService")
21-
}
22-
Link(destination: config.app.info.privacyPolicy) {
23-
Text("App.Help.PrivacyPolicy")
24-
}
16+
Link("App.Help.Website", destination: config.app.info.website)
17+
Link("App.Help.TermsOfService", destination: config.app.info.termsOfService)
18+
Link("App.Help.PrivacyPolicy", destination: config.app.info.privacyPolicy)
19+
Link("App.Help.SourceCode", destination: config.app.info.sourceCode)
2520
}
2621
}

Fyreplace/Config/Config.swift

+2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ struct Config {
4646
let website: URL
4747
let termsOfService: URL
4848
let privacyPolicy: URL
49+
let sourceCode: URL
4950

5051
init(_ data: [String: Any]) {
5152
website = data.url("Website")!
5253
termsOfService = data.url("TermsOfService")!
5354
privacyPolicy = data.url("PrivacyPolicy")!
55+
sourceCode = data.url("SourceCode")!
5456
}
5557
}
5658

Fyreplace/Config/Info.plist

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
<key>Info</key>
1717
<dict>
1818
<key>PrivacyPolicy</key>
19-
<string>$(FYREPLACE_PRIVACY_POLICY)</string>
19+
<string>$(FYREPLACE_INFO_URL_PRIVACY_POLICY)</string>
20+
<key>SourceCode</key>
21+
<string>$(FYREPLACE_INFO_URL_SOURCE_CODE)</string>
2022
<key>TermsOfService</key>
21-
<string>$(FYREPLACE_TERMS_OF_SERVICE)</string>
23+
<string>$(FYREPLACE_INFO_URL_TERMS_OF_SERVICE)</string>
2224
<key>Website</key>
23-
<string>$(FYREPLACE_WEBSITE)</string>
25+
<string>$(FYREPLACE_INFO_URL_WEBSITE)</string>
2426
</dict>
2527
<key>Name</key>
2628
<string>$(PRODUCT_NAME)</string>

Fyreplace/Resources/Localizable.xcstrings

+22-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,17 @@
5959
"en" : {
6060
"stringUnit" : {
6161
"state" : "translated",
62-
"value" : "Privacy Policy"
62+
"value" : "Privacy policy"
63+
}
64+
}
65+
}
66+
},
67+
"App.Help.SourceCode" : {
68+
"localizations" : {
69+
"en" : {
70+
"stringUnit" : {
71+
"state" : "translated",
72+
"value" : "Source code"
6373
}
6474
}
6575
}
@@ -69,7 +79,7 @@
6979
"en" : {
7080
"stringUnit" : {
7181
"state" : "translated",
72-
"value" : "Terms Of Service"
82+
"value" : "Terms of service"
7383
}
7484
}
7585
}
@@ -634,6 +644,16 @@
634644
}
635645
}
636646
},
647+
"Settings.About.Header" : {
648+
"localizations" : {
649+
"en" : {
650+
"stringUnit" : {
651+
"state" : "translated",
652+
"value" : "About"
653+
}
654+
}
655+
}
656+
},
637657
"Settings.DateJoined:%@" : {
638658
"localizations" : {
639659
"en" : {

Fyreplace/Views/Screens/SettingsScreen.swift

+24
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,30 @@ struct SettingsScreen: View, SettingsScreenProtocol {
6464
} header: {
6565
Text("Settings.Profile.Header")
6666
}
67+
68+
Section {
69+
Link(destination: config.app.info.website) {
70+
Label("App.Help.Website", systemImage: "safari")
71+
}
72+
.foregroundStyle(.tint)
73+
74+
Link(destination: config.app.info.termsOfService) {
75+
Label("App.Help.TermsOfService", systemImage: "shield")
76+
}
77+
.foregroundStyle(.tint)
78+
79+
Link(destination: config.app.info.privacyPolicy) {
80+
Label("App.Help.PrivacyPolicy", systemImage: "lock")
81+
}
82+
.foregroundStyle(.tint)
83+
84+
Link(destination: config.app.info.sourceCode) {
85+
Label("App.Help.SourceCode", systemImage: "curlybraces")
86+
}
87+
.foregroundStyle(.tint)
88+
} header: {
89+
Text("Settings.About.Header")
90+
}
6791
}
6892
.navigationTitle(Destination.settings.titleKey)
6993
.onAppear {

0 commit comments

Comments
 (0)