Add FAQ in About
This commit is contained in:
parent
b82b7d2132
commit
fedea91087
|
@ -39,7 +39,7 @@ class AboutViewController: UITableViewController, TableModelHost {
|
|||
model.setHeader(L10n.About.Sections.Share.header, for: .share)
|
||||
model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback)
|
||||
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([.joinCommunity, .writeReview], in: .feedback)
|
||||
return model
|
||||
|
@ -72,6 +72,10 @@ class AboutViewController: UITableViewController, TableModelHost {
|
|||
UIApplication.shared.open(AppConstants.URLs.website, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
||||
private func visitFAQ() {
|
||||
UIApplication.shared.open(AppConstants.URLs.faq, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
||||
private func visitDisclaimer() {
|
||||
UIApplication.shared.open(AppConstants.URLs.disclaimer, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
@ -127,6 +131,8 @@ extension AboutViewController {
|
|||
|
||||
case website
|
||||
|
||||
case faq
|
||||
|
||||
case disclaimer
|
||||
|
||||
case privacyPolicy
|
||||
|
@ -169,6 +175,11 @@ extension AboutViewController {
|
|||
cell.leftText = L10n.About.Cells.Website.caption
|
||||
return cell
|
||||
|
||||
case .faq:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.About.Cells.Faq.caption
|
||||
return cell
|
||||
|
||||
case .disclaimer:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.About.Cells.Disclaimer.caption
|
||||
|
@ -209,6 +220,9 @@ extension AboutViewController {
|
|||
case .website:
|
||||
visitWebsite()
|
||||
|
||||
case .faq:
|
||||
visitFAQ()
|
||||
|
||||
case .disclaimer:
|
||||
visitDisclaimer()
|
||||
|
||||
|
|
|
@ -191,6 +191,7 @@
|
|||
"about.sections.share.header" = "Share";
|
||||
"about.sections.feedback.header" = "Feedback";
|
||||
"about.cells.website.caption" = "Home page";
|
||||
"about.cells.faq.caption" = "FAQ";
|
||||
"about.cells.disclaimer.caption" = "Disclaimer";
|
||||
"about.cells.privacy_policy.caption" = "Privacy policy";
|
||||
"about.cells.share_twitter.caption" = "Tweet about it!";
|
||||
|
|
|
@ -122,6 +122,8 @@ class AppConstants {
|
|||
class URLs {
|
||||
static let website = URL(string: "https://\(Domain.name)")!
|
||||
|
||||
static let faq = website.appendingPathComponent("faq")
|
||||
|
||||
static let disclaimer = website.appendingPathComponent("disclaimer")
|
||||
|
||||
static let privacyPolicy = website.appendingPathComponent("privacy")
|
||||
|
|
|
@ -20,6 +20,10 @@ internal enum L10n {
|
|||
/// Disclaimer
|
||||
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 {
|
||||
/// Join community
|
||||
internal static let caption = L10n.tr("Localizable", "about.cells.join_community.caption")
|
||||
|
|
Loading…
Reference in New Issue