Add review link in about

This commit is contained in:
Justin Mazzocchi 2021-03-21 16:50:46 -07:00
parent 39055cf27b
commit 9cb95624e8
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C
2 changed files with 9 additions and 0 deletions

View file

@ -4,6 +4,7 @@
"about.acknowledgments" = "Acknowledgments";
"about.made-by-metabolist" = "Made by Metabolist";
"about.official-account" = "Official Account";
"about.review-on-the-app-store" = "Review on the App Store";
"about.source-code-and-issue-tracker" = "Source Code & Issue Tracker";
"about.website" = "Website";
"accessibility.activate-link-%@" = "Link: %@";

View file

@ -41,6 +41,13 @@ struct AboutView: View {
Image(systemName: "wrench.and.screwdriver")
}
}
Link(destination: Self.reviewURL) {
Label {
Text("about.review-on-the-app-store").foregroundColor(.primary)
} icon: {
Image(systemName: "star")
}
}
}
Section {
NavigationLink(
@ -57,6 +64,7 @@ private extension AboutView {
static let websiteURL = URL(string: "https://metabolist.org")!
static let officialAccountURL = URL(string: "https://mastodon.social/@metabolist")!
static let sourceCodeAndIssueTrackerURL = URL(string: "https://github.com/metabolist/metatext")!
static let reviewURL = URL(string: "https://apps.apple.com/app/metatext/id1523996615?mt=8&action=write-review")!
static var version: String {
Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? ""