Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
tunnel
liberty-tunnel-client-library-apple
Commits
cfd95e82
Commit
cfd95e82
authored
Nov 14, 2018
by
Jose Blaya
Browse files
- Update internet unreachable view controller to PIAX
- Update Gift card placeholder
parent
bb4518c4
Changes
6
Hide whitespace changes
Inline
Side-by-side
PIALibrary/Resources/UI/iOS/Signup.storyboard
View file @
cfd95e82
...
...
@@ -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=
"14
6.99999999999997
"
width=
"359"
height=
"
380.3333333333332
6"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"1
3
4"
width=
"359"
height=
"
40
6"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"yy6-R3-jNs"
>
<rect
key=
"frame"
x=
"
39.666666666666657
"
y=
"20"
width=
"2
80
"
height=
"2
70.33333333333331
"
/>
<rect
key=
"frame"
x=
"
60
"
y=
"20"
width=
"2
39
"
height=
"2
96
"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"8uv-z8-27o"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"2
80
"
height=
"2
70.33333333333331
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"2
39
"
height=
"2
96
"
/>
<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.6666666666666
86
"
height=
"20"
/>
<rect
key=
"frame"
x=
"
86.333333333333343
"
y=
"140"
width=
"66.6666666666666
57
"
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=
"17
0
"
width=
"
240
"
height=
"1
00.3333333333333
1"
/>
<rect
key=
"frame"
x=
"20"
y=
"17
9
"
width=
"
199
"
height=
"11
7
"
/>
<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=
"1
0
"
id=
"KpB-LT-9gR"
/>
<constraint
firstItem=
"o3b-Lm-bQf"
firstAttribute=
"top"
secondItem=
"hfc-Wf-wyF"
secondAttribute=
"bottom"
constant=
"1
9
"
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>
...
...
PIALibrary/Resources/UI/iOS/en.lproj/Welcome.strings
View file @
cfd95e82
...
...
@@ -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";
...
...
PIALibrary/Sources/UI/iOS/SwiftGen+Strings.swift
View file @
cfd95e82
...
...
@@ -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
...
...
PIALibrary/Sources/UI/iOS/ViewControllers/RedeemViewController.swift
View file @
cfd95e82
...
...
@@ -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
...
...
PIALibrary/Sources/UI/iOS/ViewControllers/SignupFailureViewController.swift
View file @
cfd95e82
...
...
@@ -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
)
}
...
...
PIALibrary/Sources/UI/iOS/ViewControllers/SignupInternetUnreachableViewController.swift
View file @
cfd95e82
...
...
@@ -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
:
[])
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment