diff --git a/Passepartout-iOS/Global/SwiftGen+Segues.swift b/Passepartout-iOS/Global/SwiftGen+Segues.swift index f3493d06..a5f0bc66 100644 --- a/Passepartout-iOS/Global/SwiftGen+Segues.swift +++ b/Passepartout-iOS/Global/SwiftGen+Segues.swift @@ -23,8 +23,6 @@ internal enum StoryboardSegue { internal enum Organizer: String, SegueType { case aboutSegueIdentifier = "AboutSegueIdentifier" case addProviderSegueIdentifier = "AddProviderSegueIdentifier" - case creditsSegueIdentifier = "CreditsSegueIdentifier" - case disclaimerSegueIdentifier = "DisclaimerSegueIdentifier" case importHostSegueIdentifier = "ImportHostSegueIdentifier" case selectProfileSegueIdentifier = "SelectProfileSegueIdentifier" case showImportedHostsSegueIdentifier = "ShowImportedHostsSegueIdentifier" diff --git a/Passepartout-iOS/Scenes/Organizer/AboutViewController.swift b/Passepartout-iOS/Scenes/Organizer/AboutViewController.swift index 88a045d3..156c828e 100644 --- a/Passepartout-iOS/Scenes/Organizer/AboutViewController.swift +++ b/Passepartout-iOS/Scenes/Organizer/AboutViewController.swift @@ -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, .credits, .disclaimer, .website], in: .info) + model.set([.version, .website, .disclaimer, .privacyPolicy], in: .info) model.set([.sourcePassepartout, .sourceTunnelKit], in: .source) model.set([.shareTwitter, .shareGeneric], in: .share) model.set([.joinCommunity, .writeReview], in: .feedback) @@ -69,18 +69,18 @@ class AboutViewController: UITableViewController, TableModelHost { perform(segue: StoryboardSegue.Organizer.versionSegueIdentifier) } - private func showCredits() { - perform(segue: StoryboardSegue.Organizer.creditsSegueIdentifier) - } - - private func showDisclaimer() { - perform(segue: StoryboardSegue.Organizer.disclaimerSegueIdentifier) - } - private func visitWebsite() { UIApplication.shared.open(AppConstants.URLs.website, options: [:], completionHandler: nil) } + private func visitDisclaimer() { + UIApplication.shared.open(AppConstants.URLs.disclaimer, 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) } @@ -108,28 +108,6 @@ class AboutViewController: UITableViewController, TableModelHost { @IBAction private func dismiss() { dismiss(animated: true, completion: nil) } - - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { - guard let sid = segue.identifier, let segueType = StoryboardSegue.Organizer(rawValue: sid) else { - return - } - guard let vc = segue.destination as? LabelViewController else { - return - } - - switch segueType { - case .creditsSegueIdentifier: - var notices = AppConstants.Notices.all - notices.insert(L10n.Credits.Labels.thirdParties, at: 0) - vc.text = notices.joined(separator: "\n\n") - - case .disclaimerSegueIdentifier: - vc.text = L10n.Disclaimer.Labels.text - - default: - break - } - } } // MARK: - @@ -148,11 +126,11 @@ extension AboutViewController { enum RowType: Int { case version - case credits + case website case disclaimer - case website + case privacyPolicy case sourcePassepartout @@ -187,23 +165,23 @@ extension AboutViewController { switch model.row(at: indexPath) { case .version: let cell = Cells.setting.dequeue(from: tableView, for: indexPath) - cell.leftText = L10n.About.Cells.Version.caption + cell.leftText = L10n.Version.title cell.rightText = Utils.versionString() return cell - case .credits: + case .website: let cell = Cells.setting.dequeue(from: tableView, for: indexPath) - cell.leftText = L10n.Credits.title + cell.leftText = L10n.About.Cells.Website.caption return cell case .disclaimer: let cell = Cells.setting.dequeue(from: tableView, for: indexPath) - cell.leftText = L10n.Disclaimer.title + cell.leftText = L10n.About.Cells.Disclaimer.caption return cell - - case .website: + + case .privacyPolicy: let cell = Cells.setting.dequeue(from: tableView, for: indexPath) - cell.leftText = L10n.About.Cells.Website.caption + cell.leftText = L10n.About.Cells.PrivacyPolicy.caption return cell case .sourcePassepartout: @@ -243,15 +221,15 @@ extension AboutViewController { case .version: showVersion() - case .credits: - showCredits() - - case .disclaimer: - showDisclaimer() - case .website: visitWebsite() + case .disclaimer: + visitDisclaimer() + + case .privacyPolicy: + visitPrivacyPolicy() + case .sourcePassepartout: visitRepository(AppConstants.Repos.passepartout) diff --git a/Passepartout-iOS/Scenes/Organizer/VersionViewController.swift b/Passepartout-iOS/Scenes/Organizer/VersionViewController.swift index 3513abfc..3ed80733 100644 --- a/Passepartout-iOS/Scenes/Organizer/VersionViewController.swift +++ b/Passepartout-iOS/Scenes/Organizer/VersionViewController.swift @@ -32,12 +32,12 @@ class VersionViewController: UIViewController { @IBOutlet private weak var labelVersion: UILabel? - @IBOutlet private weak var labelCopyright: UILabel? - @IBOutlet private weak var labelIntro: UILabel? @IBOutlet private weak var buttonChangelog: UIButton? + @IBOutlet private weak var buttonCredits: UIButton? + override func awakeFromNib() { super.awakeFromNib() @@ -47,20 +47,32 @@ class VersionViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() + title = L10n.Version.title labelTitle?.text = GroupConstants.App.name labelVersion?.text = Utils.versionString() - labelCopyright?.text = GroupConstants.App.name labelIntro?.text = L10n.Version.Labels.intro buttonChangelog?.setTitle(L10n.Version.Buttons.changelog, for: .normal) - + buttonCredits?.setTitle(L10n.Version.Buttons.credits, for: .normal) + scrollView?.applyPrimaryBackground(Theme.current) - for label in [labelTitle, labelVersion, labelCopyright, labelIntro] { + for label in [labelTitle, labelVersion, labelIntro] { label?.applyLight(Theme.current) } buttonChangelog?.apply(Theme.current) + buttonCredits?.apply(Theme.current) } @IBAction private func visitChangelog() { UIApplication.shared.open(AppConstants.URLs.changelog, options: [:], completionHandler: nil) } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + guard let vc = segue.destination as? LabelViewController else { + return + } + vc.title = L10n.Credits.title + var notices = AppConstants.Notices.all + notices.insert(L10n.Credits.Labels.thirdParties, at: 0) + vc.text = notices.joined(separator: "\n\n") + } } diff --git a/Passepartout-iOS/en.lproj/Organizer.storyboard b/Passepartout-iOS/en.lproj/Organizer.storyboard index c5c6af32..a2ef1afc 100644 --- a/Passepartout-iOS/en.lproj/Organizer.storyboard +++ b/Passepartout-iOS/en.lproj/Organizer.storyboard @@ -328,10 +328,10 @@ - + - + @@ -362,6 +362,14 @@ + @@ -370,14 +378,17 @@ + + + - + @@ -411,6 +422,7 @@ + @@ -419,7 +431,7 @@ - + @@ -484,9 +496,7 @@ - - @@ -566,7 +576,6 @@ - diff --git a/Passepartout/Resources/en.lproj/Localizable.strings b/Passepartout/Resources/en.lproj/Localizable.strings index 04c2c863..962358d5 100644 --- a/Passepartout/Resources/en.lproj/Localizable.strings +++ b/Passepartout/Resources/en.lproj/Localizable.strings @@ -189,8 +189,9 @@ "about.sections.source.header" = "Source code"; "about.sections.share.header" = "Share"; "about.sections.feedback.header" = "Feedback"; -"about.cells.version.caption" = "Version"; "about.cells.website.caption" = "Visit website"; +"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"; @@ -198,11 +199,10 @@ "share.message" = "Passepartout is an user-friendly, open source OpenVPN client for iOS and macOS"; -"version.labels.intro" = "Passepartout and TunnelKit are written and maintained by Davide De Rosa (keeshux).\n\nTunnelKit is a native OpenVPN client originally forked from PIATunnel by Private Internet Access.\n\nSource code for Passepartout and TunnelKit is publicly available on GitHub under the GPLv3."; +"version.title" = "Version"; +"version.labels.intro" = "Passepartout and TunnelKit are written and maintained by Davide De Rosa (keeshux).\n\nSource code for Passepartout and TunnelKit is publicly available on GitHub under the GPLv3.\n\nPassepartout is a non-official client and is in no way affiliated with OpenVPN Inc."; "version.buttons.changelog" = "CHANGELOG"; +"version.buttons.credits" = "CREDITS"; "credits.title" = "Credits"; -"credits.labels.third_parties" = "Passepartout is a non-official client and is in no way affiliated with OpenVPN Inc.\n\nThe logo is taken from the awesome Circle Icons set by Nick Roach."; - -"disclaimer.title" = "Disclaimer"; -"disclaimer.labels.text" = "Passepartout is a VPN client based on independent work. As such, the developer -while making his best efforts to avoid it- takes no responsibility about any damage caused by the use of this software.\n\nAdditionally, the developer takes no responsibility about data usage, monitoring, logging etc. by the servers you connect to. Passepartout is not even involved in the above choices, as they're part of server-side policies.\n\nFor more information about data usage by third parties, please review the privacy policy of your VPN provider."; +"credits.labels.third_parties" = "The logo is taken from the awesome Circle Icons set by Nick Roach."; diff --git a/Passepartout/Sources/AppConstants.swift b/Passepartout/Sources/AppConstants.swift index f856014b..19b700f7 100644 --- a/Passepartout/Sources/AppConstants.swift +++ b/Passepartout/Sources/AppConstants.swift @@ -122,6 +122,10 @@ class AppConstants { class URLs { static let website = URL(string: "https://\(Domain.name)")! + static let disclaimer = website.appendingPathComponent("disclaimer") + + 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")! diff --git a/Passepartout/Sources/SwiftGen+Strings.swift b/Passepartout/Sources/SwiftGen+Strings.swift index e147cc26..4f39f5ee 100644 --- a/Passepartout/Sources/SwiftGen+Strings.swift +++ b/Passepartout/Sources/SwiftGen+Strings.swift @@ -16,10 +16,18 @@ internal enum L10n { /// About internal static let title = L10n.tr("Localizable", "about.title") internal enum Cells { + internal enum Disclaimer { + /// Disclaimer + internal static let caption = L10n.tr("Localizable", "about.cells.disclaimer.caption") + } internal enum JoinCommunity { /// 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") @@ -28,10 +36,6 @@ internal enum L10n { /// Tweet about it! internal static let caption = L10n.tr("Localizable", "about.cells.share_twitter.caption") } - internal enum Version { - /// Version - internal static let caption = L10n.tr("Localizable", "about.cells.version.caption") - } internal enum Website { /// Visit website internal static let caption = L10n.tr("Localizable", "about.cells.website.caption") @@ -193,7 +197,7 @@ internal enum L10n { /// Credits internal static let title = L10n.tr("Localizable", "credits.title") internal enum Labels { - /// Passepartout is a non-official client and is in no way affiliated with OpenVPN Inc.\n\nThe logo is taken from the awesome Circle Icons set by Nick Roach. + /// The logo is taken from the awesome Circle Icons set by Nick Roach. internal static let thirdParties = L10n.tr("Localizable", "credits.labels.third_parties") } } @@ -213,15 +217,6 @@ internal enum L10n { } } - internal enum Disclaimer { - /// Disclaimer - internal static let title = L10n.tr("Localizable", "disclaimer.title") - internal enum Labels { - /// Passepartout is a VPN client based on independent work. As such, the developer -while making his best efforts to avoid it- takes no responsibility about any damage caused by the use of this software.\n\nAdditionally, the developer takes no responsibility about data usage, monitoring, logging etc. by the servers you connect to. Passepartout is not even involved in the above choices, as they're part of server-side policies.\n\nFor more information about data usage by third parties, please review the privacy policy of your VPN provider. - internal static let text = L10n.tr("Localizable", "disclaimer.labels.text") - } - } - internal enum Endpoint { internal enum Cells { internal enum AnyAddress { @@ -611,12 +606,16 @@ internal enum L10n { } internal enum Version { + /// Version + internal static let title = L10n.tr("Localizable", "version.title") internal enum Buttons { /// CHANGELOG internal static let changelog = L10n.tr("Localizable", "version.buttons.changelog") + /// CREDITS + internal static let credits = L10n.tr("Localizable", "version.buttons.credits") } internal enum Labels { - /// Passepartout and TunnelKit are written and maintained by Davide De Rosa (keeshux).\n\nTunnelKit is a native OpenVPN client originally forked from PIATunnel by Private Internet Access.\n\nSource code for Passepartout and TunnelKit is publicly available on GitHub under the GPLv3. + /// Passepartout and TunnelKit are written and maintained by Davide De Rosa (keeshux).\n\nSource code for Passepartout and TunnelKit is publicly available on GitHub under the GPLv3.\n\nPassepartout is a non-official client and is in no way affiliated with OpenVPN Inc. internal static let intro = L10n.tr("Localizable", "version.labels.intro") } } diff --git a/README.md b/README.md index 88805650..e47fc089 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Keeping the VPN active in the background provides smoother operation, but may be ### No unrequested activity -Passepartout is a VPN client and does absolutely nothing else without your consent. The providers infrastructures are obtained via a [static GitHub API][app-api] only and only if you manually refresh them. +Passepartout is a VPN client and does absolutely nothing else without your consent. The providers infrastructures are obtained via a [static GitHub API][app-api] if and only if you manually refresh them. ### Presets for major providers @@ -84,7 +84,7 @@ Ignored: - `--mssfix` - Multiple `--remote` with different `host` values (first wins) -Other flags are ignored too but planned to be implemented. +Many other flags are ignored too but it's normally not an issue. ## Installation diff --git a/res/snap-home.png b/res/snap-home.png index 4891ea24..b4768303 100644 Binary files a/res/snap-home.png and b/res/snap-home.png differ diff --git a/res/snap-parameters.png b/res/snap-parameters.png index d02d7782..92e468b8 100644 Binary files a/res/snap-parameters.png and b/res/snap-parameters.png differ diff --git a/res/snap-profile.png b/res/snap-profile.png index 72d2caac..1af3d30f 100644 Binary files a/res/snap-profile.png and b/res/snap-profile.png differ diff --git a/res/snap-trusted.png b/res/snap-trusted.png index 3d5135f0..a2a2eeab 100644 Binary files a/res/snap-trusted.png and b/res/snap-trusted.png differ