Merge branch 'add-faq-link'
This commit is contained in:
commit
c9db4dc0ca
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- About link to FAQ.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Retain DNS reply order in resolved endpoint addresses. [#31](https://github.com/passepartoutvpn/passepartout-ios/pull/31)
|
- Retain DNS reply order in resolved endpoint addresses. [#31](https://github.com/passepartoutvpn/passepartout-ios/pull/31)
|
||||||
|
|
|
@ -39,7 +39,7 @@ class AboutViewController: UITableViewController, TableModelHost {
|
||||||
model.setHeader(L10n.About.Sections.Share.header, for: .share)
|
model.setHeader(L10n.About.Sections.Share.header, for: .share)
|
||||||
model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback)
|
model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback)
|
||||||
model.set([.version], in: .info)
|
model.set([.version], in: .info)
|
||||||
model.set([.website, .disclaimer, .privacyPolicy], in: .web)
|
model.set([.website, .faq, .disclaimer, .privacyPolicy], in: .web)
|
||||||
model.set([.shareTwitter, .shareGeneric], in: .share)
|
model.set([.shareTwitter, .shareGeneric], in: .share)
|
||||||
model.set([.joinCommunity, .writeReview], in: .feedback)
|
model.set([.joinCommunity, .writeReview], in: .feedback)
|
||||||
return model
|
return model
|
||||||
|
@ -72,6 +72,10 @@ class AboutViewController: UITableViewController, TableModelHost {
|
||||||
UIApplication.shared.open(AppConstants.URLs.website, options: [:], completionHandler: nil)
|
UIApplication.shared.open(AppConstants.URLs.website, options: [:], completionHandler: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func visitFAQ() {
|
||||||
|
UIApplication.shared.open(AppConstants.URLs.faq, options: [:], completionHandler: nil)
|
||||||
|
}
|
||||||
|
|
||||||
private func visitDisclaimer() {
|
private func visitDisclaimer() {
|
||||||
UIApplication.shared.open(AppConstants.URLs.disclaimer, options: [:], completionHandler: nil)
|
UIApplication.shared.open(AppConstants.URLs.disclaimer, options: [:], completionHandler: nil)
|
||||||
}
|
}
|
||||||
|
@ -127,6 +131,8 @@ extension AboutViewController {
|
||||||
|
|
||||||
case website
|
case website
|
||||||
|
|
||||||
|
case faq
|
||||||
|
|
||||||
case disclaimer
|
case disclaimer
|
||||||
|
|
||||||
case privacyPolicy
|
case privacyPolicy
|
||||||
|
@ -169,6 +175,11 @@ extension AboutViewController {
|
||||||
cell.leftText = L10n.About.Cells.Website.caption
|
cell.leftText = L10n.About.Cells.Website.caption
|
||||||
return cell
|
return cell
|
||||||
|
|
||||||
|
case .faq:
|
||||||
|
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||||
|
cell.leftText = L10n.About.Cells.Faq.caption
|
||||||
|
return cell
|
||||||
|
|
||||||
case .disclaimer:
|
case .disclaimer:
|
||||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||||
cell.leftText = L10n.About.Cells.Disclaimer.caption
|
cell.leftText = L10n.About.Cells.Disclaimer.caption
|
||||||
|
@ -209,6 +220,9 @@ extension AboutViewController {
|
||||||
case .website:
|
case .website:
|
||||||
visitWebsite()
|
visitWebsite()
|
||||||
|
|
||||||
|
case .faq:
|
||||||
|
visitFAQ()
|
||||||
|
|
||||||
case .disclaimer:
|
case .disclaimer:
|
||||||
visitDisclaimer()
|
visitDisclaimer()
|
||||||
|
|
||||||
|
|
|
@ -191,6 +191,7 @@
|
||||||
"about.sections.share.header" = "Share";
|
"about.sections.share.header" = "Share";
|
||||||
"about.sections.feedback.header" = "Feedback";
|
"about.sections.feedback.header" = "Feedback";
|
||||||
"about.cells.website.caption" = "Home page";
|
"about.cells.website.caption" = "Home page";
|
||||||
|
"about.cells.faq.caption" = "FAQ";
|
||||||
"about.cells.disclaimer.caption" = "Disclaimer";
|
"about.cells.disclaimer.caption" = "Disclaimer";
|
||||||
"about.cells.privacy_policy.caption" = "Privacy policy";
|
"about.cells.privacy_policy.caption" = "Privacy policy";
|
||||||
"about.cells.share_twitter.caption" = "Tweet about it!";
|
"about.cells.share_twitter.caption" = "Tweet about it!";
|
||||||
|
|
|
@ -122,6 +122,8 @@ class AppConstants {
|
||||||
class URLs {
|
class URLs {
|
||||||
static let website = URL(string: "https://\(Domain.name)")!
|
static let website = URL(string: "https://\(Domain.name)")!
|
||||||
|
|
||||||
|
static let faq = website.appendingPathComponent("faq")
|
||||||
|
|
||||||
static let disclaimer = website.appendingPathComponent("disclaimer")
|
static let disclaimer = website.appendingPathComponent("disclaimer")
|
||||||
|
|
||||||
static let privacyPolicy = website.appendingPathComponent("privacy")
|
static let privacyPolicy = website.appendingPathComponent("privacy")
|
||||||
|
|
|
@ -20,6 +20,10 @@ internal enum L10n {
|
||||||
/// Disclaimer
|
/// Disclaimer
|
||||||
internal static let caption = L10n.tr("Localizable", "about.cells.disclaimer.caption")
|
internal static let caption = L10n.tr("Localizable", "about.cells.disclaimer.caption")
|
||||||
}
|
}
|
||||||
|
internal enum Faq {
|
||||||
|
/// FAQ
|
||||||
|
internal static let caption = L10n.tr("Localizable", "about.cells.faq.caption")
|
||||||
|
}
|
||||||
internal enum JoinCommunity {
|
internal enum JoinCommunity {
|
||||||
/// Join community
|
/// Join community
|
||||||
internal static let caption = L10n.tr("Localizable", "about.cells.join_community.caption")
|
internal static let caption = L10n.tr("Localizable", "about.cells.join_community.caption")
|
||||||
|
|
Loading…
Reference in New Issue