Add privacy policy
This commit is contained in:
parent
482b51cb52
commit
fe85677e68
|
@ -39,7 +39,7 @@ class AboutViewController: UITableViewController, TableModelHost {
|
|||
model.setHeader(L10n.About.Sections.Source.header, for: .source)
|
||||
model.setHeader(L10n.About.Sections.Share.header, for: .share)
|
||||
model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback)
|
||||
model.set([.version, .disclaimer, .website], in: .info)
|
||||
model.set([.version, .disclaimer, .website, .privacyPolicy], in: .info)
|
||||
model.set([.sourcePassepartout, .sourceTunnelKit], in: .source)
|
||||
model.set([.shareTwitter, .shareGeneric], in: .share)
|
||||
model.set([.joinCommunity, .writeReview], in: .feedback)
|
||||
|
@ -77,6 +77,10 @@ class AboutViewController: UITableViewController, TableModelHost {
|
|||
UIApplication.shared.open(AppConstants.URLs.website, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
||||
private func visitPrivacyPolicy() {
|
||||
UIApplication.shared.open(AppConstants.URLs.privacyPolicy, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
||||
private func visitRepository(_ url: URL) {
|
||||
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
@ -143,6 +147,8 @@ extension AboutViewController {
|
|||
|
||||
case website
|
||||
|
||||
case privacyPolicy
|
||||
|
||||
case sourcePassepartout
|
||||
|
||||
case sourceTunnelKit
|
||||
|
@ -190,6 +196,11 @@ extension AboutViewController {
|
|||
cell.leftText = L10n.About.Cells.Website.caption
|
||||
return cell
|
||||
|
||||
case .privacyPolicy:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.About.Cells.PrivacyPolicy.caption
|
||||
return cell
|
||||
|
||||
case .sourcePassepartout:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = GroupConstants.App.name
|
||||
|
@ -233,6 +244,9 @@ extension AboutViewController {
|
|||
case .website:
|
||||
visitWebsite()
|
||||
|
||||
case .privacyPolicy:
|
||||
visitPrivacyPolicy()
|
||||
|
||||
case .sourcePassepartout:
|
||||
visitRepository(AppConstants.Repos.passepartout)
|
||||
|
||||
|
|
|
@ -190,6 +190,7 @@
|
|||
"about.sections.share.header" = "Share";
|
||||
"about.sections.feedback.header" = "Feedback";
|
||||
"about.cells.website.caption" = "Visit website";
|
||||
"about.cells.privacy_policy.caption" = "Privacy policy";
|
||||
"about.cells.share_twitter.caption" = "Tweet about it!";
|
||||
"about.cells.share_generic.caption" = "Invite a friend";
|
||||
"about.cells.join_community.caption" = "Join community";
|
||||
|
|
|
@ -122,6 +122,8 @@ class AppConstants {
|
|||
class URLs {
|
||||
static let website = URL(string: "https://\(Domain.name)")!
|
||||
|
||||
static let privacyPolicy = website.appendingPathComponent("privacy")
|
||||
|
||||
static let changelog = Repos.passepartout.appendingPathComponent("blob/master/CHANGELOG.md")
|
||||
|
||||
static let subreddit = URL(string: "https://www.reddit.com/r/passepartout")!
|
||||
|
|
|
@ -20,6 +20,10 @@ internal enum L10n {
|
|||
/// Join community
|
||||
internal static let caption = L10n.tr("Localizable", "about.cells.join_community.caption")
|
||||
}
|
||||
internal enum PrivacyPolicy {
|
||||
/// Privacy policy
|
||||
internal static let caption = L10n.tr("Localizable", "about.cells.privacy_policy.caption")
|
||||
}
|
||||
internal enum ShareGeneric {
|
||||
/// Invite a friend
|
||||
internal static let caption = L10n.tr("Localizable", "about.cells.share_generic.caption")
|
||||
|
|
Loading…
Reference in New Issue