Commit cd5fa944 authored by Jose Blaya's avatar Jose Blaya Committed by Tommie Podzemski
Browse files

Show Expiration date in Accounts page

WIP: Podfile pointing to local
parent 08b23e02
......@@ -41,6 +41,8 @@ class AccountViewController: AutolayoutViewController {
@IBOutlet private weak var labelFooterOther: UILabel!
@IBOutlet weak var labelExpiryInformation: UILabel!
@IBOutlet private weak var itemUpdate: UIBarButtonItem!
@IBOutlet private weak var viewSeparator: UIView!
......@@ -270,6 +272,11 @@ class AccountViewController: AutolayoutViewController {
textUsername.text = currentUser?.credentials.username
textPassword.text = currentUser?.credentials.password
if let userInfo = currentUser?.info {
labelExpiryInformation.text = L10n.Account.ExpiryDate.information(userInfo.humanReadableExpirationDate())
styleExpirationDate()
}
establishUncreditedVisibility()
}
......@@ -299,12 +306,22 @@ class AccountViewController: AutolayoutViewController {
Theme.current.applyInput(textUsername)
Theme.current.applyInput(textPassword)
Theme.current.applyDivider(viewSeparator)
for label in [labelFooterEye!, labelFooterOther!] {
for label in [labelFooterEye!, labelFooterOther!, labelExpiryInformation!] {
Theme.current.applySmallInfo(label, appearance: .dark)
}
Theme.current.applyBody2(labelRestoreTitle, appearance: .dark)
Theme.current.applyBody1(labelRestoreInfo, appearance: .dark)
Theme.current.applyTextButton(buttonRestore)
styleExpirationDate()
}
private func styleExpirationDate() {
if let userInfo = currentUser?.info {
Theme.current.makeSmallLabelToStandOut(labelExpiryInformation,
withTextToStandOut: userInfo.humanReadableExpirationDate())
}
}
}
......
......@@ -57,6 +57,13 @@ internal enum L10n {
internal static let footer = L10n.tr("Localizable", "account.other.footer")
}
internal enum ExpiryDate {
/// Your plan will expire on %@.
internal static func information(_ p1: String) -> String {
return L10n.tr("Localizable", "account.expiry.date.information", p1)
}
}
internal enum Password {
/// Password
internal static let caption = L10n.tr("Localizable", "account.password.caption")
......
......@@ -89,6 +89,7 @@
"account.accessibility.eye" = "Eye icon";
"account.accessibility.eye.hint.reveal" = "Tap to reveal password";
"account.accessibility.eye.hint.conceal" = "Tap to conceal password";
"account.expiry.date.information" = "Your plan will expire on %@";
// SETTINGS
......
......@@ -133,10 +133,10 @@
<rect key="frame" x="8" y="8" width="304" height="590"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="y5u-fx-j5D">
<rect key="frame" x="0.0" y="0.0" width="304" height="580"/>
<rect key="frame" x="0.0" y="0.0" width="304" height="617"/>
<subviews>
<view contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UmJ-XK-Iyd">
<rect key="frame" x="8" y="0.0" width="288" height="580"/>
<rect key="frame" x="8" y="0.0" width="288" height="617"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HaF-A5-63e">
<rect key="frame" x="20" y="20" width="248" height="173.66666666666666"/>
......@@ -228,7 +228,7 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PNt-Yg-Bg9">
<rect key="frame" x="20" y="223.66666666666666" width="248" height="120.66666666666666"/>
<rect key="frame" x="20" y="223.66666666666669" width="248" height="158"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tap the eye icon to reveal or conceal your password." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iU7-Y9-puP">
<rect key="frame" x="0.0" y="0.0" width="248" height="33.666666666666664"/>
......@@ -243,26 +243,35 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Get the Private Internet " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oH2-mq-Efa">
<rect key="frame" x="0.0" y="140.66666666666663" width="248" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="oH2-mq-Efa" secondAttribute="trailing" id="2ee-d0-8gm"/>
<constraint firstAttribute="trailing" secondItem="yPN-Yu-LHa" secondAttribute="trailing" id="4hf-zN-HXH"/>
<constraint firstAttribute="bottom" secondItem="yPN-Yu-LHa" secondAttribute="bottom" id="55B-UD-LPe"/>
<constraint firstItem="iU7-Y9-puP" firstAttribute="leading" secondItem="PNt-Yg-Bg9" secondAttribute="leading" id="640-Dh-hcF"/>
<constraint firstAttribute="trailing" secondItem="iU7-Y9-puP" secondAttribute="trailing" id="7TB-7y-GN8"/>
<constraint firstAttribute="bottom" secondItem="oH2-mq-Efa" secondAttribute="bottom" id="806-qy-VJj"/>
<constraint firstItem="yPN-Yu-LHa" firstAttribute="leading" secondItem="PNt-Yg-Bg9" secondAttribute="leading" id="HAi-7y-q5m"/>
<constraint firstItem="oH2-mq-Efa" firstAttribute="top" secondItem="yPN-Yu-LHa" secondAttribute="bottom" constant="20" id="Jqu-Ma-eDX"/>
<constraint firstItem="oH2-mq-Efa" firstAttribute="leading" secondItem="PNt-Yg-Bg9" secondAttribute="leading" id="NoP-Ek-Xuz"/>
<constraint firstItem="yPN-Yu-LHa" firstAttribute="top" secondItem="iU7-Y9-puP" secondAttribute="bottom" constant="20" id="mAI-oL-7Ck"/>
<constraint firstItem="iU7-Y9-puP" firstAttribute="top" secondItem="PNt-Yg-Bg9" secondAttribute="top" id="usg-IH-1WY"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nSv-L3-alF">
<rect key="frame" x="20" y="364.33333333333331" width="248" height="1"/>
<rect key="frame" x="20" y="401.33333333333331" width="248" height="1"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="FCR-RR-vPe"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E1e-eL-IsV">
<rect key="frame" x="20" y="385.33333333333331" width="248" height="174.66666666666669"/>
<rect key="frame" x="20" y="422.33333333333331" width="248" height="174.66666666666669"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Restore uncredited purchase" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MN6-GE-zWd">
<rect key="frame" x="0.0" y="0.0" width="248" height="21"/>
......@@ -271,7 +280,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WVl-6h-tT4">
<rect key="frame" x="0.0" y="41.000000000000007" width="248" height="83.666666666666686"/>
<rect key="frame" x="0.0" y="41.000000000000064" width="248" height="83.666666666666686"/>
<string key="text">If you renewed your plan but your account still says it's about to expire, you can restart the renewal from here. You will not be charged during this process.</string>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
......@@ -377,6 +386,7 @@
<outlet property="buttonRestore" destination="FCX-mJ-yUF" id="8nc-LF-QdD"/>
<outlet property="itemUpdate" destination="BPX-6h-kgi" id="vfF-C4-zPm"/>
<outlet property="labelEmail" destination="KtP-SP-Bgg" id="HaH-yU-iOG"/>
<outlet property="labelExpiryInformation" destination="oH2-mq-Efa" id="zZE-3D-xO3"/>
<outlet property="labelFooterEye" destination="iU7-Y9-puP" id="8zy-0F-Gt0"/>
<outlet property="labelFooterOther" destination="yPN-Yu-LHa" id="nid-dn-8p0"/>
<outlet property="labelPassword" destination="eWh-nb-DJI" id="IPt-h3-Ctc"/>
......
......@@ -52,9 +52,9 @@ end
def shared_main_pods
pod 'AlamofireImage'
#library_by_path('..')
library_by_path('/Users/jblaya/Desktop/PIA_iOS_Projects/')
#library_by_git('b8a1a95')
library_by_version('~> 1.1.3')
#library_by_version('~> 1.1.3')
end
def app_pods
......
......@@ -10,23 +10,23 @@ PODS:
- iRate (1.12.2)
- MBProgressHUD (1.1.0)
- OpenSSL-Apple (1.1.0h)
- PIALibrary/Core (1.1.3)
- PIALibrary/Library (1.1.3):
- PIALibrary/Core (1.1.4)
- PIALibrary/Library (1.1.4):
- Alamofire (~> 4)
- Gloss (~> 2)
- PIALibrary/Core
- PIALibrary/Util
- ReachabilitySwift
- SwiftyBeaver
- PIALibrary/Mock (1.1.3):
- PIALibrary/Mock (1.1.4):
- PIALibrary/Library
- PIALibrary/UI (1.1.3):
- PIALibrary/UI (1.1.4):
- PIALibrary/Library
- SwiftyBeaver
- TPKeyboardAvoiding
- PIALibrary/Util (1.1.3):
- PIALibrary/Util (1.1.4):
- PIALibrary/Core
- PIALibrary/VPN (1.1.3):
- PIALibrary/VPN (1.1.4):
- PIALibrary/Library
- PIATunnel (~> 1.1.3)
- PIATunnel (1.1.6):
......@@ -49,10 +49,10 @@ DEPENDENCIES:
- HockeySDK
- iRate
- MBProgressHUD
- PIALibrary/Library (~> 1.1.3)
- PIALibrary/Mock (~> 1.1.3)
- PIALibrary/UI (~> 1.1.3)
- PIALibrary/VPN (~> 1.1.3)
- PIALibrary/Library (from `/Users/jblaya/Desktop/PIA_iOS_Projects//client-library-apple`)
- PIALibrary/Mock (from `/Users/jblaya/Desktop/PIA_iOS_Projects//client-library-apple`)
- PIALibrary/UI (from `/Users/jblaya/Desktop/PIA_iOS_Projects//client-library-apple`)
- PIALibrary/VPN (from `/Users/jblaya/Desktop/PIA_iOS_Projects//client-library-apple`)
- PIATunnel (~> 1.1.6)
- SideMenu (= 3.1.5)
- TPKeyboardAvoiding
......@@ -67,13 +67,16 @@ SPEC REPOS:
- iRate
- MBProgressHUD
- OpenSSL-Apple
- PIALibrary
- PIATunnel
- ReachabilitySwift
- SideMenu
- SwiftyBeaver
- TPKeyboardAvoiding
EXTERNAL SOURCES:
PIALibrary:
:path: "/Users/jblaya/Desktop/PIA_iOS_Projects//client-library-apple"
SPEC CHECKSUMS:
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
AlamofireImage: 3b35b586853abaf94ca1250f4e94cff3c21a4c0d
......@@ -83,13 +86,13 @@ SPEC CHECKSUMS:
iRate: 4fc69958788624545e5d050c8ffd20884013c3f1
MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9
OpenSSL-Apple: cd153d705ef350eb834ae7ff5f21f792b51ed208
PIALibrary: 17021e8f1add3aa5a19dcb0ac42844beb5286229
PIALibrary: 9b4aadcfdacb60278b3b32f4bb33661c95522ebf
PIATunnel: d9bff9429fd66ed33cb2f5fea53401697cb2ce05
ReachabilitySwift: 6849231cd4e06559f3b9ef4a97a0a0f96d41e09f
SideMenu: 47dbf9e4d878062d8994aed43f6e4bf6c1fea30b
SwiftyBeaver: e45759613e50b522b0e6f53b1f0f14389b45ca34
TPKeyboardAvoiding: cb69d5ddbe90ce0170e4bc2db1e5e41d4a3ad9a4
PODFILE CHECKSUM: da5e1183e81fb2615334d027efae877e77022a2e
PODFILE CHECKSUM: 848212ba49f8bd37751373c55a931ca10ec4032d
COCOAPODS: 1.5.3
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment