From 50c9fab3940e0bbda60f92cd3cff774d8070ab98 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 4 Jan 2019 14:52:23 +0100 Subject: [PATCH] Add TunnelBear provider --- CHANGELOG.md | 6 ++++++ Passepartout-iOS/Scenes/AccountViewController.swift | 3 +++ Passepartout/Resources/en.lproj/Localizable.strings | 1 + Passepartout/Sources/Services/Infrastructure.swift | 2 ++ Passepartout/Sources/Services/InfrastructureFactory.swift | 3 ++- Passepartout/Sources/SwiftGen+Strings.swift | 2 ++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bbe58e0..e14fd4e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +- TunnelBear provider. + ## 1.0.2 (2019-03-04) ### Fixed diff --git a/Passepartout-iOS/Scenes/AccountViewController.swift b/Passepartout-iOS/Scenes/AccountViewController.swift index 2ba9e17f..70b418e6 100644 --- a/Passepartout-iOS/Scenes/AccountViewController.swift +++ b/Passepartout-iOS/Scenes/AccountViewController.swift @@ -55,6 +55,9 @@ class AccountViewController: UIViewController, TableModelHost { switch name { case .pia: guidance = V.Infrastructure.pia + + case .tunnelBear: + guidance = V.Infrastructure.tunnelbear } if guidance != nil { diff --git a/Passepartout/Resources/en.lproj/Localizable.strings b/Passepartout/Resources/en.lproj/Localizable.strings index 252f8d2f..355cfac4 100644 --- a/Passepartout/Resources/en.lproj/Localizable.strings +++ b/Passepartout/Resources/en.lproj/Localizable.strings @@ -123,6 +123,7 @@ //"account.cells.password_confirm.caption" = "Confirm"; //"account.cells.password_confirm.mismatch" = "Passwords don't match!"; "account.suggestion_footer.infrastructure.pia" = "Use your website credentials. Your username is usually numeric with a \"p\" prefix."; +"account.suggestion_footer.infrastructure.tunnelbear" = "Use your website credentials. Your username is usually your email."; "account.suggestion_footer.referral" = "Don't have an account? Tap here to get one."; "endpoint.sections.location_addresses.header" = "Addresses"; diff --git a/Passepartout/Sources/Services/Infrastructure.swift b/Passepartout/Sources/Services/Infrastructure.swift index cbd768a8..5fd197d9 100644 --- a/Passepartout/Sources/Services/Infrastructure.swift +++ b/Passepartout/Sources/Services/Infrastructure.swift @@ -30,6 +30,8 @@ struct Infrastructure: Codable { enum Name: String, Codable, Comparable { case pia = "PIA" + case tunnelBear = "TunnelBear" + var webName: String { return rawValue.lowercased() } diff --git a/Passepartout/Sources/Services/InfrastructureFactory.swift b/Passepartout/Sources/Services/InfrastructureFactory.swift index 1dcb33ce..78d4d7c3 100644 --- a/Passepartout/Sources/Services/InfrastructureFactory.swift +++ b/Passepartout/Sources/Services/InfrastructureFactory.swift @@ -56,7 +56,8 @@ class InfrastructureFactory { static let shared = InfrastructureFactory() let allNames: [Infrastructure.Name] = [ - .pia + .pia, + .tunnelBear ] private let bundle: [Infrastructure.Name: Infrastructure] diff --git a/Passepartout/Sources/SwiftGen+Strings.swift b/Passepartout/Sources/SwiftGen+Strings.swift index 78b94165..9b46fce2 100644 --- a/Passepartout/Sources/SwiftGen+Strings.swift +++ b/Passepartout/Sources/SwiftGen+Strings.swift @@ -86,6 +86,8 @@ internal enum L10n { internal enum Infrastructure { /// Use your website credentials. Your username is usually numeric with a "p" prefix. internal static let pia = L10n.tr("Localizable", "account.suggestion_footer.infrastructure.pia") + /// Use your website credentials. Your username is usually your email. + internal static let tunnelbear = L10n.tr("Localizable", "account.suggestion_footer.infrastructure.tunnelbear") } } }