Replace source section with web section
This commit is contained in:
parent
0706d552be
commit
88124f5588
|
@ -32,15 +32,14 @@ class AboutViewController: UITableViewController, TableModelHost {
|
|||
let model: TableModel<SectionType, RowType> = {
|
||||
let model: TableModel<SectionType, RowType> = TableModel()
|
||||
model.add(.info)
|
||||
model.add(.source)
|
||||
model.add(.web)
|
||||
model.add(.share)
|
||||
model.add(.feedback)
|
||||
model.setHeader(L10n.About.Sections.Info.header, for: .info)
|
||||
model.setHeader(L10n.About.Sections.Source.header, for: .source)
|
||||
model.setHeader(L10n.About.Sections.Web.header, for: .web)
|
||||
model.setHeader(L10n.About.Sections.Share.header, for: .share)
|
||||
model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback)
|
||||
model.set([.version, .website, .disclaimer, .privacyPolicy], in: .info)
|
||||
model.set([.sourcePassepartout, .sourceTunnelKit], in: .source)
|
||||
model.set([.version], in: .info)
|
||||
model.set([.website, .disclaimer, .privacyPolicy], in: .web)
|
||||
model.set([.shareTwitter, .shareGeneric], in: .share)
|
||||
model.set([.joinCommunity, .writeReview], in: .feedback)
|
||||
return model
|
||||
|
@ -116,7 +115,7 @@ extension AboutViewController {
|
|||
enum SectionType: Int {
|
||||
case info
|
||||
|
||||
case source
|
||||
case web
|
||||
|
||||
case share
|
||||
|
||||
|
@ -132,10 +131,6 @@ extension AboutViewController {
|
|||
|
||||
case privacyPolicy
|
||||
|
||||
case sourcePassepartout
|
||||
|
||||
case sourceTunnelKit
|
||||
|
||||
case shareTwitter
|
||||
|
||||
case shareGeneric
|
||||
|
@ -184,16 +179,6 @@ extension AboutViewController {
|
|||
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
|
||||
return cell
|
||||
|
||||
case .sourceTunnelKit:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = GroupConstants.App.tunnelKitName
|
||||
return cell
|
||||
|
||||
case .shareTwitter:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.About.Cells.ShareTwitter.caption
|
||||
|
@ -230,12 +215,6 @@ extension AboutViewController {
|
|||
case .privacyPolicy:
|
||||
visitPrivacyPolicy()
|
||||
|
||||
case .sourcePassepartout:
|
||||
visitRepository(AppConstants.Repos.passepartout)
|
||||
|
||||
case .sourceTunnelKit:
|
||||
visitRepository(AppConstants.Repos.tunnelKit)
|
||||
|
||||
case .shareTwitter:
|
||||
tweetAboutApp()
|
||||
|
||||
|
|
|
@ -185,11 +185,10 @@
|
|||
"issue_reporter.email.description" = "description of the issue:";
|
||||
|
||||
"about.title" = "About";
|
||||
"about.sections.info.header" = "General";
|
||||
"about.sections.source.header" = "Source code";
|
||||
"about.sections.web.header" = "Web";
|
||||
"about.sections.share.header" = "Share";
|
||||
"about.sections.feedback.header" = "Feedback";
|
||||
"about.cells.website.caption" = "Visit website";
|
||||
"about.cells.website.caption" = "Home page";
|
||||
"about.cells.disclaimer.caption" = "Disclaimer";
|
||||
"about.cells.privacy_policy.caption" = "Privacy policy";
|
||||
"about.cells.share_twitter.caption" = "Tweet about it!";
|
||||
|
|
|
@ -37,7 +37,7 @@ internal enum L10n {
|
|||
internal static let caption = L10n.tr("Localizable", "about.cells.share_twitter.caption")
|
||||
}
|
||||
internal enum Website {
|
||||
/// Visit website
|
||||
/// Home page
|
||||
internal static let caption = L10n.tr("Localizable", "about.cells.website.caption")
|
||||
}
|
||||
internal enum WriteReview {
|
||||
|
@ -50,17 +50,13 @@ internal enum L10n {
|
|||
/// Feedback
|
||||
internal static let header = L10n.tr("Localizable", "about.sections.feedback.header")
|
||||
}
|
||||
internal enum Info {
|
||||
/// General
|
||||
internal static let header = L10n.tr("Localizable", "about.sections.info.header")
|
||||
}
|
||||
internal enum Share {
|
||||
/// Share
|
||||
internal static let header = L10n.tr("Localizable", "about.sections.share.header")
|
||||
}
|
||||
internal enum Source {
|
||||
/// Source code
|
||||
internal static let header = L10n.tr("Localizable", "about.sections.source.header")
|
||||
internal enum Web {
|
||||
/// Web
|
||||
internal static let header = L10n.tr("Localizable", "about.sections.web.header")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue