Move feedback section to main screen
This commit is contained in:
parent
1d47650a16
commit
a6745ceec7
|
@ -35,14 +35,11 @@ class AboutViewController: UITableViewController, TableModelHost {
|
|||
model.add(.info)
|
||||
model.add(.web)
|
||||
model.add(.share)
|
||||
model.add(.feedback)
|
||||
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], in: .info)
|
||||
model.set([.website, .faq, .disclaimer, .privacyPolicy], in: .web)
|
||||
model.set([.shareTwitter, .shareGeneric], in: .share)
|
||||
model.set([.joinCommunity, .writeReview], in: .feedback)
|
||||
return model
|
||||
}()
|
||||
|
||||
|
@ -100,15 +97,6 @@ class AboutViewController: UITableViewController, TableModelHost {
|
|||
present(vc, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
private func postSupportRequest() {
|
||||
UIApplication.shared.open(AppConstants.URLs.subreddit, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
||||
private func writeReview() {
|
||||
let url = AppConstants.URLs.review(withId: GroupConstants.App.appId)
|
||||
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
||||
@IBAction private func dismiss() {
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
@ -123,8 +111,6 @@ extension AboutViewController {
|
|||
case web
|
||||
|
||||
case share
|
||||
|
||||
case feedback
|
||||
}
|
||||
|
||||
enum RowType: Int {
|
||||
|
@ -141,10 +127,6 @@ extension AboutViewController {
|
|||
case shareTwitter
|
||||
|
||||
case shareGeneric
|
||||
|
||||
case joinCommunity
|
||||
|
||||
case writeReview
|
||||
}
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
|
@ -200,16 +182,6 @@ extension AboutViewController {
|
|||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.About.Cells.ShareGeneric.caption
|
||||
return cell
|
||||
|
||||
case .joinCommunity:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.About.Cells.JoinCommunity.caption
|
||||
return cell
|
||||
|
||||
case .writeReview:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.About.Cells.WriteReview.caption
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -235,12 +207,6 @@ extension AboutViewController {
|
|||
|
||||
case .shareGeneric:
|
||||
inviteFriend(sender: tableView.cellForRow(at: indexPath))
|
||||
|
||||
case .joinCommunity:
|
||||
postSupportRequest()
|
||||
|
||||
case .writeReview:
|
||||
writeReview()
|
||||
}
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ class OrganizerViewController: UITableViewController, TableModelHost {
|
|||
model.add(.siri)
|
||||
}
|
||||
model.add(.support)
|
||||
model.add(.feedback)
|
||||
model.add(.about)
|
||||
model.add(.destruction)
|
||||
model.setHeader(L10n.Service.Sections.Vpn.header, for: .vpn)
|
||||
|
@ -65,8 +66,10 @@ class OrganizerViewController: UITableViewController, TableModelHost {
|
|||
model.set([.siriShortcuts], in: .siri)
|
||||
}
|
||||
model.setHeader(L10n.Organizer.Sections.Support.header, for: .support)
|
||||
model.setHeader(L10n.Organizer.Sections.Feedback.header, for: .feedback)
|
||||
model.set([.connectionStatus], in: .vpn)
|
||||
model.set([.donate, .patreon, .translate], in: .support)
|
||||
model.set([.joinCommunity, .writeReview], in: .feedback)
|
||||
model.set([.openAbout], in: .about)
|
||||
model.set([.uninstall], in: .destruction)
|
||||
if AppConstants.Flags.isBeta {
|
||||
|
@ -315,6 +318,11 @@ class OrganizerViewController: UITableViewController, TableModelHost {
|
|||
UIApplication.shared.open(AppConstants.URLs.subreddit, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
||||
private func writeReview() {
|
||||
let url = AppConstants.URLs.review(withId: GroupConstants.App.appId)
|
||||
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
private func testDisplayLog() {
|
||||
|
@ -350,6 +358,8 @@ extension OrganizerViewController {
|
|||
case siri
|
||||
|
||||
case support
|
||||
|
||||
case feedback
|
||||
|
||||
case about
|
||||
|
||||
|
@ -374,6 +384,10 @@ extension OrganizerViewController {
|
|||
case patreon
|
||||
|
||||
case translate
|
||||
|
||||
case joinCommunity
|
||||
|
||||
case writeReview
|
||||
|
||||
case openAbout
|
||||
|
||||
|
@ -452,6 +466,16 @@ extension OrganizerViewController {
|
|||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.Organizer.Cells.Translate.caption
|
||||
return cell
|
||||
|
||||
case .joinCommunity:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.Organizer.Cells.JoinCommunity.caption
|
||||
return cell
|
||||
|
||||
case .writeReview:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.Organizer.Cells.WriteReview.caption
|
||||
return cell
|
||||
|
||||
case .openAbout:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
|
@ -502,6 +526,12 @@ extension OrganizerViewController {
|
|||
case .translate:
|
||||
offerTranslation()
|
||||
|
||||
case .joinCommunity:
|
||||
subscribeSubreddit()
|
||||
|
||||
case .writeReview:
|
||||
writeReview()
|
||||
|
||||
case .openAbout:
|
||||
about()
|
||||
|
||||
|
|
|
@ -830,7 +830,7 @@ extension ServiceViewController: UITableViewDataSource, UITableViewDelegate, Tog
|
|||
|
||||
case .joinCommunity:
|
||||
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
|
||||
cell.leftText = L10n.About.Cells.JoinCommunity.caption
|
||||
cell.leftText = L10n.Organizer.Cells.JoinCommunity.caption
|
||||
return cell
|
||||
|
||||
case .reportIssue:
|
||||
|
@ -1035,7 +1035,7 @@ extension ServiceViewController: UITableViewDataSource, UITableViewDelegate, Tog
|
|||
}
|
||||
model.setHeader(L10n.Service.Sections.Trusted.header, for: .trusted)
|
||||
model.setHeader(L10n.Service.Sections.Diagnostics.header, for: .diagnostics)
|
||||
model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback)
|
||||
model.setHeader(L10n.Organizer.Sections.Feedback.header, for: .feedback)
|
||||
}
|
||||
|
||||
// footers
|
||||
|
|
|
@ -44,10 +44,13 @@
|
|||
"organizer.sections.siri.header" = "Siri";
|
||||
"organizer.sections.siri.footer" = "Get help from Siri to speed up your most common interactions with the app.";
|
||||
"organizer.sections.support.header" = "Support";
|
||||
"organizer.sections.feedback.header" = "Feedback";
|
||||
"organizer.cells.profile.value.current" = "In use";
|
||||
"organizer.cells.add_provider.caption" = "Add new provider";
|
||||
"organizer.cells.add_host.caption" = "Add new host";
|
||||
"organizer.cells.siri_shortcuts.caption" = "Manage shortcuts";
|
||||
"organizer.cells.join_community.caption" = "Join community";
|
||||
"organizer.cells.write_review.caption" = "Write a review";
|
||||
"organizer.cells.donate.caption" = "Make a donation";
|
||||
"organizer.cells.patreon.caption" = "Support me on Patreon";
|
||||
"organizer.cells.translate.caption" = "Offer to translate";
|
||||
|
@ -245,15 +248,12 @@
|
|||
"about.title" = "About";
|
||||
"about.sections.web.header" = "Web";
|
||||
"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!";
|
||||
"about.cells.share_generic.caption" = "Invite a friend";
|
||||
"about.cells.join_community.caption" = "Join community";
|
||||
"about.cells.write_review.caption" = "Write a review";
|
||||
|
||||
"donation.title" = "Donate";
|
||||
"donation.sections.one_time.header" = "One time";
|
||||
|
|
|
@ -44,10 +44,13 @@
|
|||
"organizer.sections.siri.header" = "Siri";
|
||||
"organizer.sections.siri.footer" = "Chiedi aiuto a Siri per velocizzare le tue interazioni più frequenti con l'app.";
|
||||
"organizer.sections.support.header" = "Supporto";
|
||||
"organizer.sections.feedback.header" = "Feedback";
|
||||
"organizer.cells.profile.value.current" = "In uso";
|
||||
"organizer.cells.add_provider.caption" = "Aggiungi provider";
|
||||
"organizer.cells.add_host.caption" = "Aggiungi host";
|
||||
"organizer.cells.siri_shortcuts.caption" = "Gestisci comandi rapidi";
|
||||
"organizer.cells.join_community.caption" = "Entra nella community";
|
||||
"organizer.cells.write_review.caption" = "Scrivi una recensione";
|
||||
"organizer.cells.donate.caption" = "Fai una donazione";
|
||||
"organizer.cells.patreon.caption" = "Supportami su Patreon";
|
||||
"organizer.cells.translate.caption" = "Offri una traduzione";
|
||||
|
@ -238,15 +241,12 @@
|
|||
"about.title" = "Informazioni su";
|
||||
"about.sections.web.header" = "Web";
|
||||
"about.sections.share.header" = "Condividi";
|
||||
"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" = "Manda un Tweet!";
|
||||
"about.cells.share_generic.caption" = "Invita un amico";
|
||||
"about.cells.join_community.caption" = "Entra nella community";
|
||||
"about.cells.write_review.caption" = "Scrivi una recensione";
|
||||
|
||||
"donation.title" = "Donazione";
|
||||
"donation.sections.one_time.header" = "Unica";
|
||||
|
|
|
@ -24,10 +24,6 @@ public enum L10n {
|
|||
/// FAQ
|
||||
public static let caption = L10n.tr("Localizable", "about.cells.faq.caption")
|
||||
}
|
||||
public enum JoinCommunity {
|
||||
/// Join community
|
||||
public static let caption = L10n.tr("Localizable", "about.cells.join_community.caption")
|
||||
}
|
||||
public enum PrivacyPolicy {
|
||||
/// Privacy policy
|
||||
public static let caption = L10n.tr("Localizable", "about.cells.privacy_policy.caption")
|
||||
|
@ -44,16 +40,8 @@ public enum L10n {
|
|||
/// Home page
|
||||
public static let caption = L10n.tr("Localizable", "about.cells.website.caption")
|
||||
}
|
||||
public enum WriteReview {
|
||||
/// Write a review
|
||||
public static let caption = L10n.tr("Localizable", "about.cells.write_review.caption")
|
||||
}
|
||||
}
|
||||
public enum Sections {
|
||||
public enum Feedback {
|
||||
/// Feedback
|
||||
public static let header = L10n.tr("Localizable", "about.sections.feedback.header")
|
||||
}
|
||||
public enum Share {
|
||||
/// Share
|
||||
public static let header = L10n.tr("Localizable", "about.sections.share.header")
|
||||
|
@ -453,6 +441,10 @@ public enum L10n {
|
|||
/// Make a donation
|
||||
public static let caption = L10n.tr("Localizable", "organizer.cells.donate.caption")
|
||||
}
|
||||
public enum JoinCommunity {
|
||||
/// Join community
|
||||
public static let caption = L10n.tr("Localizable", "organizer.cells.join_community.caption")
|
||||
}
|
||||
public enum Patreon {
|
||||
/// Support me on Patreon
|
||||
public static let caption = L10n.tr("Localizable", "organizer.cells.patreon.caption")
|
||||
|
@ -475,8 +467,16 @@ public enum L10n {
|
|||
/// Remove VPN configuration
|
||||
public static let caption = L10n.tr("Localizable", "organizer.cells.uninstall.caption")
|
||||
}
|
||||
public enum WriteReview {
|
||||
/// Write a review
|
||||
public static let caption = L10n.tr("Localizable", "organizer.cells.write_review.caption")
|
||||
}
|
||||
}
|
||||
public enum Sections {
|
||||
public enum Feedback {
|
||||
/// Feedback
|
||||
public static let header = L10n.tr("Localizable", "organizer.sections.feedback.header")
|
||||
}
|
||||
public enum Hosts {
|
||||
/// Import hosts from raw .ovpn configuration files.
|
||||
public static let footer = L10n.tr("Localizable", "organizer.sections.hosts.footer")
|
||||
|
|
Loading…
Reference in New Issue