Commit 14f4a781 authored by Thomas Markiewicz's avatar Thomas Markiewicz
Browse files

Updates for Librem One

parent 82674ee6
......@@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "piaWhiteCopy.pdf"
"filename" : "nav-logo-white@3x"
}
],
"info" : {
......
......@@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "piaDark2Copy2.pdf"
"filename" : "nav-logo@3x.png"
}
],
"info" : {
......
......@@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "piaDark2Copy2.pdf"
"filename" : "nav-logo@3x.png"
}
],
"info" : {
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="VHM-bG-giz">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="VHM-bG-giz">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
......@@ -103,6 +104,7 @@ You will not be charged during this process.</string>
</constraints>
</scrollView>
</subviews>
<viewLayoutGuide key="safeArea" id="YJk-zM-3B0"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YJk-zM-3B0" firstAttribute="trailing" secondItem="rId-M8-qSh" secondAttribute="trailing" id="04K-6z-QQR"/>
......@@ -114,7 +116,6 @@ You will not be charged during this process.</string>
<constraint firstItem="rId-M8-qSh" firstAttribute="top" secondItem="YJk-zM-3B0" secondAttribute="top" id="pmk-Hl-qxh"/>
<constraint firstItem="rId-M8-qSh" firstAttribute="top" secondItem="YJk-zM-3B0" secondAttribute="top" id="rpP-Zw-1Iy"/>
</constraints>
<viewLayoutGuide key="safeArea" id="YJk-zM-3B0"/>
<variation key="default">
<mask key="constraints">
<exclude reference="8AU-qG-eKd"/>
......@@ -199,6 +200,7 @@ You will not be charged during this process.</string>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="Sc5-Lj-D8n"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="YeP-ly-nAd" secondAttribute="trailing" id="9Zt-PV-dfh"/>
......@@ -208,7 +210,6 @@ You will not be charged during this process.</string>
<constraint firstItem="YeP-ly-nAd" firstAttribute="top" secondItem="Sc5-Lj-D8n" secondAttribute="top" id="Tht-AN-Lfq"/>
<constraint firstItem="YeP-ly-nAd" firstAttribute="leading" secondItem="ftb-sJ-jis" secondAttribute="leading" id="Vd2-VX-Fup"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Sc5-Lj-D8n"/>
</view>
<navigationItem key="navigationItem" id="kcy-yZ-2yN"/>
<connections>
......@@ -301,7 +302,7 @@ You will not be charged during this process.</string>
<action selector="logIn:" destination="gOX-c2-oGJ" eventType="touchUpInside" id="vRP-G6-Uj9"/>
</connections>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Emv-5o-nzd">
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Emv-5o-nzd">
<rect key="frame" x="0.0" y="287.5" width="266" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="82T-Gm-hZ2"/>
......@@ -310,7 +311,7 @@ You will not be charged during this process.</string>
<segue destination="vXZ-lx-hvc" kind="show" identifier="RestoreLoginPurchaseSegue" id="aVb-49-Y5l"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4OL-1u-sdN">
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4OL-1u-sdN">
<rect key="frame" x="0.0" y="248.5" width="266" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="SLD-gi-EF7"/>
......@@ -319,7 +320,7 @@ You will not be charged during this process.</string>
<action selector="logInWithReceipt:" destination="gOX-c2-oGJ" eventType="touchUpInside" id="5hZ-Tf-eeJ"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="E7y-PY-4t7">
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="E7y-PY-4t7">
<rect key="frame" x="0.0" y="326.5" width="266" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="Ww6-Wb-6Ko"/>
......@@ -413,6 +414,7 @@ You will not be charged during this process.</string>
</variation>
</scrollView>
</subviews>
<viewLayoutGuide key="safeArea" id="PIM-cq-QV4"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="RgS-fn-CJH" secondAttribute="bottom" id="9hz-vs-FKe"/>
<constraint firstItem="RgS-fn-CJH" firstAttribute="leading" secondItem="m1d-km-gdB" secondAttribute="leading" id="Wmc-93-eGu"/>
......@@ -420,7 +422,6 @@ You will not be charged during this process.</string>
<constraint firstAttribute="trailing" secondItem="RgS-fn-CJH" secondAttribute="trailing" id="lEl-IF-R7d"/>
<constraint firstItem="PIM-cq-QV4" firstAttribute="bottom" secondItem="RgS-fn-CJH" secondAttribute="bottom" id="r6u-6c-Ttp"/>
</constraints>
<viewLayoutGuide key="safeArea" id="PIM-cq-QV4"/>
<variation key="default">
<mask key="constraints">
<exclude reference="r6u-6c-Ttp"/>
......@@ -535,7 +536,7 @@ You will not be charged during this process.</string>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="$6.95/month" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.75" translatesAutoresizingMaskIntoConstraints="NO" id="hjG-ee-9w6">
<rect key="frame" x="86" y="23" width="87" height="17"/>
<rect key="frame" x="86" y="23" width="85.5" height="17"/>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="NO"/>
</accessibility>
......@@ -544,7 +545,7 @@ You will not be charged during this process.</string>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Detail" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="5uc-nT-KVI">
<rect key="frame" x="178" y="25.5" width="28" height="12"/>
<rect key="frame" x="176.5" y="25.5" width="28" height="12"/>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="NO"/>
</accessibility>
......@@ -680,6 +681,7 @@ You will not be charged during this process.</string>
</constraints>
</scrollView>
</subviews>
<viewLayoutGuide key="safeArea" id="yIs-t9-1RW"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="R3h-YU-xym" firstAttribute="top" secondItem="hSf-Fj-o3R" secondAttribute="top" id="7t8-B1-zP5"/>
......@@ -688,7 +690,6 @@ You will not be charged during this process.</string>
<constraint firstItem="yIs-t9-1RW" firstAttribute="bottom" secondItem="R3h-YU-xym" secondAttribute="bottom" id="nVe-8s-gxc"/>
<constraint firstAttribute="bottom" secondItem="R3h-YU-xym" secondAttribute="bottom" id="oCl-NI-WtW"/>
</constraints>
<viewLayoutGuide key="safeArea" id="yIs-t9-1RW"/>
<variation key="default">
<mask key="constraints">
<exclude reference="oCl-NI-WtW"/>
......@@ -729,7 +730,7 @@ You will not be charged during this process.</string>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="zXr-6i-iXN" customClass="BorderedTextField" customModule="PIALibrary" customModuleProvider="target">
<rect key="frame" x="19" y="19" width="282" height="18.5"/>
<rect key="frame" x="19" y="19" width="282" height="530"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="pAP-q7-PIs"/>
</constraints>
......@@ -737,14 +738,14 @@ You will not be charged during this process.</string>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="SMf-w6-IZ4"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="zXr-6i-iXN" firstAttribute="leading" secondItem="SMf-w6-IZ4" secondAttribute="leading" constant="19" id="V2f-gT-Jmt"/>
<constraint firstItem="zXr-6i-iXN" firstAttribute="top" secondItem="SMf-w6-IZ4" secondAttribute="top" constant="19" id="fDt-yX-j8f"/>
<constraint firstItem="SMf-w6-IZ4" firstAttribute="bottom" secondItem="zXr-6i-iXN" secondAttribute="bottom" constant="19" id="sQz-ep-96l"/>
<constraint firstItem="SMf-w6-IZ4" firstAttribute="trailing" secondItem="zXr-6i-iXN" secondAttribute="trailing" constant="19" id="xSW-2O-f0G"/>
</constraints>
<viewLayoutGuide key="safeArea" id="SMf-w6-IZ4"/>
</view>
<connections>
<outlet property="emailTextField" destination="zXr-6i-iXN" id="PUq-AQ-qz1"/>
......@@ -768,7 +769,7 @@ You will not be charged during this process.</string>
<segue destination="lku-HF-3OI" kind="embed" id="UXm-xH-vgv"/>
</connections>
</containerView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XWX-I9-hIx">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XWX-I9-hIx">
<rect key="frame" x="0.0" y="0.0" width="44" height="55"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="44" id="PgJ-oz-rYu"/>
......@@ -782,7 +783,7 @@ You will not be charged during this process.</string>
<action selector="cancelClicked:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="FmV-yT-Pso"/>
</connections>
</button>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LMx-dm-CUP">
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LMx-dm-CUP">
<rect key="frame" x="150" y="12.5" width="150" height="30"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="150" id="UGM-td-ifN"/>
......@@ -795,6 +796,7 @@ You will not be charged during this process.</string>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="6Cx-hD-1NW"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="6Cx-hD-1NW" firstAttribute="bottom" secondItem="NEF-LS-PZ6" secondAttribute="bottom" id="2nT-6M-1gb"/>
......@@ -807,7 +809,6 @@ You will not be charged during this process.</string>
<constraint firstItem="LMx-dm-CUP" firstAttribute="centerY" secondItem="XWX-I9-hIx" secondAttribute="centerY" id="pfh-KB-Xhc"/>
<constraint firstItem="XWX-I9-hIx" firstAttribute="leading" secondItem="6Cx-hD-1NW" secondAttribute="leading" id="qgq-qF-XP0"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Cx-hD-1NW"/>
<variation key="default">
<mask key="constraints">
<exclude reference="91f-u8-wDf"/>
......@@ -844,10 +845,10 @@ You will not be charged during this process.</string>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FtT-Je-5Y0">
<rect key="frame" x="0.0" y="30" width="320" height="262"/>
<rect key="frame" x="0.0" y="30" width="320" height="438"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sj5-e7-K0y">
<rect key="frame" x="0.0" y="0.0" width="320" height="262"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="438"/>
</view>
</subviews>
<constraints>
......@@ -866,7 +867,7 @@ You will not be charged during this process.</string>
<rect key="frame" x="19" y="10" width="282" height="39"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1u1-jZ-9mC" customClass="PIAPageControl" customModule="PIALibrary" customModuleProvider="target">
<rect key="frame" x="51.5" y="272" width="217" height="20"/>
<rect key="frame" x="51.5" y="448" width="217" height="20"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="NtT-J3-i1K"/>
......@@ -887,40 +888,40 @@ You will not be charged during this process.</string>
</connections>
</view>
<view alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ypB-sc-4iy" userLabel="Helper transparent view">
<rect key="frame" x="0.0" y="292" width="320" height="276"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<rect key="frame" x="0.0" y="468" width="320" height="100"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="276" id="fpi-3t-dsE"/>
<constraint firstAttribute="height" constant="100" id="fpi-3t-dsE"/>
</constraints>
</view>
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SID-tu-SQV">
<rect key="frame" x="0.0" y="292" width="320" height="276"/>
<rect key="frame" x="0.0" y="468" width="320" height="100"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="zOa-D3-4AC">
<rect key="frame" x="0.0" y="0.0" width="320" height="276"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="100"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ML9-xq-Z2l">
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ML9-xq-Z2l">
<rect key="frame" x="19" y="19" width="282" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="T1O-Qu-HOg">
<rect key="frame" x="128" y="44.5" width="64" height="20.5"/>
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="T1O-Qu-HOg">
<rect key="frame" x="128.5" y="44.5" width="63.5" height="20"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lch-Mo-pg8">
<rect key="frame" x="0.0" y="0.0" width="42" height="20.5"/>
<rect key="frame" x="0.0" y="0.0" width="41.5" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="FbE-qZ-ggm">
<rect key="frame" x="44" y="0.0" width="20" height="20.5"/>
<rect key="frame" x="43.5" y="0.0" width="20" height="20"/>
</activityIndicatorView>
</subviews>
</stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="B9d-vi-8co" customClass="PIAButton" customModule="PIALibrary" customModuleProvider="target">
<rect key="frame" x="19" y="84" width="282" height="50"/>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="B9d-vi-8co" customClass="PIAButton" customModule="PIALibrary" customModuleProvider="target">
<rect key="frame" x="19" y="83.5" width="282" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="5kr-fT-AVW"/>
</constraints>
......@@ -929,7 +930,7 @@ You will not be charged during this process.</string>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JeO-BO-hZn" customClass="PIAButton" customModule="PIALibrary" customModuleProvider="target">
<rect key="frame" x="19" y="139" width="282" height="50"/>
<rect key="frame" x="19" y="8" width="282" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="lv6-ch-s4O"/>
</constraints>
......@@ -937,10 +938,10 @@ You will not be charged during this process.</string>
<segue destination="vXZ-lx-hvc" kind="show" identifier="LoginAccountSegue" id="L3M-2E-gAx"/>
</connections>
</button>
<view alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QSh-TD-jyS">
<rect key="frame" x="19" y="189" width="282" height="0.0"/>
<view hidden="YES" alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QSh-TD-jyS">
<rect key="frame" x="19" y="58" width="282" height="0.0"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ei6-5m-nGj">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ei6-5m-nGj">
<rect key="frame" x="0.0" y="14" width="282" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="O0Y-Dr-rA8"/>
......@@ -959,8 +960,8 @@ You will not be charged during this process.</string>
<constraint firstItem="Ei6-5m-nGj" firstAttribute="top" secondItem="QSh-TD-jyS" secondAttribute="top" constant="14" id="eNE-tK-Vhn"/>
</constraints>
</view>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="&lt;Agreement&gt;" textAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="S9w-bi-5he">
<rect key="frame" x="19" y="189" width="282" height="68"/>
<textView hidden="YES" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="&lt;Agreement&gt;" textAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="S9w-bi-5he">
<rect key="frame" x="19" y="58" width="282" height="23"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<dataDetectorType key="dataDetectorTypes" link="YES"/>
......@@ -969,11 +970,12 @@ You will not be charged during this process.</string>
</connections>
</textView>
</subviews>
<color key="backgroundColor" systemColor="systemGray6Color"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="ML9-xq-Z2l" secondAttribute="trailing" constant="19" id="0Jl-q5-CNJ"/>
<constraint firstItem="S9w-bi-5he" firstAttribute="leading" secondItem="zOa-D3-4AC" secondAttribute="leading" constant="19" id="23K-lk-uHV"/>
<constraint firstAttribute="bottom" secondItem="S9w-bi-5he" secondAttribute="bottom" constant="19" id="8o8-Ya-aYH"/>
<constraint firstItem="JeO-BO-hZn" firstAttribute="top" secondItem="B9d-vi-8co" secondAttribute="bottom" constant="5" id="92w-aE-4aZ"/>
<constraint firstItem="JeO-BO-hZn" firstAttribute="top" secondItem="zOa-D3-4AC" secondAttribute="topMargin" id="EFj-Ui-xTT"/>
<constraint firstItem="S9w-bi-5he" firstAttribute="top" secondItem="QSh-TD-jyS" secondAttribute="bottom" id="Nbb-6T-jlO"/>
<constraint firstItem="T1O-Qu-HOg" firstAttribute="centerX" secondItem="zOa-D3-4AC" secondAttribute="centerX" id="OXx-s3-iZr"/>
<constraint firstItem="ML9-xq-Z2l" firstAttribute="leading" secondItem="zOa-D3-4AC" secondAttribute="leading" constant="19" id="ObP-pD-RCQ"/>
......@@ -993,11 +995,11 @@ You will not be charged during this process.</string>
</constraints>
</view>
<constraints>
<constraint firstAttribute="height" constant="276" id="Qpb-B2-C4x"/>
<constraint firstAttribute="height" constant="100" id="Qpb-B2-C4x"/>
</constraints>
<blurEffect style="systemUltraThinMaterial"/>
</visualEffectView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zJA-yM-DX7">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zJA-yM-DX7">
<rect key="frame" x="0.0" y="49" width="44" height="55"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="44" id="TA7-h3-9CU"/>
......@@ -1011,7 +1013,7 @@ You will not be charged during this process.</string>
<action selector="cancelClicked:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="Ram-t8-vXx"/>
</connections>
</button>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zcd-04-7CR">
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zcd-04-7CR">
<rect key="frame" x="150" y="49" width="150" height="55"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="150" id="sIg-TE-Nuf"/>
......@@ -1025,6 +1027,7 @@ You will not be charged during this process.</string>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="NRk-y0-6j5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="NRk-y0-6j5" firstAttribute="trailing" secondItem="ypB-sc-4iy" secondAttribute="trailing" id="2EX-Tz-8v7"/>
......@@ -1052,7 +1055,6 @@ You will not be charged during this process.</string>
<constraint firstItem="DVe-fv-utO" firstAttribute="leading" secondItem="NRk-y0-6j5" secondAttribute="leading" constant="19" id="y35-qB-igb"/>
<constraint firstItem="NRk-y0-6j5" firstAttribute="trailing" secondItem="zcd-04-7CR" secondAttribute="trailing" constant="20" id="y3e-ac-gbG"/>
</constraints>
<viewLayoutGuide key="safeArea" id="NRk-y0-6j5"/>
</view>
<navigationItem key="navigationItem" id="AOC-0U-thD"/>
<connections>
......@@ -1095,5 +1097,11 @@ You will not be charged during this process.</string>
<image name="plan-selected" width="34" height="34"/>
<image name="plan-unselected" width="46" height="46"/>
<image name="scrollableMap-dark" width="1740" height="870"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemGray6Color">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
......@@ -9,18 +9,19 @@
"login.title" = "Sign in to your account";
"login.username.placeholder" = "Username (p1234567)";
"login.password.placeholder" = "Password";
"login.username.l1Placeholder" = "Librem One address";
"login.password.l1Placeholder" = "Passphrase";
"login.submit" = "LOGIN";
"login.restore.button" = "Didn't receive account details?";
"login.error.title" = "Log in";
"login.error.validation" = "You must enter a username and password.";
"login.error.unauthorized" = "Your username or password is incorrect.";
"login.error.validation" = "You must enter a username and passphrase.";
"login.error.unauthorized" = "Your username or passphrase is incorrect.";
"login.error.throttled" = "Too many failed login attempts with this username. Please try again later.";
"login.receipt.button" = "Login using purchase receipt";
"login.magic.link.title" = "Login using magic email link";
"login.magic.link.response" = "Please check your e-mail for a login link.";
"login.magic.link.send" = "Send Link";
"login.magic.link.invalid.email" = "Invalid email. Please try again.";
"purchase.title" = "Select a VPN plan";
"purchase.subtitle" = "30-day money back guarantee";
"purchase.email.placeholder" = "Email address";
......
......@@ -68,7 +68,8 @@ internal struct ImageAsset {
#if os(iOS) || os(tvOS)
let image = Image(named: name, in: bundle, compatibleWith: nil)
#elseif os(macOS)
let image = bundle.image(forResource: NSImage.Name(name))
let name = NSImage.Name(self.name)
let image = (bundle == .main) ? NSImage(named: name) : bundle.image(forResource: name)
#elseif os(watchOS)
let image = Image(named: name)
#endif
......@@ -97,7 +98,11 @@ internal extension ImageAsset.Image {
// swiftlint:disable convenience_type
private final class BundleToken {
static let bundle: Bundle = {
Bundle(for: BundleToken.self)
#if SWIFT_PACKAGE
return Bundle.module
#else
return Bundle(for: BundleToken.self)
#endif
}()
}
// swiftlint:enable convenience_type
......@@ -8,7 +8,7 @@ import Foundation
// MARK: - Strings
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:disable nesting type_body_length type_name
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
internal enum L10n {
internal enum Signup {
internal enum Failure {
......@@ -263,9 +263,9 @@ internal enum L10n {
internal static let throttled = L10n.tr("Welcome", "login.error.throttled")
/// Log in
internal static let title = L10n.tr("Welcome", "login.error.title")
/// Your username or password is incorrect.
/// Your username or passphrase is incorrect.
internal static let unauthorized = L10n.tr("Welcome", "login.error.unauthorized")
/// You must enter a username and password.
/// You must enter a username and passphrase.
internal static let validation = L10n.tr("Welcome", "login.error.validation")
}
internal enum Magic {
......@@ -283,6 +283,8 @@ internal enum L10n {
}
}
internal enum Password {
/// Passphrase
internal static let l1Placeholder = L10n.tr("Welcome", "login.password.l1Placeholder")
/// Password
internal static let placeholder = L10n.tr("Welcome", "login.password.placeholder")
}
......@@ -295,6 +297,8 @@ internal enum L10n {
internal static let button = L10n.tr("Welcome", "login.restore.button")
}
internal enum Username {
/// Librem One address
internal static let l1Placeholder = L10n.tr("Welcome", "login.username.l1Placeholder")
/// Username (p1234567)
internal static let placeholder = L10n.tr("Welcome", "login.username.placeholder")
}
......@@ -424,7 +428,7 @@ internal enum L10n {
}
}
// swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:enable nesting type_body_length type_name
// swiftlint:enable nesting type_body_length type_name vertical_whitespace_opening_braces
// MARK: - Implementation Details
......@@ -438,7 +442,11 @@ extension L10n {
// swiftlint:disable convenience_type
private final class BundleToken {
static let bundle: Bundle = {
Bundle(for: BundleToken.self)
#if SWIFT_PACKAGE
return Bundle.module
#else
return Bundle(for: BundleToken.self)
#endif
}()
}
// swiftlint:enable convenience_type
......@@ -27,7 +27,7 @@ public class GetStartedViewController: PIAWelcomeViewController {
private static let smallDeviceMaxViewHeight: CGFloat = 520
private static let maxViewHeight: CGFloat = 500
private static let extraViewButtonsHeight: CGFloat = 48
private static let defaultViewHeight: CGFloat = 276
private static let defaultViewHeight: CGFloat = 100
@IBOutlet private weak var spinner: UIActivityIndicatorView!
......@@ -120,8 +120,11 @@ public class GetStartedViewController: PIAWelcomeViewController {
pageControl.numberOfPages = allData.count
visualEffectView.clipsToBounds = true
visualEffectView.layer.cornerRadius = 15
visualEffectView.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner]
/* Removed for L1
//visualEffectView.layer.cornerRadius = 15
//visualEffectView.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner]
*/
let swipeDown = UISwipeGestureRecognizer(target: self, action: #selector(self.respondToSwipeGesture))
swipeDown.direction = UISwipeGestureRecognizer.Direction.down
......@@ -136,7 +139,7 @@ public class GetStartedViewController: PIAWelcomeViewController {
}
@objc func respondToSwipeGesture(gesture: UIGestureRecognizer) {
/* Removed for L1
if let swipeGesture = gesture as? UISwipeGestureRecognizer {
switch swipeGesture.direction {
......@@ -148,7 +151,7 @@ public class GetStartedViewController: PIAWelcomeViewController {
break
}
}
*/
}
override public func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
......
......@@ -71,8 +71,8 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
NotificationCenter.default.addObserver(self, selector: #selector(finishLoginWithMagicLink), name: .PIAFinishLoginWithMagicLink, object: nil)
labelTitle.text = L10n.Welcome.Login.title
textUsername.placeholder = L10n.Welcome.Login.Username.placeholder
textPassword.placeholder = L10n.Welcome.Login.Password.placeholder
textUsername.placeholder = L10n.Welcome.Login.Username.l1Placeholder
textPassword.placeholder = L10n.Welcome.Login.Password.l1Placeholder
textUsername.text = preset.loginUsername
textPassword.text = preset.loginPassword
......@@ -256,8 +256,6 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
/* START Librem One specific */
// assume here for now that 'username' is in a form of an email
// if there is no @ sign, should I assume it's just the "username" part? (I think so...)
let emailParts = username.split(separator: "@")
let librem_username = emailParts[0]
let librem_domain = emailParts.count > 1 ? emailParts[1] : "librem.one";
......@@ -270,6 +268,8 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
Alamofire.request(libremOneAccountUrl, headers: headers).responseJSON { response in
var errorMessage: String?
if let result = response.result.value {
// got some result successfully - get PIA username and password out of it
......@@ -282,6 +282,9 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
self.logInToPIA(tunnelUser, tunnelPassword, username)
} else {
log.error("Failed to obtain valid PIA username and password from Librem One");
errorMessage = L10n.Welcome.Login.Error.unauthorized
Macros.displayImageNote(withImage: Asset.iconWarning.image,
message: errorMessage ?? L10n.Welcome.Login.Error.title)
self.enableInteractions(true)
self.hideLoadingAnimation()
}
......@@ -289,6 +292,9 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
log.error("Failed to obtain a response from Librem One login attempt");
self.enableInteractions(true)