Commit cfd95e82 authored by Jose Blaya's avatar Jose Blaya
Browse files

- Update internet unreachable view controller to PIAX

- Update Gift card placeholder
parent bb4518c4
......@@ -580,28 +580,28 @@
<rect key="frame" x="0.0" y="0.0" width="359" height="674"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qhh-OH-TAO">
<rect key="frame" x="0.0" y="146.99999999999997" width="359" height="380.33333333333326"/>
<rect key="frame" x="0.0" y="134" width="359" height="406"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yy6-R3-jNs">
<rect key="frame" x="39.666666666666657" y="20" width="280" height="270.33333333333331"/>
<rect key="frame" x="60" y="20" width="239" height="296"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8uv-z8-27o">
<rect key="frame" x="0.0" y="0.0" width="280" height="270.33333333333331"/>
<rect key="frame" x="0.0" y="0.0" width="239" height="296"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="image-no-internet" translatesAutoresizingMaskIntoConstraints="NO" id="Tcu-da-bn8">
<rect key="frame" x="47.333333333333343" y="0.0" width="185" height="120"/>
<rect key="frame" x="27" y="0.0" width="185" height="120"/>
<constraints>
<constraint firstAttribute="height" constant="120" id="8Td-bO-gKB"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Whoops!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hfc-Wf-wyF">
<rect key="frame" x="106.66666666666669" y="140" width="66.666666666666686" height="20"/>
<rect key="frame" x="86.333333333333343" y="140" width="66.666666666666657" height="20"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o3b-Lm-bQf">
<rect key="frame" x="20" y="170" width="240" height="100.33333333333331"/>
<rect key="frame" x="20" y="179" width="199" height="117"/>
<string key="text">No internet connection found. Please confirm that you have an internet connection and hit retry below.
You can come back to the app later to finish the process.</string>
......@@ -615,7 +615,7 @@ You can come back to the app later to finish the process.</string>
<constraint firstItem="Tcu-da-bn8" firstAttribute="top" secondItem="8uv-z8-27o" secondAttribute="top" id="5aw-Iv-GIG"/>
<constraint firstItem="hfc-Wf-wyF" firstAttribute="centerX" secondItem="8uv-z8-27o" secondAttribute="centerX" id="8oD-gE-63Q"/>
<constraint firstItem="hfc-Wf-wyF" firstAttribute="top" secondItem="Tcu-da-bn8" secondAttribute="bottom" constant="20" id="9bA-9w-m4p"/>
<constraint firstItem="o3b-Lm-bQf" firstAttribute="top" secondItem="hfc-Wf-wyF" secondAttribute="bottom" constant="10" id="KpB-LT-9gR"/>
<constraint firstItem="o3b-Lm-bQf" firstAttribute="top" secondItem="hfc-Wf-wyF" secondAttribute="bottom" constant="19" id="KpB-LT-9gR"/>
<constraint firstAttribute="trailing" secondItem="o3b-Lm-bQf" secondAttribute="trailing" constant="20" id="lLb-Zy-R0Q"/>
<constraint firstItem="Tcu-da-bn8" firstAttribute="centerX" secondItem="8uv-z8-27o" secondAttribute="centerX" id="ra9-sr-l4h"/>
<constraint firstItem="o3b-Lm-bQf" firstAttribute="leading" secondItem="8uv-z8-27o" secondAttribute="leading" constant="20" id="y3g-Ep-Gst"/>
......@@ -631,7 +631,7 @@ You can come back to the app later to finish the process.</string>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IQs-S2-9qy" customClass="ActivityButton" customModule="PIALibrary" customModuleProvider="target">
<rect key="frame" x="39.666666666666657" y="330.33333333333337" width="280" height="50"/>
<rect key="frame" x="25" y="356" width="309" height="50"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="gIH-p8-z3s"/>
......@@ -642,13 +642,13 @@ You can come back to the app later to finish the process.</string>
</view>
</subviews>
<constraints>
<constraint firstItem="IQs-S2-9qy" firstAttribute="trailing" secondItem="yy6-R3-jNs" secondAttribute="trailing" id="5Kp-kW-Egn"/>
<constraint firstItem="yy6-R3-jNs" firstAttribute="top" secondItem="Qhh-OH-TAO" secondAttribute="top" constant="20" id="8Tl-8E-nbu"/>
<constraint firstItem="yy6-R3-jNs" firstAttribute="centerX" secondItem="Qhh-OH-TAO" secondAttribute="centerX" id="F8F-b1-DEK"/>
<constraint firstItem="yy6-R3-jNs" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Qhh-OH-TAO" secondAttribute="leading" constant="20" id="ZLh-MA-MKU"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="yy6-R3-jNs" secondAttribute="trailing" constant="20" id="ant-BQ-HNI"/>
<constraint firstAttribute="trailing" secondItem="IQs-S2-9qy" secondAttribute="trailing" constant="25" id="WCF-vK-bPc"/>
<constraint firstItem="yy6-R3-jNs" firstAttribute="leading" secondItem="Qhh-OH-TAO" secondAttribute="leading" constant="60" id="ZLh-MA-MKU"/>
<constraint firstAttribute="trailing" secondItem="yy6-R3-jNs" secondAttribute="trailing" constant="60" id="ant-BQ-HNI"/>
<constraint firstAttribute="bottom" secondItem="IQs-S2-9qy" secondAttribute="bottom" id="dP7-LV-Uvk"/>
<constraint firstItem="IQs-S2-9qy" firstAttribute="leading" secondItem="yy6-R3-jNs" secondAttribute="leading" id="phQ-Pb-UTx"/>
<constraint firstItem="IQs-S2-9qy" firstAttribute="leading" secondItem="Qhh-OH-TAO" secondAttribute="leading" constant="25" id="eB7-zN-2Wh"/>
<constraint firstItem="IQs-S2-9qy" firstAttribute="top" secondItem="yy6-R3-jNs" secondAttribute="bottom" constant="40" id="x7q-fb-PLK"/>
</constraints>
</view>
......
......@@ -42,6 +42,7 @@
"redeem.error.qrcode.invalid" = "Invalid QR code sequence. Please try again.";
"redeem.accessibility.back" = "Back";
"redeem.scanqr" = "Scan QR";
"redeem.giftcard.placeholder" = "Gift card PIN";
"plan.monthly.title" = "Monthly";
"plan.yearly.title" = "Yearly";
......
......@@ -60,7 +60,7 @@ internal enum L10n {
internal static let caption = L10n.tr("Signup", "success.password.caption")
}
internal enum Redeem {
/// You will receive an email shortly with your username and password.
/// You will receive an email shortly with your username and password.\n\nYour login details
internal static let message = L10n.tr("Signup", "success.redeem.message")
/// Card redeemed successfully
internal static let title = L10n.tr("Signup", "success.redeem.title")
......@@ -265,6 +265,10 @@ internal enum L10n {
internal static let invalid = L10n.tr("Welcome", "redeem.error.qrcode.invalid")
}
}
internal enum Giftcard {
/// Gift card PIN
internal static let placeholder = L10n.tr("Welcome", "redeem.giftcard.placeholder")
}
}
internal enum Restore {
/// CONFIRM
......
......@@ -27,7 +27,7 @@ enum RedeemViewStatus {
class RedeemViewController: AutolayoutViewController, WelcomeChild {
private static let codeInvalidSet = CharacterSet.decimalDigits.inverted
private static let codePlaceholder = "1234-5678-9012-3456"
private static let codePlaceholder = L10n.Welcome.Redeem.Giftcard.placeholder
private static let codeLength = 16
......
......@@ -63,7 +63,6 @@ public class SignupFailureViewController: AutolayoutViewController, BrandableNav
Theme.current.applyNavigationBarStyle(to: self)
Theme.current.applyLightBackground(view)
Theme.current.applyLightBackground(viewContainer!)
Theme.current.applyTitle(labelTitle, appearance: .dark)
Theme.current.applySubtitle(labelMessage)
Theme.current.applyTitle(labelTitle, appearance: .dark)
}
......
......@@ -8,16 +8,14 @@
import UIKit
class SignupUnreachableViewController: AutolayoutViewController {
@IBOutlet private weak var imvPicture: UIImageView!
public class SignupUnreachableViewController: AutolayoutViewController, BrandableNavigationBar {
@IBOutlet private weak var imvPicture: UIImageView!
@IBOutlet private weak var labelTitle: UILabel!
@IBOutlet private weak var labelMessage: UILabel!
@IBOutlet private weak var buttonSubmit: PIAButton!
@IBOutlet private weak var buttonSubmit: ActivityButton!
override func viewDidLoad() {
override public func viewDidLoad() {
super.viewDidLoad()
navigationItem.hidesBackButton = true
......@@ -26,7 +24,8 @@ class SignupUnreachableViewController: AutolayoutViewController {
imvPicture.image = Asset.imageNoInternet.image
labelTitle.text = L10n.Signup.Unreachable.title
labelMessage.text = L10n.Signup.Unreachable.message
buttonSubmit.title = L10n.Signup.Unreachable.submit.uppercased()
self.styleSubmitButton()
}
@IBAction private func submit() {
......@@ -35,11 +34,21 @@ class SignupUnreachableViewController: AutolayoutViewController {
// MARK: Restylable
override func viewShouldRestyle() {
override public func viewShouldRestyle() {
super.viewShouldRestyle()
navigationItem.titleView = NavigationLogoView()
Theme.current.applyNavigationBarStyle(to: self)
Theme.current.applyLightBackground(view)
Theme.current.applyLightBackground(viewContainer!)
Theme.current.applySubtitle(labelMessage)
Theme.current.applyTitle(labelTitle, appearance: .dark)
Theme.current.applyBody1(labelMessage, appearance: .dark)
Theme.current.applyActionButton(buttonSubmit)
}
private func styleSubmitButton() {
buttonSubmit.setRounded()
buttonSubmit.style(style: TextStyle.Buttons.piaGreenButton)
buttonSubmit.setTitle(L10n.Signup.Unreachable.submit.uppercased(),
for: [])
}
}
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