UI/UX: refactor welcome and account creation view
- refactor UI / UX
- New launchScreen
- add enable notification switch (on by default)
- add encrypt my local account switch (off by default)
- manage correctly the bottom offset of the scroll view (when
the keyboard is shown or dismissed)
- we can now dismiss the keyboard when tipping outside and
scroll it manually
- adapt the UI for all devices
- the UI texts are now changing dynamically regarding the
language of the device
Change-Id: I4fecb7bc5bfda5585ce7a4c83ad3a64a2e6b246c
Reviewed-by: Kateryna Kostiuk<kateryna.kostiuk@savoirfairelinux.com>
diff --git a/Ring/Cartfile.resolved b/Ring/Cartfile.resolved
index 2b8124c..2d8429f 100644
--- a/Ring/Cartfile.resolved
+++ b/Ring/Cartfile.resolved
@@ -9,5 +9,5 @@
github "gskbyte/GSKStretchyHeaderView" "1.0.4"
github "optonaut/ActiveLabel.swift" "1.0.1"
github "pkluz/PKHUD" "5.2.0"
-github "realm/realm-cocoa" "v3.11.1"
+github "realm/realm-cocoa" "v3.12.0"
github "stephencelis/SQLite.swift" "0.11.5"
diff --git a/Ring/Ring/Constants/Generated/Images.swift b/Ring/Ring/Constants/Generated/Images.swift
index 3eede43..8e13bd0 100644
--- a/Ring/Ring/Constants/Generated/Images.swift
+++ b/Ring/Ring/Constants/Generated/Images.swift
@@ -40,6 +40,7 @@
internal static let enableSpeakerphone = ImageAsset(name: "enable_speakerphone")
internal static let fallbackAvatar = ImageAsset(name: "fallback_avatar")
internal static let icContactPicture = ImageAsset(name: "ic_contact_picture")
+ internal static let jamiIcon = ImageAsset(name: "jamiIcon")
internal static let leftArrow = ImageAsset(name: "left_arrow")
internal static let moreSettings = ImageAsset(name: "more_settings")
internal static let pauseCall = ImageAsset(name: "pause_call")
diff --git a/Ring/Ring/Constants/Generated/Strings.swift b/Ring/Ring/Constants/Generated/Strings.swift
index 58cd467..c0e4bc2 100644
--- a/Ring/Ring/Constants/Generated/Strings.swift
+++ b/Ring/Ring/Constants/Generated/Strings.swift
@@ -128,25 +128,35 @@
}
internal enum CreateAccount {
+ /// Encrypt my account
+ internal static let chooseAPassword = L10n.tr("Localizable", "createAccount.ChooseAPassword")
/// Choose strong password you will remember to protect your Ring account.
internal static let chooseStrongPassword = L10n.tr("Localizable", "createAccount.chooseStrongPassword")
- /// Create your Ring account
+ /// Create your account
internal static let createAccountFormTitle = L10n.tr("Localizable", "createAccount.createAccountFormTitle")
- /// username
+ /// Notifications
+ internal static let enableNotifications = L10n.tr("Localizable", "createAccount.EnableNotifications")
+ /// Username
internal static let enterNewUsernamePlaceholder = L10n.tr("Localizable", "createAccount.enterNewUsernamePlaceholder")
/// invalid username
internal static let invalidUsername = L10n.tr("Localizable", "createAccount.invalidUsername")
/// Loading
internal static let loading = L10n.tr("Localizable", "createAccount.loading")
- /// looking for username availability
+ /// looking for availability…
internal static let lookingForUsernameAvailability = L10n.tr("Localizable", "createAccount.lookingForUsernameAvailability")
- /// password
+ /// Password
internal static let newPasswordPlaceholder = L10n.tr("Localizable", "createAccount.newPasswordPlaceholder")
/// 6 characters minimum
internal static let passwordCharactersNumberError = L10n.tr("Localizable", "createAccount.passwordCharactersNumberError")
+ /// Choose a password to encrypt your local account. Don’t forget it or you will not be able to recover your account
+ internal static let passwordInformation = L10n.tr("Localizable", "createAccount.PasswordInformation")
/// passwords do not match
internal static let passwordNotMatchingError = L10n.tr("Localizable", "createAccount.passwordNotMatchingError")
- /// confirm password
+ /// (Recommended)
+ internal static let recommended = L10n.tr("Localizable", "createAccount.Recommended")
+ /// Register a username
+ internal static let registerAUsername = L10n.tr("Localizable", "createAccount.RegisterAUsername")
+ /// Confirm password
internal static let repeatPasswordPlaceholder = L10n.tr("Localizable", "createAccount.repeatPasswordPlaceholder")
/// username already taken
internal static let usernameAlreadyTaken = L10n.tr("Localizable", "createAccount.usernameAlreadyTaken")
@@ -250,13 +260,13 @@
}
internal enum Welcome {
- /// Create a Ring account
+ /// Create a Jami account
internal static let createAccount = L10n.tr("Localizable", "welcome.createAccount")
/// Link this device to an account
internal static let linkDevice = L10n.tr("Localizable", "welcome.linkDevice")
/// Ring is a free and universal communication platform which preserves the users' privacy and freedoms
internal static let text = L10n.tr("Localizable", "welcome.text")
- /// Welcome to Ring
+ /// Welcome to Jami !
internal static let title = L10n.tr("Localizable", "welcome.title")
}
}
diff --git a/Ring/Ring/Extensions/UIColor+Ring.swift b/Ring/Ring/Extensions/UIColor+Ring.swift
index 2d17df2..39d46c1 100644
--- a/Ring/Ring/Extensions/UIColor+Ring.swift
+++ b/Ring/Ring/Extensions/UIColor+Ring.swift
@@ -34,8 +34,8 @@
self.init(red: (hex >> 16) & 0xff, green: (hex >> 8) & 0xff, blue: hex & 0xff, alpha: alpha)
}
- static let ringMain = UIColor(red: 54, green: 125, blue: 156, alpha: 1.0)
- static let ringSecondary = UIColor(red: 0, green: 76, blue: 96, alpha: 1.0)
+ static let ringMain = UIColor(hex: 0x017CBD, alpha: 1.0) // jami style
+ static let ringSecondary = UIColor(hex: 0x1F4971, alpha: 1.0) // jami style
static let ringMainLight = UIColor(red: 0, green: 76, blue: 96, alpha: 1.0)
static let ringMsgCellEmoji = UIColor(red: 0, green: 0, blue: 0, alpha: 0)
static let ringMsgCellSent = UIColor(red: 58, green: 192, blue: 210, alpha: 1.0)
@@ -52,4 +52,7 @@
static let ringSuccess = UIColor(hex: 0x00b20b, alpha: 1.0)
static let ringFailure = UIColor(hex: 0xf00000, alpha: 1.0)
static let ringWarning = UIColor.orange
+
+ static let jamiButtonLight = UIColor(hex: 0x285F97, alpha: 1.0)
+ static let jamiButtonDark = UIColor(hex: 0x0F2643, alpha: 1.0)
}
diff --git a/Ring/Ring/Extensions/UIView+Ring.swift b/Ring/Ring/Extensions/UIView+Ring.swift
index 99b08e0..98344d9 100644
--- a/Ring/Ring/Extensions/UIView+Ring.swift
+++ b/Ring/Ring/Extensions/UIView+Ring.swift
@@ -151,4 +151,51 @@
UIGraphicsEndImageContext()
return image
}
+
+ func applyGradient(with colours: [UIColor], locations: [NSNumber]? = nil) {
+ let gradient = CAGradientLayer()
+ gradient.frame = self.bounds
+ gradient.colors = colours.map { $0.cgColor }
+ gradient.locations = locations
+ self.layer.insertSublayer(gradient, at: 0)
+ }
+
+ func applyGradient(with colours: [UIColor], gradient orientation: GradientOrientation) {
+ let gradient = CAGradientLayer()
+ gradient.frame = self.bounds
+ gradient.colors = colours.map { $0.cgColor }
+ gradient.startPoint = orientation.startPoint
+ gradient.endPoint = orientation.endPoint
+ self.layer.insertSublayer(gradient, at: 0)
+ }
+}
+
+typealias GradientPoints = (startPoint: CGPoint, endPoint: CGPoint)
+
+enum GradientOrientation {
+ case topRightBottomLeft
+ case topLeftBottomRight
+ case horizontal
+ case vertical
+
+ var startPoint : CGPoint {
+ return points.startPoint
+ }
+
+ var endPoint : CGPoint {
+ return points.endPoint
+ }
+
+ var points : GradientPoints {
+ switch self {
+ case .topRightBottomLeft:
+ return (CGPoint(x: 0.0,y: 1.0), CGPoint(x: 1.0,y: 0.0))
+ case .topLeftBottomRight:
+ return (CGPoint(x: 0.0,y: 0.0), CGPoint(x: 1,y: 1))
+ case .horizontal:
+ return (CGPoint(x: 0.0,y: 0.5), CGPoint(x: 1.0,y: 0.5))
+ case .vertical:
+ return (CGPoint(x: 0.0,y: 0.0), CGPoint(x: 0.0,y: 1.0))
+ }
+ }
}
diff --git a/Ring/Ring/Features/InitialLoading/InitialLoadingViewController.storyboard b/Ring/Ring/Features/InitialLoading/InitialLoadingViewController.storyboard
index 5afa814..c6a7545 100644
--- a/Ring/Ring/Features/InitialLoading/InitialLoadingViewController.storyboard
+++ b/Ring/Ring/Features/InitialLoading/InitialLoadingViewController.storyboard
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="COY-AX-993">
- <device id="retina4_7" orientation="portrait">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="COY-AX-993">
+ <device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
- <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@@ -19,56 +18,23 @@
<viewControllerLayoutGuide type="bottom" id="yiq-Ru-NtI"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="aRx-1z-bhh">
- <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+ <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RING" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mT3-yy-Ins">
- <rect key="frame" x="162" y="320.5" width="51" height="26.5"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background_ring" translatesAutoresizingMaskIntoConstraints="NO" id="0jH-Qw-sbt">
- <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
- </imageView>
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vx3-sT-ceQ" userLabel="Gradient View">
- <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
- <subviews>
- <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalHuggingPriority="251" image="ring_logo" translatesAutoresizingMaskIntoConstraints="NO" id="noP-kw-7tM">
- <rect key="frame" x="92" y="302" width="191" height="63"/>
- <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
- </imageView>
- <activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="T5f-Vn-hsM">
- <rect key="frame" x="169.5" y="373" width="37" height="37"/>
- <constraints>
- <constraint firstAttribute="height" constant="37" id="OXD-aw-oL2"/>
- <constraint firstAttribute="width" constant="37" id="W9J-rm-eGu"/>
- </constraints>
- </activityIndicatorView>
- </subviews>
- <color key="backgroundColor" red="0.2274509804" green="0.75294117650000003" blue="0.82352941180000006" alpha="0.20000000000000001" colorSpace="custom" customColorSpace="displayP3"/>
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalHuggingPriority="251" image="jamiIcon" translatesAutoresizingMaskIntoConstraints="NO" id="noP-kw-7tM">
+ <rect key="frame" x="137.66666666666666" y="358.66666666666669" width="100" height="95"/>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
- <constraint firstItem="T5f-Vn-hsM" firstAttribute="top" secondItem="noP-kw-7tM" secondAttribute="bottom" constant="8" id="9DO-PZ-5no"/>
- <constraint firstItem="T5f-Vn-hsM" firstAttribute="centerX" secondItem="vx3-sT-ceQ" secondAttribute="centerX" id="LBl-Ca-4f2"/>
- <constraint firstItem="noP-kw-7tM" firstAttribute="centerY" secondItem="vx3-sT-ceQ" secondAttribute="centerY" id="OjY-lE-ODE"/>
- <constraint firstItem="noP-kw-7tM" firstAttribute="centerX" secondItem="vx3-sT-ceQ" secondAttribute="centerX" id="q4D-DQ-coq"/>
+ <constraint firstAttribute="width" secondItem="noP-kw-7tM" secondAttribute="height" multiplier="20:19" id="90r-Az-47a"/>
+ <constraint firstAttribute="width" constant="100" id="u8R-gO-yAc"/>
</constraints>
- </view>
+ </imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
- <constraint firstItem="0jH-Qw-sbt" firstAttribute="leading" secondItem="aRx-1z-bhh" secondAttribute="leading" id="7DO-cX-ZHu"/>
- <constraint firstAttribute="bottom" secondItem="vx3-sT-ceQ" secondAttribute="bottom" id="Dbq-On-bgN"/>
- <constraint firstItem="mT3-yy-Ins" firstAttribute="centerX" secondItem="aRx-1z-bhh" secondAttribute="centerX" id="TUh-hS-ILM"/>
- <constraint firstItem="0jH-Qw-sbt" firstAttribute="top" secondItem="aRx-1z-bhh" secondAttribute="top" id="Ttd-hs-cxC"/>
- <constraint firstAttribute="trailing" secondItem="0jH-Qw-sbt" secondAttribute="trailing" id="bQI-fo-zjq"/>
- <constraint firstItem="mT3-yy-Ins" firstAttribute="centerY" secondItem="aRx-1z-bhh" secondAttribute="centerY" id="hcy-ws-hgV"/>
- <constraint firstAttribute="trailing" secondItem="vx3-sT-ceQ" secondAttribute="trailing" id="iio-7B-a2J"/>
- <constraint firstItem="vx3-sT-ceQ" firstAttribute="top" secondItem="aRx-1z-bhh" secondAttribute="top" id="ltY-hm-fnP"/>
- <constraint firstItem="yiq-Ru-NtI" firstAttribute="top" secondItem="0jH-Qw-sbt" secondAttribute="bottom" id="vPl-N3-Vvw"/>
- <constraint firstItem="vx3-sT-ceQ" firstAttribute="leading" secondItem="aRx-1z-bhh" secondAttribute="leading" id="yoR-WM-6bH"/>
+ <constraint firstItem="noP-kw-7tM" firstAttribute="centerY" secondItem="aRx-1z-bhh" secondAttribute="centerY" id="YcT-vx-Xtv"/>
+ <constraint firstItem="noP-kw-7tM" firstAttribute="centerX" secondItem="aRx-1z-bhh" secondAttribute="centerX" id="gPC-Oy-B1H"/>
</constraints>
- <viewLayoutGuide key="safeArea" id="vc6-gh-ZiE"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="u5I-td-CmB" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -77,7 +43,6 @@
</scene>
</scenes>
<resources>
- <image name="background_ring" width="750" height="1334"/>
- <image name="ring_logo" width="191" height="63"/>
+ <image name="jamiIcon" width="200" height="190"/>
</resources>
</document>
diff --git a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard
index 20ae5c3..515b8cf 100644
--- a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard
+++ b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="jUh-Lp-ulu">
- <device id="retina5_9" orientation="portrait">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="jUh-Lp-ulu">
+ <device id="retina6_5" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
- <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@@ -19,58 +18,60 @@
<viewControllerLayoutGuide type="bottom" id="fgQ-1h-rMi"/>
</layoutGuides>
<view key="view" clipsSubviews="YES" contentMode="scaleToFill" id="7Ub-Rk-fjK">
- <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
+ <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background_ring" translatesAutoresizingMaskIntoConstraints="NO" id="xYA-E3-7tv">
- <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
- </imageView>
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WZ7-L9-OuJ" userLabel="Gradient View" customClass="DesignableView" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
- <color key="backgroundColor" red="0.2274509804" green="0.75294117650000003" blue="0.82352941180000006" alpha="0.20000000000000001" colorSpace="custom" customColorSpace="displayP3"/>
- <userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="color" keyPath="gradientEndColor">
- <color key="value" red="0.2274509804" green="0.75294117650000003" blue="0.82352941180000006" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
- </userDefinedRuntimeAttribute>
- <userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
- <color key="value" red="0.2274509804" green="0.75294117650000003" blue="0.82352941180000006" alpha="0.0" colorSpace="custom" customColorSpace="displayP3"/>
- </userDefinedRuntimeAttribute>
- </userDefinedRuntimeAttributes>
- </view>
- <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UZB-Gb-Dp2">
- <rect key="frame" x="16" y="52" width="343" height="718"/>
+ <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" keyboardDismissMode="interactive" translatesAutoresizingMaskIntoConstraints="NO" id="UZB-Gb-Dp2">
+ <rect key="frame" x="20" y="0.0" width="374" height="862"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g3i-8d-O4a" userLabel="Container View" customClass="DesignableView" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="-16" y="-18" width="375" height="667"/>
+ <rect key="frame" x="-20" y="-18" width="414" height="351.66666666666669"/>
<subviews>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Create your account" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cAM-lf-Iex">
- <rect key="frame" x="83" y="100" width="209" height="29"/>
- <fontDescription key="fontDescription" type="system" pointSize="24"/>
- <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" preservesSuperviewLayoutMargins="YES" text="Create your jami account" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cAM-lf-Iex">
+ <rect key="frame" x="25" y="-22" width="364" height="37"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="31"/>
+ <color key="textColor" white="0.0" alpha="0.5" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="Register a username" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qeI-Uf-g3M">
+ <rect key="frame" x="50" y="54.999999999999993" width="255" height="21.666666666666664"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
+ <nil key="highlightedColor"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+ <color key="value" white="0.0" alpha="0.5" colorSpace="calibratedWhite"/>
+ </userDefinedRuntimeAttribute>
+ </userDefinedRuntimeAttributes>
+ </label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hzc-aD-41e">
- <rect key="frame" x="286" y="164" width="51" height="31"/>
- <color key="onTintColor" red="0.0" green="0.29803921568627451" blue="0.37647058823529411" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <rect key="frame" x="315" y="50.333333333333343" width="51" height="31"/>
+ <color key="onTintColor" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</switch>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(Recommended)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QTZ-o9-LER">
+ <rect key="frame" x="50" y="76.666666666666657" width="80" height="12"/>
+ <fontDescription key="fontDescription" type="system" pointSize="10"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
+ <nil key="highlightedColor"/>
+ </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4YB-Ka-7tL">
- <rect key="frame" x="40" y="210" width="295" height="120"/>
+ <rect key="frame" x="40" y="106.66666666666669" width="334" height="65"/>
<subviews>
- <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="username" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="E18-Hh-7He" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="0.0" y="8" width="295" height="40"/>
+ <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Username" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="E18-Hh-7He" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target">
+ <rect key="frame" x="0.0" y="0.0" width="334" height="50"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
- <constraint firstAttribute="height" constant="40" id="BAO-oa-Ecp"/>
+ <constraint firstAttribute="height" constant="50" id="BAO-oa-Ecp"/>
</constraints>
<nil key="textColor"/>
- <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
<textInputTraits key="textInputTraits" autocorrectionType="no"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
- <real key="value" value="0.0"/>
+ <real key="value" value="1.5"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
- <color key="value" cocoaTouchSystemColor="darkTextColor"/>
+ <color key="value" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="0.0"/>
@@ -79,147 +80,220 @@
</userDefinedRuntimeAttributes>
</textField>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="this username is not available" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qDW-b2-4NQ">
- <rect key="frame" x="0.0" y="56" width="179" height="16"/>
+ <rect key="frame" x="15" y="54.999999999999986" width="179" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
- <color key="textColor" red="0.83137254900000002" green="0.054901960780000002" blue="0.070588235289999995" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="textColor" red="0.83137254900000002" green="0.054901960780000002" blue="0.070588235289999995" alpha="0.90000000000000002" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="E18-Hh-7He" secondAttribute="trailing" id="0Nq-c5-EJ3"/>
- <constraint firstItem="E18-Hh-7He" firstAttribute="top" secondItem="4YB-Ka-7tL" secondAttribute="top" constant="8" id="EkX-GA-dSB"/>
- <constraint firstItem="qDW-b2-4NQ" firstAttribute="top" secondItem="E18-Hh-7He" secondAttribute="bottom" constant="8" symbolic="YES" id="S0t-Pw-oUV"/>
+ <constraint firstItem="E18-Hh-7He" firstAttribute="top" secondItem="4YB-Ka-7tL" secondAttribute="top" id="EkX-GA-dSB"/>
+ <constraint firstItem="qDW-b2-4NQ" firstAttribute="top" secondItem="E18-Hh-7He" secondAttribute="bottom" constant="5" id="S0t-Pw-oUV"/>
<constraint firstItem="E18-Hh-7He" firstAttribute="leading" secondItem="4YB-Ka-7tL" secondAttribute="leading" id="Y47-Gp-2mi"/>
- <constraint firstAttribute="height" constant="120" id="atW-lO-zQN"/>
- <constraint firstItem="qDW-b2-4NQ" firstAttribute="leading" secondItem="E18-Hh-7He" secondAttribute="leading" id="jnN-7G-KOd"/>
+ <constraint firstAttribute="height" constant="65" id="atW-lO-zQN"/>
+ <constraint firstItem="qDW-b2-4NQ" firstAttribute="leading" secondItem="E18-Hh-7He" secondAttribute="leading" constant="15" id="jnN-7G-KOd"/>
</constraints>
</view>
- <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="password" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="jhr-UL-eCl" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="40" y="338" width="295" height="40"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstAttribute="height" constant="40" id="eGy-0v-Pm0"/>
- </constraints>
- <nil key="textColor"/>
- <fontDescription key="fontDescription" type="system" pointSize="14"/>
- <textInputTraits key="textInputTraits" autocorrectionType="no" secureTextEntry="YES"/>
- <userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
- <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
- <real key="value" value="0.0"/>
- </userDefinedRuntimeAttribute>
- <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
- <color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
- </userDefinedRuntimeAttribute>
- </userDefinedRuntimeAttributes>
- </textField>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Register a username" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qeI-Uf-g3M">
- <rect key="frame" x="40" y="169" width="157" height="21"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Choose a password" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BLe-wx-zKe" userLabel="Register Password Label">
+ <rect key="frame" x="50" y="183.33333333333334" width="255" height="21.666666666666657"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
- <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="confirm password" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ODL-4B-fCm" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="40" y="386" width="295" height="40"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="WaK-DM-X0c" userLabel="Password Switch">
+ <rect key="frame" x="315" y="178.66666666666666" width="51" height="31"/>
+ <color key="onTintColor" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ </switch>
+ <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IVi-pM-qbp" userLabel="Choose Password View">
+ <rect key="frame" x="40" y="229.66666666666666" width="334" height="0.0"/>
+ <subviews>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Choose a password to encrypt your local account. Don’t forget it or you will lose access to your account" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gh1-3j-vN7" userLabel="Password Information">
+ <rect key="frame" x="15" y="0.0" width="304" height="57.333333333333336"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="16"/>
+ <color key="textColor" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Password" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="jhr-UL-eCl" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target">
+ <rect key="frame" x="0.0" y="67.333333333333343" width="334" height="50"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="50" id="eGy-0v-Pm0"/>
+ </constraints>
+ <nil key="textColor"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
+ <textInputTraits key="textInputTraits" autocorrectionType="no" secureTextEntry="YES"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
+ <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+ <real key="value" value="1.5"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+ <color key="value" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ </userDefinedRuntimeAttribute>
+ </userDefinedRuntimeAttributes>
+ </textField>
+ <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Confirm password" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ODL-4B-fCm" customClass="DesignableTextField" customModule="Ring" customModuleProvider="target">
+ <rect key="frame" x="0.0" y="127.33333333333334" width="334" height="50"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="50" id="iUA-8a-sP7"/>
+ </constraints>
+ <nil key="textColor"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
+ <textInputTraits key="textInputTraits" autocorrectionType="no" secureTextEntry="YES"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
+ <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+ <real key="value" value="1.5"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+ <color key="value" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ </userDefinedRuntimeAttribute>
+ </userDefinedRuntimeAttributes>
+ </textField>
+ <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="passwords do not match" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IWj-x1-hN9">
+ <rect key="frame" x="15" y="183.33333333333334" width="149" height="15.666666666666657"/>
+ <fontDescription key="fontDescription" type="system" pointSize="13"/>
+ <color key="textColor" red="0.83137254901960778" green="0.054901960784313725" blue="0.070588235294117646" alpha="0.90000000000000002" colorSpace="custom" customColorSpace="sRGB"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
- <constraint firstAttribute="height" constant="40" id="iUA-8a-sP7"/>
+ <constraint firstItem="ODL-4B-fCm" firstAttribute="trailing" secondItem="jhr-UL-eCl" secondAttribute="trailing" id="2kl-t3-7Mg"/>
+ <constraint firstItem="gh1-3j-vN7" firstAttribute="leading" secondItem="IVi-pM-qbp" secondAttribute="leading" constant="15" id="HXO-gJ-co6"/>
+ <constraint firstItem="ODL-4B-fCm" firstAttribute="top" secondItem="jhr-UL-eCl" secondAttribute="bottom" constant="10" id="TeG-Xc-h2f"/>
+ <constraint firstItem="ODL-4B-fCm" firstAttribute="leading" secondItem="jhr-UL-eCl" secondAttribute="leading" id="Ult-cS-g1M"/>
+ <constraint firstItem="gh1-3j-vN7" firstAttribute="top" secondItem="IVi-pM-qbp" secondAttribute="top" id="aKr-od-y92"/>
+ <constraint firstAttribute="trailing" secondItem="jhr-UL-eCl" secondAttribute="trailing" id="bE4-JB-cJk"/>
+ <constraint firstAttribute="trailing" secondItem="gh1-3j-vN7" secondAttribute="trailing" constant="15" id="bEx-5c-T12"/>
+ <constraint firstItem="jhr-UL-eCl" firstAttribute="width" secondItem="IVi-pM-qbp" secondAttribute="width" id="cp9-Wm-AHT"/>
+ <constraint firstItem="IWj-x1-hN9" firstAttribute="leading" secondItem="IVi-pM-qbp" secondAttribute="leading" constant="15" id="dQk-2c-kbp"/>
+ <constraint firstAttribute="height" id="gCv-h4-eLK"/>
+ <constraint firstItem="jhr-UL-eCl" firstAttribute="top" secondItem="gh1-3j-vN7" secondAttribute="bottom" constant="10" id="hfd-g3-mxU"/>
+ <constraint firstItem="ODL-4B-fCm" firstAttribute="width" secondItem="jhr-UL-eCl" secondAttribute="width" id="pPl-wg-pBV"/>
+ <constraint firstItem="jhr-UL-eCl" firstAttribute="leading" secondItem="IVi-pM-qbp" secondAttribute="leading" id="vJU-ep-woC"/>
+ <constraint firstItem="IWj-x1-hN9" firstAttribute="top" secondItem="ODL-4B-fCm" secondAttribute="bottom" constant="6" id="xrr-oZ-afI"/>
</constraints>
- <nil key="textColor"/>
- <fontDescription key="fontDescription" type="system" pointSize="14"/>
- <textInputTraits key="textInputTraits" autocorrectionType="no" secureTextEntry="YES"/>
- <userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
- <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
- <real key="value" value="0.0"/>
- </userDefinedRuntimeAttribute>
- <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
- <color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
- </userDefinedRuntimeAttribute>
- </userDefinedRuntimeAttributes>
- </textField>
- <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="passwords do not match" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IWj-x1-hN9">
- <rect key="frame" x="40" y="434" width="149" height="16"/>
- <fontDescription key="fontDescription" type="system" pointSize="13"/>
- <color key="textColor" red="0.83137254900000002" green="0.054901960780000002" blue="0.070588235289999995" alpha="1" colorSpace="calibratedRGB"/>
+ </view>
+ <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8uM-V9-rGD" userLabel="Notifications Switch">
+ <rect key="frame" x="315" y="240.66666666666663" width="51" height="31"/>
+ <color key="onTintColor" red="0.12156862745098039" green="0.28627450980392155" blue="0.44313725490196076" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ </switch>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enable notifications" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v2K-7x-35g" userLabel="Enable Notifications Label">
+ <rect key="frame" x="50" y="245.66666666666663" width="156" height="21"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="05l-0O-Ql0" customClass="DesignableButton" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="87" y="490" width="200" height="40"/>
- <color key="backgroundColor" red="0.0" green="0.29803921570000003" blue="0.37647058820000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <rect key="frame" x="40" y="301.66666666666669" width="334" height="50"/>
<constraints>
- <constraint firstAttribute="height" constant="40" id="501-bI-E5J"/>
- <constraint firstAttribute="width" constant="200" id="ylQ-Ok-Sqa"/>
+ <constraint firstAttribute="height" constant="50" id="501-bI-E5J"/>
</constraints>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <state key="normal" title="Create account"/>
+ <state key="normal" title="Create account">
+ <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ </state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
</userDefinedRuntimeAttributes>
</button>
</subviews>
- <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
- <constraint firstAttribute="trailing" secondItem="hzc-aD-41e" secondAttribute="trailing" constant="40" id="1wO-3T-tfO"/>
+ <constraint firstAttribute="trailing" secondItem="hzc-aD-41e" secondAttribute="trailing" constant="50" id="1wO-3T-tfO"/>
+ <constraint firstItem="IVi-pM-qbp" firstAttribute="top" secondItem="WaK-DM-X0c" secondAttribute="bottom" constant="20" id="26L-Di-76k"/>
+ <constraint firstItem="IVi-pM-qbp" firstAttribute="trailing" secondItem="4YB-Ka-7tL" secondAttribute="trailing" id="4c4-eM-gY5"/>
<constraint firstItem="cAM-lf-Iex" firstAttribute="centerX" secondItem="g3i-8d-O4a" secondAttribute="centerX" id="5Sz-Rn-XXy"/>
- <constraint firstItem="05l-0O-Ql0" firstAttribute="top" secondItem="IWj-x1-hN9" secondAttribute="bottom" constant="40" id="BAN-gU-ylu"/>
- <constraint firstItem="jhr-UL-eCl" firstAttribute="trailing" secondItem="E18-Hh-7He" secondAttribute="trailing" id="BU5-3N-9mA"/>
- <constraint firstItem="4YB-Ka-7tL" firstAttribute="trailing" secondItem="hzc-aD-41e" secondAttribute="trailing" id="CWP-6L-YHH"/>
- <constraint firstItem="ODL-4B-fCm" firstAttribute="trailing" secondItem="jhr-UL-eCl" secondAttribute="trailing" id="EjA-RC-FzN"/>
- <constraint firstItem="ODL-4B-fCm" firstAttribute="top" secondItem="jhr-UL-eCl" secondAttribute="bottom" constant="8" symbolic="YES" id="Fr5-Jq-SZ3"/>
- <constraint firstItem="IWj-x1-hN9" firstAttribute="top" secondItem="ODL-4B-fCm" secondAttribute="bottom" constant="8" id="IGh-ug-cAv"/>
- <constraint firstItem="qeI-Uf-g3M" firstAttribute="leading" secondItem="g3i-8d-O4a" secondAttribute="leading" constant="40" id="JQv-wS-uUg"/>
+ <constraint firstItem="BLe-wx-zKe" firstAttribute="leading" secondItem="qeI-Uf-g3M" secondAttribute="leading" id="A2c-l4-4s0"/>
+ <constraint firstAttribute="trailing" secondItem="cAM-lf-Iex" secondAttribute="trailing" constant="25" id="Abu-I9-ufg"/>
+ <constraint firstItem="QTZ-o9-LER" firstAttribute="top" secondItem="qeI-Uf-g3M" secondAttribute="bottom" id="EHH-l0-byE"/>
+ <constraint firstItem="WaK-DM-X0c" firstAttribute="top" secondItem="4YB-Ka-7tL" secondAttribute="bottom" constant="7" id="HEn-BC-6ew"/>
+ <constraint firstItem="8uM-V9-rGD" firstAttribute="trailing" secondItem="WaK-DM-X0c" secondAttribute="trailing" id="OGN-oX-ksa"/>
+ <constraint firstItem="WaK-DM-X0c" firstAttribute="trailing" secondItem="hzc-aD-41e" secondAttribute="trailing" id="OVM-OC-BKM"/>
+ <constraint firstItem="cAM-lf-Iex" firstAttribute="leading" secondItem="g3i-8d-O4a" secondAttribute="leading" constant="25" id="Okx-aE-BTj"/>
<constraint firstItem="qeI-Uf-g3M" firstAttribute="top" secondItem="cAM-lf-Iex" secondAttribute="bottom" constant="40" id="QUu-qc-tj4"/>
- <constraint firstItem="IWj-x1-hN9" firstAttribute="leading" secondItem="ODL-4B-fCm" secondAttribute="leading" id="SYS-B9-z5L"/>
- <constraint firstItem="ODL-4B-fCm" firstAttribute="leading" secondItem="jhr-UL-eCl" secondAttribute="leading" id="Yal-mT-NwY"/>
- <constraint firstItem="4YB-Ka-7tL" firstAttribute="top" secondItem="qeI-Uf-g3M" secondAttribute="bottom" constant="20" id="YwD-hf-TpI"/>
- <constraint firstItem="jhr-UL-eCl" firstAttribute="leading" secondItem="E18-Hh-7He" secondAttribute="leading" id="ZG8-5Q-pwI"/>
+ <constraint firstItem="v2K-7x-35g" firstAttribute="leading" secondItem="qeI-Uf-g3M" secondAttribute="leading" id="QWe-Dk-13g"/>
+ <constraint firstItem="8uM-V9-rGD" firstAttribute="top" secondItem="IVi-pM-qbp" secondAttribute="bottom" constant="11" id="Ssw-au-Fvr"/>
+ <constraint firstItem="QTZ-o9-LER" firstAttribute="leading" secondItem="qeI-Uf-g3M" secondAttribute="leading" id="U56-eG-HW0"/>
+ <constraint firstAttribute="trailing" secondItem="4YB-Ka-7tL" secondAttribute="trailing" constant="40" id="WUO-0S-IEh"/>
+ <constraint firstItem="4YB-Ka-7tL" firstAttribute="top" secondItem="qeI-Uf-g3M" secondAttribute="bottom" constant="30" id="YwD-hf-TpI"/>
+ <constraint firstAttribute="bottom" secondItem="05l-0O-Ql0" secondAttribute="bottom" id="bAV-uP-wuJ"/>
+ <constraint firstItem="IVi-pM-qbp" firstAttribute="leading" secondItem="4YB-Ka-7tL" secondAttribute="leading" id="cUH-Og-2da"/>
+ <constraint firstItem="hzc-aD-41e" firstAttribute="leading" secondItem="qeI-Uf-g3M" secondAttribute="trailing" constant="10" id="f4R-fq-ANd"/>
<constraint firstItem="05l-0O-Ql0" firstAttribute="centerX" secondItem="g3i-8d-O4a" secondAttribute="centerX" id="fDC-6U-Uy1"/>
- <constraint firstItem="jhr-UL-eCl" firstAttribute="top" secondItem="4YB-Ka-7tL" secondAttribute="bottom" constant="8" symbolic="YES" id="iUo-Vt-uih"/>
- <constraint firstAttribute="bottom" secondItem="05l-0O-Ql0" secondAttribute="bottom" constant="137" id="pRs-R7-cGv"/>
+ <constraint firstItem="BLe-wx-zKe" firstAttribute="centerY" secondItem="WaK-DM-X0c" secondAttribute="centerY" id="gXy-MH-i1e"/>
+ <constraint firstItem="hzc-aD-41e" firstAttribute="leading" secondItem="BLe-wx-zKe" secondAttribute="trailing" constant="10" id="iVP-j2-wzA"/>
+ <constraint firstItem="8uM-V9-rGD" firstAttribute="top" secondItem="IWj-x1-hN9" secondAttribute="top" priority="1" id="pC1-Dk-oIP"/>
<constraint firstItem="hzc-aD-41e" firstAttribute="centerY" secondItem="qeI-Uf-g3M" secondAttribute="centerY" id="quS-Vm-CiE"/>
- <constraint firstItem="cAM-lf-Iex" firstAttribute="top" secondItem="g3i-8d-O4a" secondAttribute="top" constant="100" id="sCC-hK-7zg"/>
- <constraint firstItem="4YB-Ka-7tL" firstAttribute="leading" secondItem="qeI-Uf-g3M" secondAttribute="leading" id="yzC-hd-Rhc"/>
+ <constraint firstItem="cAM-lf-Iex" firstAttribute="top" secondItem="g3i-8d-O4a" secondAttribute="top" constant="-22" id="sCC-hK-7zg"/>
+ <constraint firstItem="05l-0O-Ql0" firstAttribute="top" secondItem="8uM-V9-rGD" secondAttribute="bottom" constant="30" id="sZL-E0-cZK"/>
+ <constraint firstItem="v2K-7x-35g" firstAttribute="centerY" secondItem="8uM-V9-rGD" secondAttribute="centerY" id="wSr-6Q-hP0"/>
+ <constraint firstItem="qeI-Uf-g3M" firstAttribute="leading" secondItem="g3i-8d-O4a" secondAttribute="leading" constant="50" id="xTf-Xn-6I9"/>
+ <constraint firstItem="4YB-Ka-7tL" firstAttribute="leading" secondItem="g3i-8d-O4a" secondAttribute="leading" constant="40" id="yzC-hd-Rhc"/>
</constraints>
</view>
</subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
- <constraint firstItem="g3i-8d-O4a" firstAttribute="leading" secondItem="UZB-Gb-Dp2" secondAttribute="leading" constant="-16" id="21l-gk-aAy"/>
- <constraint firstAttribute="trailing" secondItem="g3i-8d-O4a" secondAttribute="trailing" constant="-16" id="4vn-no-Pzq"/>
- <constraint firstItem="g3i-8d-O4a" firstAttribute="top" secondItem="UZB-Gb-Dp2" secondAttribute="top" constant="-18" id="AXm-Ng-PDJ"/>
- <constraint firstAttribute="bottom" secondItem="g3i-8d-O4a" secondAttribute="bottom" constant="-18" id="zJ5-Tt-cVQ"/>
+ <constraint firstItem="g3i-8d-O4a" firstAttribute="leading" secondItem="UZB-Gb-Dp2" secondAttribute="leading" priority="250" constant="-20" id="21l-gk-aAy"/>
+ <constraint firstItem="g3i-8d-O4a" firstAttribute="centerX" secondItem="UZB-Gb-Dp2" secondAttribute="centerX" id="2xr-k8-WWd"/>
+ <constraint firstAttribute="trailing" secondItem="g3i-8d-O4a" secondAttribute="trailing" priority="250" constant="-20" id="4vn-no-Pzq"/>
+ <constraint firstAttribute="top" secondItem="g3i-8d-O4a" secondAttribute="top" constant="18" id="AXm-Ng-PDJ"/>
+ <constraint firstItem="g3i-8d-O4a" firstAttribute="bottom" secondItem="UZB-Gb-Dp2" secondAttribute="bottom" priority="250" id="MAL-nV-nsP"/>
</constraints>
</scrollView>
+ <visualEffectView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xJI-3e-kSG" userLabel="Background Navigation Bar">
+ <rect key="frame" x="0.0" y="0.0" width="414" height="0.0"/>
+ <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="4Wd-7Y-TbC">
+ <rect key="frame" x="0.0" y="0.0" width="414" height="0.0"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ </view>
+ <constraints>
+ <constraint firstAttribute="height" id="WfS-B2-NZI"/>
+ </constraints>
+ <blurEffect style="light"/>
+ </visualEffectView>
</subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
- <constraint firstItem="xYA-E3-7tv" firstAttribute="leading" secondItem="7Ub-Rk-fjK" secondAttribute="leading" id="1au-pT-kOj"/>
- <constraint firstItem="WZ7-L9-OuJ" firstAttribute="top" secondItem="7Ub-Rk-fjK" secondAttribute="top" id="44e-Ab-mbh"/>
- <constraint firstItem="g3i-8d-O4a" firstAttribute="height" secondItem="7Ub-Rk-fjK" secondAttribute="height" priority="250" id="7wt-Vd-eXx"/>
- <constraint firstItem="xYA-E3-7tv" firstAttribute="top" secondItem="7Ub-Rk-fjK" secondAttribute="top" id="MWk-0f-CtJ"/>
- <constraint firstItem="fgQ-1h-rMi" firstAttribute="top" secondItem="UZB-Gb-Dp2" secondAttribute="bottom" constant="8" symbolic="YES" id="Nff-ZG-Yuu"/>
- <constraint firstItem="WZ7-L9-OuJ" firstAttribute="leading" secondItem="7Ub-Rk-fjK" secondAttribute="leading" id="PY4-51-dTX"/>
- <constraint firstAttribute="bottom" secondItem="WZ7-L9-OuJ" secondAttribute="bottom" id="Veo-r0-BMP"/>
+ <constraint firstItem="05l-0O-Ql0" firstAttribute="leading" secondItem="IVi-pM-qbp" secondAttribute="leading" id="MDW-QE-EfZ"/>
+ <constraint firstItem="fgQ-1h-rMi" firstAttribute="top" secondItem="UZB-Gb-Dp2" secondAttribute="bottom" id="Nff-ZG-Yuu"/>
<constraint firstAttribute="trailingMargin" secondItem="UZB-Gb-Dp2" secondAttribute="trailing" id="ZeU-39-hYg"/>
- <constraint firstAttribute="bottom" secondItem="xYA-E3-7tv" secondAttribute="bottom" id="cHJ-77-DRz"/>
- <constraint firstAttribute="trailing" secondItem="xYA-E3-7tv" secondAttribute="trailing" id="haz-3o-WbQ"/>
- <constraint firstAttribute="trailing" secondItem="WZ7-L9-OuJ" secondAttribute="trailing" id="ko3-9b-RwG"/>
- <constraint firstItem="UZB-Gb-Dp2" firstAttribute="top" secondItem="Wq5-qI-WER" secondAttribute="bottom" constant="8" symbolic="YES" id="l58-kW-bAF"/>
+ <constraint firstItem="IVi-pM-qbp" firstAttribute="trailing" secondItem="05l-0O-Ql0" secondAttribute="trailing" id="bBa-32-pvE"/>
+ <constraint firstItem="UZB-Gb-Dp2" firstAttribute="top" secondItem="7Ub-Rk-fjK" secondAttribute="top" id="l58-kW-bAF"/>
<constraint firstAttribute="leadingMargin" secondItem="UZB-Gb-Dp2" secondAttribute="leading" id="n4K-YN-Ab0"/>
+ <constraint firstItem="xJI-3e-kSG" firstAttribute="top" secondItem="7Ub-Rk-fjK" secondAttribute="top" id="q3t-DK-hJs"/>
+ <constraint firstItem="xJI-3e-kSG" firstAttribute="width" secondItem="7Ub-Rk-fjK" secondAttribute="width" id="vh6-d3-sOd"/>
<constraint firstItem="g3i-8d-O4a" firstAttribute="width" secondItem="7Ub-Rk-fjK" secondAttribute="width" id="wcZ-tz-DCM"/>
+ <constraint firstItem="xJI-3e-kSG" firstAttribute="centerX" secondItem="7Ub-Rk-fjK" secondAttribute="centerX" id="z4S-tQ-3IZ"/>
</constraints>
</view>
<connections>
+ <outlet property="backgroundNavigationBarHeightConstraint" destination="WfS-B2-NZI" id="sM3-uq-CGF"/>
+ <outlet property="chooseAPasswordLabel" destination="BLe-wx-zKe" id="pN5-s7-AEm"/>
+ <outlet property="choosePasswordViewHeightConstraint" destination="gCv-h4-eLK" id="d0K-zb-sSB"/>
<outlet property="confirmPasswordTextField" destination="ODL-4B-fCm" id="CNa-S1-DmO"/>
+ <outlet property="containerViewBottomConstraint" destination="MAL-nV-nsP" id="gNC-rt-Yuq"/>
<outlet property="createAccountButton" destination="05l-0O-Ql0" id="UQq-NA-axm"/>
<outlet property="createAccountTitle" destination="cAM-lf-Iex" id="6df-0w-qzU"/>
+ <outlet property="enableNotificationsLabel" destination="v2K-7x-35g" id="Llc-op-X6a"/>
+ <outlet property="notificationsSwitch" destination="8uM-V9-rGD" id="roL-7x-Kj3"/>
<outlet property="passwordErrorLabel" destination="IWj-x1-hN9" id="VhJ-5w-sS4"/>
+ <outlet property="passwordInfoLabel" destination="gh1-3j-vN7" id="Xbl-mm-rTD"/>
+ <outlet property="passwordSwitch" destination="WaK-DM-X0c" id="AZq-z8-a1e"/>
<outlet property="passwordTextField" destination="jhr-UL-eCl" id="rmW-PB-Fdo"/>
+ <outlet property="recommendedLabel" destination="QTZ-o9-LER" id="jKD-Jc-ys9"/>
+ <outlet property="registerPasswordView" destination="IVi-pM-qbp" id="Jgb-Hl-9Ct"/>
<outlet property="registerUsernameErrorLabel" destination="qDW-b2-4NQ" id="5uc-Js-bZ1"/>
<outlet property="registerUsernameHeightConstraint" destination="atW-lO-zQN" id="SaG-wi-hZG"/>
<outlet property="registerUsernameLabel" destination="qeI-Uf-g3M" id="vk3-PS-YeD"/>
<outlet property="registerUsernameView" destination="4YB-Ka-7tL" id="ge5-dV-TMa"/>
<outlet property="scrollView" destination="UZB-Gb-Dp2" id="oGn-Z2-qU2"/>
+ <outlet property="scrollViewBottomConstraint" destination="Nff-ZG-Yuu" id="8NA-Si-poi"/>
<outlet property="usernameSwitch" destination="hzc-aD-41e" id="c8Y-bI-KEV"/>
<outlet property="usernameTextField" destination="E18-Hh-7He" id="t2T-vd-2a3"/>
</connections>
@@ -229,7 +303,4 @@
<point key="canvasLocation" x="1944.8" y="563.56821589205401"/>
</scene>
</scenes>
- <resources>
- <image name="background_ring" width="750" height="1334"/>
- </resources>
</document>
diff --git a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift
index a2a46b9..c4fafb9 100644
--- a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift
+++ b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift
@@ -33,27 +33,49 @@
self.registerUsernameHeightConstraintConstant = registerUsernameHeightConstraint.constant
}
}
+ @IBOutlet weak var backgroundNavigationBarHeightConstraint: NSLayoutConstraint!
+ @IBOutlet weak var choosePasswordViewHeightConstraint: NSLayoutConstraint!
+ @IBOutlet weak var scrollViewBottomConstraint: NSLayoutConstraint!
@IBOutlet weak var usernameSwitch: UISwitch!
+ @IBOutlet weak var passwordSwitch: UISwitch!
+ @IBOutlet weak var notificationsSwitch: UISwitch!
@IBOutlet weak var registerUsernameView: UIView!
+ @IBOutlet weak var registerPasswordView: UIView!
@IBOutlet weak var registerUsernameLabel: UILabel!
+ @IBOutlet weak var recommendedLabel: UILabel!
@IBOutlet weak var registerUsernameErrorLabel: UILabel!
@IBOutlet weak var passwordTextField: DesignableTextField!
@IBOutlet weak var confirmPasswordTextField: DesignableTextField!
@IBOutlet weak var passwordErrorLabel: UILabel!
@IBOutlet weak var usernameTextField: DesignableTextField!
@IBOutlet weak var scrollView: UIScrollView!
-
+ @IBOutlet weak var chooseAPasswordLabel: UILabel!
+ @IBOutlet weak var passwordInfoLabel: UILabel!
+ @IBOutlet weak var enableNotificationsLabel: UILabel!
// MARK: members
private let disposeBag = DisposeBag()
var viewModel: CreateAccountViewModel!
var registerUsernameHeightConstraintConstant: CGFloat = 0.0
+ @IBOutlet weak var containerViewBottomConstraint: NSLayoutConstraint!
+ var keyboardDismissTapRecognizer: UITapGestureRecognizer!
+ var isKeyboardOpened: Bool = false
// MARK: functions
override func viewDidLoad() {
- super.viewDidLoad()
-
// L10n
self.applyL10n()
+ super.viewDidLoad()
+ self.view.layoutIfNeeded()
+
+ // Style
+ self.scrollView.alwaysBounceHorizontal = false
+ self.scrollView.alwaysBounceVertical = true
+ self.createAccountButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal)
+ let device = UIDevice.modelName
+ self.backgroundNavigationBarHeightConstraint.constant = UIApplication.shared.statusBarFrame.height
+ self.usernameTextField.tintColor = UIColor.ringSecondary
+ self.passwordTextField.tintColor = UIColor.ringSecondary
+ self.confirmPasswordTextField.tintColor = UIColor.ringSecondary
// Bind ViewModel to View
self.bindViewModelToView()
@@ -63,11 +85,55 @@
// handle keyboard
self.adaptToKeyboardState(for: self.scrollView, with: self.disposeBag)
+ keyboardDismissTapRecognizer = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard))
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
UIApplication.shared.statusBarStyle = .default
+ NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillAppear(withNotification:)), name: NSNotification.Name.UIKeyboardWillShow, object: nil)
+ NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillDisappear(withNotification:)), name: NSNotification.Name.UIKeyboardWillHide, object: nil)
+ }
+
+ func setContentInset() {
+ if !self.isKeyboardOpened {
+ self.containerViewBottomConstraint.constant = -20
+ return
+ }
+ let device = UIDevice.modelName
+ switch device {
+ case "iPhone X", "iPhone XS", "iPhone XS Max", "iPhone XR" :
+ self.containerViewBottomConstraint.constant = 100
+ default :
+ self.containerViewBottomConstraint.constant = 70
+ }
+ }
+
+ @objc func dismissKeyboard() {
+ self.isKeyboardOpened = false
+ self.becomeFirstResponder()
+ view.removeGestureRecognizer(keyboardDismissTapRecognizer)
+ }
+
+ @objc func keyboardWillAppear(withNotification: NSNotification){
+ self.isKeyboardOpened = true
+ self.view.addGestureRecognizer(keyboardDismissTapRecognizer)
+ self.setContentInset()
+
+ }
+
+ @objc func keyboardWillDisappear(withNotification: NSNotification){
+ view.removeGestureRecognizer(keyboardDismissTapRecognizer)
+ self.setContentInset()
+ }
+
+ override func viewWillDisappear(_ animated: Bool) {
+ super.viewWillDisappear(animated)
+ NotificationCenter.default.removeObserver(self)
+ }
+
+ override var canBecomeFirstResponder: Bool {
+ return true
}
private func applyL10n() {
@@ -76,6 +142,11 @@
self.usernameTextField.placeholder = self.viewModel.usernameTitle
self.passwordTextField.placeholder = self.viewModel.passwordTitle
self.confirmPasswordTextField.placeholder = self.viewModel.confirmPasswordTitle
+ self.registerUsernameLabel.text = self.viewModel.registerAUserNameTitle
+ self.chooseAPasswordLabel.text = self.viewModel.chooseAPasswordTitle
+ self.passwordInfoLabel.text = self.viewModel.passwordInfoTitle
+ self.enableNotificationsLabel.text = self.viewModel.enableNotificationsTitle
+ self.recommendedLabel.text = self.viewModel.recommendedTitle
}
private func bindViewModelToView() {
@@ -86,18 +157,37 @@
UIView.animate(withDuration: 0.3, animations: {
if isOn {
self.registerUsernameHeightConstraint.constant = self.registerUsernameHeightConstraintConstant
- self.registerUsernameView.alpha = 1.0
+ DispatchQueue.global(qos: .background).async {
+ usleep(300000)
+ DispatchQueue.main.async {
+ UIView.animate(withDuration: 0.3, animations: {
+ self.registerUsernameView.alpha = 1.0
+ })
+ }
+ }
} else {
self.registerUsernameHeightConstraint.constant = 0
self.registerUsernameView.alpha = 0.0
}
-
+ self.setContentInset()
self.view.layoutIfNeeded()
})
}).disposed(by: self.disposeBag)
// handle Create Account Button state
- self.viewModel.canAskForAccountCreation.bind(to: self.createAccountButton.rx.isEnabled).disposed(by: self.disposeBag)
+ self.viewModel.canAskForAccountCreation.subscribe(onNext: { [weak self] enable in
+ if enable {
+ DispatchQueue.main.async {
+ self?.createAccountButton.alpha = 1
+ self?.createAccountButton.isEnabled = true
+ }
+ } else {
+ DispatchQueue.main.async {
+ self?.createAccountButton.alpha = 0.6
+ self?.createAccountButton.isEnabled = false
+ }
+ }
+ }).disposed(by: self.disposeBag)
// handle password error
self.viewModel.passwordValidationState.map { $0.isValidated }
@@ -136,9 +226,40 @@
}).disposed(by: self.disposeBag)
}
+ private func managePasswordSwitch(isOn: Bool) {
+ UIView.animate(withDuration: 0.3, animations: { [weak self] in
+ if isOn {
+ guard let height = self?.passwordInfoLabel.frame.height else {return}
+ self?.registerPasswordView.isHidden = false
+ self?.choosePasswordViewHeightConstraint.constant = 133 + height
+ self?.view.layoutIfNeeded()
+ DispatchQueue.global(qos: .background).async {
+ usleep(300000)
+ DispatchQueue.main.async {
+ UIView.animate(withDuration: 0.3, animations: {
+ self?.registerPasswordView.alpha = 1.0
+ })
+ }
+ }
+ } else {
+ self?.choosePasswordViewHeightConstraint.constant = 0
+ self?.registerPasswordView.alpha = 0.0
+ self?.passwordTextField.text = ""
+ self?.confirmPasswordTextField.text = ""
+ self?.passwordErrorLabel.isHidden = true
+ }
+ self?.setContentInset()
+ self?.view.layoutIfNeeded()
+ })
+ }
+
private func bindViewToViewModel() {
// Bind View Outlets to ViewModel
self.usernameSwitch.rx.isOn.bind(to: self.viewModel.registerUsername).disposed(by: self.disposeBag)
+ self.passwordSwitch.rx.isOn.subscribe(onNext: { [weak self] isOn in
+ self?.managePasswordSwitch(isOn: isOn)
+ }).disposed(by: self.disposeBag)
+ self.notificationsSwitch.rx.isOn.bind(to: self.viewModel.notificationSwitch).disposed(by: self.disposeBag)
self.usernameTextField.rx.text.orEmpty.throttle(3, scheduler: MainScheduler.instance).distinctUntilChanged().bind(to: self.viewModel.username).disposed(by: self.disposeBag)
self.passwordTextField.rx.text.orEmpty.bind(to: self.viewModel.password).disposed(by: self.disposeBag)
self.confirmPasswordTextField.rx.text.orEmpty.bind(to: self.viewModel.confirmPassword).disposed(by: self.disposeBag)
diff --git a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift
index 101f289..c565416 100644
--- a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift
+++ b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift
@@ -153,6 +153,11 @@
let usernameTitle = L10n.CreateAccount.enterNewUsernamePlaceholder
let passwordTitle = L10n.CreateAccount.newPasswordPlaceholder
let confirmPasswordTitle = L10n.CreateAccount.repeatPasswordPlaceholder
+ let registerAUserNameTitle = L10n.CreateAccount.registerAUsername
+ let chooseAPasswordTitle = L10n.CreateAccount.chooseAPassword
+ let passwordInfoTitle = L10n.CreateAccount.passwordInformation
+ let enableNotificationsTitle = L10n.CreateAccount.enableNotifications
+ let recommendedTitle = L10n.CreateAccount.recommended
// MARK: - Low level services
private let accountService: AccountsService
@@ -167,6 +172,7 @@
let password = Variable<String>("")
let confirmPassword = Variable<String>("")
let registerUsername = Variable<Bool>(true)
+ let notificationSwitch = Variable<Bool>(true)
lazy var passwordValidationState: Observable<PasswordValidationState> = {
return Observable.combineLatest(self.password.asObservable(), self.confirmPassword.asObservable())
{ (password: String, confirmPassword: String) -> PasswordValidationState in
@@ -281,6 +287,15 @@
func createAccount() {
self.accountCreationState.value = .started
self.accountService.addRingAccount(withUsername: self.username.value,
- password: self.password.value)
+ password: self.password.value, enable: self.notificationSwitch.value)
+ self.enablePushNotifications(enable: self.notificationSwitch.value)
+ }
+
+ func enablePushNotifications(enable: Bool) {
+ if enable {
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: NotificationName.enablePushNotifications.rawValue), object: nil)
+ return
+ }
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: NotificationName.disablePushNotifications.rawValue), object: nil)
}
}
diff --git a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.storyboard b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.storyboard
index c5c19f4..d334f6f 100644
--- a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.storyboard
+++ b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.storyboard
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ILs-xb-iKr">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ILs-xb-iKr">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
- <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -19,60 +18,27 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background_ring" translatesAutoresizingMaskIntoConstraints="NO" id="11r-JK-mPT">
- <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
- </imageView>
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8TU-za-C7U" userLabel="Gradient View" customClass="DesignableView" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
- <color key="backgroundColor" red="0.2274509804" green="0.75294117650000003" blue="0.82352941180000006" alpha="0.20000000000000001" colorSpace="custom" customColorSpace="displayP3"/>
- <userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
- <color key="value" red="0.2274509804" green="0.75294117650000003" blue="0.82352941180000006" alpha="0.0" colorSpace="custom" customColorSpace="displayP3"/>
- </userDefinedRuntimeAttribute>
- <userDefinedRuntimeAttribute type="color" keyPath="gradientEndColor">
- <color key="value" red="0.2274509804" green="0.75294117650000003" blue="0.82352941180000006" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
- </userDefinedRuntimeAttribute>
- </userDefinedRuntimeAttributes>
- </view>
- <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalHuggingPriority="251" image="ring_logo" translatesAutoresizingMaskIntoConstraints="NO" id="2Pc-uJ-SAI">
- <rect key="frame" x="92" y="301.66666666666669" width="191" height="70"/>
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalHuggingPriority="251" image="jamiIcon" translatesAutoresizingMaskIntoConstraints="NO" id="2Pc-uJ-SAI">
+ <rect key="frame" x="137.66666666666666" y="358.66666666666669" width="100" height="95"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
- <constraint firstAttribute="width" secondItem="2Pc-uJ-SAI" secondAttribute="height" multiplier="30:11" id="Qre-jC-ga0"/>
+ <constraint firstAttribute="width" secondItem="2Pc-uJ-SAI" secondAttribute="height" multiplier="20:19" id="5fN-uH-uSi"/>
+ <constraint firstAttribute="width" constant="100" id="TaY-2a-CCG"/>
</constraints>
</imageView>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Ring is a free and universal communication platform which preserves the users' privacy and freedoms" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E4b-Zv-unB">
- <rect key="frame" x="62.666666666666657" y="428.33333333333331" width="249.99999999999997" height="46.666666666666686"/>
- <fontDescription key="fontDescription" type="system" pointSize="13"/>
- <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <label opaque="NO" userInteractionEnabled="NO" alpha="0.0" contentMode="left" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Welcome to jami !" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E4b-Zv-unB">
+ <rect key="frame" x="59" y="483.66666666666669" width="257.33333333333331" height="43.000000000000057"/>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="36"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="750" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Live Free or Die" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lbn-cd-UXk" userLabel="Version Title Label">
- <rect key="frame" x="108.33333333333333" y="391.66666666666669" width="159.33333333333337" height="28.666666666666686"/>
- <fontDescription key="fontDescription" type="system" pointSize="24"/>
- <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
- <nil key="highlightedColor"/>
- </label>
- <button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QLK-gs-fOJ" customClass="DesignableButton" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="62.666666666666657" y="575" width="249.99999999999997" height="40"/>
- <color key="backgroundColor" red="0.0" green="0.29803921570000003" blue="0.37647058820000001" alpha="1" colorSpace="calibratedRGB"/>
+ <button opaque="NO" alpha="0.0" contentMode="scaleToFill" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bu0-90-MB5" customClass="DesignableButton" customModule="Ring" customModuleProvider="target">
+ <rect key="frame" x="37.666666666666657" y="566.66666666666663" width="300" height="50"/>
<constraints>
- <constraint firstAttribute="height" constant="40" id="YW4-Sc-61P"/>
+ <constraint firstAttribute="height" constant="50" id="FEf-kf-jCs"/>
+ <constraint firstAttribute="width" constant="300" id="epE-7u-SMQ"/>
</constraints>
- <state key="normal" title="Link this device to an account">
- <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </state>
- <userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
- </userDefinedRuntimeAttributes>
- </button>
- <button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bu0-90-MB5" customClass="DesignableButton" customModule="Ring" customModuleProvider="target">
- <rect key="frame" x="62.666666666666657" y="515" width="249.99999999999997" height="40"/>
- <color key="backgroundColor" red="0.0" green="0.29803921570000003" blue="0.37647058820000001" alpha="1" colorSpace="calibratedRGB"/>
- <constraints>
- <constraint firstAttribute="height" constant="40" id="FEf-kf-jCs"/>
- <constraint firstAttribute="width" constant="250" id="epE-7u-SMQ"/>
- </constraints>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
<state key="normal" title="Create a Ring account">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
@@ -80,32 +46,32 @@
<userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
</userDefinedRuntimeAttributes>
</button>
+ <button opaque="NO" alpha="0.0" contentMode="scaleToFill" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QLK-gs-fOJ" customClass="DesignableButton" customModule="Ring" customModuleProvider="target">
+ <rect key="frame" x="37.666666666666657" y="636.66666666666663" width="300" height="50"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="50" id="YW4-Sc-61P"/>
+ </constraints>
+ <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/>
+ <state key="normal" title="Link this device to an account">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/>
+ </userDefinedRuntimeAttributes>
+ </button>
</subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="bu0-90-MB5" firstAttribute="top" secondItem="E4b-Zv-unB" secondAttribute="bottom" constant="40" id="0hJ-6T-D3J"/>
- <constraint firstItem="Lbn-cd-UXk" firstAttribute="top" secondItem="2Pc-uJ-SAI" secondAttribute="bottom" constant="20" id="0p4-iF-1bx"/>
- <constraint firstItem="bu0-90-MB5" firstAttribute="leading" secondItem="E4b-Zv-unB" secondAttribute="leading" id="4YM-7O-C4z"/>
- <constraint firstAttribute="bottom" secondItem="8TU-za-C7U" secondAttribute="bottom" id="7MN-tF-bVG"/>
- <constraint firstItem="8TU-za-C7U" firstAttribute="top" secondItem="Dg0-kS-rT7" secondAttribute="top" id="HvO-Th-xtu"/>
+ <constraint firstItem="2Pc-uJ-SAI" firstAttribute="centerY" secondItem="Dg0-kS-rT7" secondAttribute="centerY" id="2w4-nZ-VwS"/>
+ <constraint firstItem="E4b-Zv-unB" firstAttribute="top" secondItem="2Pc-uJ-SAI" secondAttribute="bottom" constant="30" id="99p-KU-QhW"/>
<constraint firstItem="QLK-gs-fOJ" firstAttribute="leading" secondItem="bu0-90-MB5" secondAttribute="leading" id="U37-r7-lNe"/>
- <constraint firstItem="E4b-Zv-unB" firstAttribute="top" secondItem="Lbn-cd-UXk" secondAttribute="bottom" constant="8" symbolic="YES" id="XNv-Kr-c8f"/>
<constraint firstItem="bu0-90-MB5" firstAttribute="centerX" secondItem="Dg0-kS-rT7" secondAttribute="centerX" id="YLx-WX-rgL"/>
- <constraint firstItem="Lbn-cd-UXk" firstAttribute="centerY" secondItem="Dg0-kS-rT7" secondAttribute="centerY" priority="750" id="ax2-Za-jO0"/>
<constraint firstItem="QLK-gs-fOJ" firstAttribute="top" secondItem="bu0-90-MB5" secondAttribute="bottom" constant="20" id="cYv-WZ-CCB"/>
- <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="QLK-gs-fOJ" secondAttribute="bottom" constant="10" id="dHd-v7-FYo"/>
<constraint firstItem="QLK-gs-fOJ" firstAttribute="centerX" secondItem="Dg0-kS-rT7" secondAttribute="centerX" id="gQM-Bw-BRN"/>
- <constraint firstAttribute="bottom" secondItem="11r-JK-mPT" secondAttribute="bottom" id="hKL-lg-yh3"/>
- <constraint firstItem="11r-JK-mPT" firstAttribute="leading" secondItem="Dg0-kS-rT7" secondAttribute="leading" id="iUW-Ed-weL"/>
- <constraint firstItem="Lbn-cd-UXk" firstAttribute="centerX" secondItem="Dg0-kS-rT7" secondAttribute="centerX" id="l7f-X1-d82"/>
<constraint firstItem="2Pc-uJ-SAI" firstAttribute="centerX" secondItem="Dg0-kS-rT7" secondAttribute="centerX" id="qaX-bX-RjJ"/>
- <constraint firstItem="bu0-90-MB5" firstAttribute="trailing" secondItem="E4b-Zv-unB" secondAttribute="trailing" id="rLA-EI-gkd"/>
- <constraint firstAttribute="trailing" secondItem="11r-JK-mPT" secondAttribute="trailing" id="shP-7c-cRl"/>
- <constraint firstItem="11r-JK-mPT" firstAttribute="top" secondItem="Dg0-kS-rT7" secondAttribute="top" id="sq0-Fa-BSF"/>
- <constraint firstItem="8TU-za-C7U" firstAttribute="leading" secondItem="Dg0-kS-rT7" secondAttribute="leading" id="svU-pm-Bc1"/>
- <constraint firstItem="2Pc-uJ-SAI" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Dg0-kS-rT7" secondAttribute="top" constant="10" id="t1u-DE-jkN"/>
<constraint firstItem="QLK-gs-fOJ" firstAttribute="trailing" secondItem="bu0-90-MB5" secondAttribute="trailing" id="uLc-95-Qpb"/>
<constraint firstItem="E4b-Zv-unB" firstAttribute="centerX" secondItem="Dg0-kS-rT7" secondAttribute="centerX" id="ukg-Rd-bL3"/>
- <constraint firstAttribute="trailing" secondItem="8TU-za-C7U" secondAttribute="trailing" id="z6w-VC-Pft"/>
</constraints>
<viewLayoutGuide key="safeArea" id="hvJ-fJ-PMc"/>
</view>
@@ -113,16 +79,16 @@
<connections>
<outlet property="createAccountButton" destination="bu0-90-MB5" id="YNt-Tc-Snc"/>
<outlet property="linkDeviceButton" destination="QLK-gs-fOJ" id="AXP-0r-10g"/>
+ <outlet property="ringLogoBottomConstraint" destination="2w4-nZ-VwS" id="QZo-N3-iCa"/>
<outlet property="welcomeTextLabel" destination="E4b-Zv-unB" id="ygV-A3-EZD"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Yc1-qm-cpP" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="-333.60000000000002" y="30.134932533733135"/>
+ <point key="canvasLocation" x="-333.60000000000002" y="29.55665024630542"/>
</scene>
</scenes>
<resources>
- <image name="background_ring" width="750" height="1334"/>
- <image name="ring_logo" width="191" height="63"/>
+ <image name="jamiIcon" width="200" height="190"/>
</resources>
</document>
diff --git a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift
index 8665b9b..0b48b24 100644
--- a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift
+++ b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift
@@ -32,13 +32,18 @@
@IBOutlet weak var linkDeviceButton: DesignableButton!
@IBOutlet weak var createAccountButton: DesignableButton!
+ // MARK: constraints
+ @IBOutlet weak var ringLogoBottomConstraint: NSLayoutConstraint!
+
// MARK: members
private let disposeBag = DisposeBag()
// MARK: functions
override func viewDidLoad() {
super.viewDidLoad()
-
+ self.initialAnimation()
+ self.createAccountButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal)
+ self.linkDeviceButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal)
// Bind ViewModel to View
self.viewModel.welcomeText.bind(to: self.welcomeTextLabel.rx.text).disposed(by: self.disposeBag)
self.viewModel.createAccount.bind(to: self.createAccountButton.rx.title(for: .normal)).disposed(by: self.disposeBag)
@@ -54,10 +59,27 @@
}).disposed(by: self.disposeBag)
}
+ func initialAnimation() {
+ DispatchQueue.global(qos: .background).async {
+ sleep(1)
+ DispatchQueue.main.async { [weak self] in
+ self?.ringLogoBottomConstraint.constant = -72
+ UIView.animate(withDuration: 0.5, animations: {
+ self?.ringLogoBottomConstraint.constant = -200
+ self?.welcomeTextLabel.alpha = 1
+ self?.createAccountButton.alpha = 1
+ self?.linkDeviceButton.alpha = 1
+ self?.view.layoutIfNeeded()
+ })
+ }
+ }
+ }
+
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
UIApplication.shared.statusBarStyle = .default
- self.navigationController?.navigationBar.tintColor = UIColor.ringMain
+ self.navigationController?.navigationBar.tintColor = UIColor.ringSecondary
+ self.navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.isTranslucent = true
diff --git a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewModel.swift b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewModel.swift
index 7625675..d133e47 100644
--- a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewModel.swift
+++ b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewModel.swift
@@ -30,7 +30,7 @@
}()
// MARK: - Rx Singles for L10n
- let welcomeText = Observable<String>.of(L10n.Welcome.text)
+ let welcomeText = Observable<String>.of(L10n.Welcome.title)
let createAccount = Observable<String>.of(L10n.Welcome.createAccount)
let linkDevice = Observable<String>.of(L10n.Welcome.linkDevice)
diff --git a/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/Contents.json b/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/Contents.json
new file mode 100644
index 0000000..19b195e
--- /dev/null
+++ b/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "jami.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "jami-1.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "jami-2.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/jami-1.png b/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/jami-1.png
new file mode 100644
index 0000000..d3e35cc
--- /dev/null
+++ b/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/jami-1.png
Binary files differ
diff --git a/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/jami-2.png b/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/jami-2.png
new file mode 100644
index 0000000..d3e35cc
--- /dev/null
+++ b/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/jami-2.png
Binary files differ
diff --git a/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/jami.png b/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/jami.png
new file mode 100644
index 0000000..d3e35cc
--- /dev/null
+++ b/Ring/Ring/Resources/Images.xcassets/jamiIcon.imageset/jami.png
Binary files differ
diff --git a/Ring/Ring/Resources/LaunchScreen.storyboard b/Ring/Ring/Resources/LaunchScreen.storyboard
index c7cc39e..c98c791 100644
--- a/Ring/Ring/Resources/LaunchScreen.storyboard
+++ b/Ring/Ring/Resources/LaunchScreen.storyboard
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
- <device id="retina4_0" orientation="portrait">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+ <device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@@ -18,37 +18,22 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
- <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+ <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background_ring" translatesAutoresizingMaskIntoConstraints="NO" id="QbZ-1j-Ebd">
- <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
- </imageView>
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0tt-6B-dHo" userLabel="Gradient View">
- <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
- <subviews>
- <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalHuggingPriority="251" image="ring_logo" translatesAutoresizingMaskIntoConstraints="NO" id="kP1-oe-ZEx">
- <rect key="frame" x="64.5" y="252.5" width="191" height="63"/>
- <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
- </imageView>
- </subviews>
- <color key="backgroundColor" red="0.2274509804" green="0.75294117650000003" blue="0.82352941180000006" alpha="0.34999999999999998" colorSpace="custom" customColorSpace="displayP3"/>
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalHuggingPriority="251" image="jamiIcon" translatesAutoresizingMaskIntoConstraints="NO" id="kP1-oe-ZEx">
+ <rect key="frame" x="137.66666666666666" y="358.66666666666669" width="100" height="95"/>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
- <constraint firstItem="kP1-oe-ZEx" firstAttribute="centerX" secondItem="0tt-6B-dHo" secondAttribute="centerX" id="54e-9c-yxP"/>
- <constraint firstItem="kP1-oe-ZEx" firstAttribute="centerY" secondItem="0tt-6B-dHo" secondAttribute="centerY" id="fXn-9R-frB"/>
+ <constraint firstAttribute="width" secondItem="kP1-oe-ZEx" secondAttribute="height" multiplier="20:19" id="5Bg-Lw-vZJ"/>
+ <constraint firstAttribute="width" constant="100" id="Vc4-VQ-EsM"/>
</constraints>
- </view>
+ </imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
- <constraint firstAttribute="bottom" secondItem="0tt-6B-dHo" secondAttribute="bottom" id="Bwv-uE-mOw"/>
- <constraint firstItem="QbZ-1j-Ebd" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="GdO-YK-ig4"/>
- <constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="QbZ-1j-Ebd" secondAttribute="bottom" id="OrU-s1-c96"/>
- <constraint firstItem="0tt-6B-dHo" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="WEG-5j-2f3"/>
- <constraint firstItem="0tt-6B-dHo" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="h0e-hO-zEy"/>
- <constraint firstAttribute="trailing" secondItem="0tt-6B-dHo" secondAttribute="trailing" id="hq4-6q-gx1"/>
- <constraint firstItem="QbZ-1j-Ebd" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="mB5-R8-Vf7"/>
- <constraint firstAttribute="trailing" secondItem="QbZ-1j-Ebd" secondAttribute="trailing" id="n4Y-q4-dRf"/>
+ <constraint firstItem="kP1-oe-ZEx" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="ksh-ub-gUe"/>
+ <constraint firstItem="kP1-oe-ZEx" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="soi-Xo-HWk"/>
</constraints>
</view>
</viewController>
@@ -58,7 +43,6 @@
</scene>
</scenes>
<resources>
- <image name="background_ring" width="750" height="1334"/>
- <image name="ring_logo" width="191" height="63"/>
+ <image name="jamiIcon" width="200" height="190"/>
</resources>
</document>
diff --git a/Ring/Ring/Resources/en.lproj/Localizable.strings b/Ring/Ring/Resources/en.lproj/Localizable.strings
index fbff66b..e80ccf8 100644
--- a/Ring/Ring/Resources/en.lproj/Localizable.strings
+++ b/Ring/Ring/Resources/en.lproj/Localizable.strings
@@ -40,28 +40,33 @@
// Walkthrough
//Welcome Screen
-"welcome.title" = "Welcome to Ring";
+"welcome.title" = "Welcome to Jami !";
"welcome.text" = "Ring is a free and universal communication platform which preserves the users' privacy and freedoms";
"welcome.linkDevice" = "Link this device to an account";
-"welcome.createAccount" = "Create a Ring account";
+"welcome.createAccount" = "Create a Jami account";
//Creation Profile Screen
"createProfile.skipCreateProfile" = "Skip";
"createProfile.profileCreated" = "Next";
//Create Account form
-"createAccount.createAccountFormTitle" = "Create your Ring account";
+"createAccount.createAccountFormTitle" = "Create your account";
"createAccount.chooseStrongPassword" = "Choose strong password you will remember to protect your Ring account.";
-"createAccount.enterNewUsernamePlaceholder" = "username";
-"createAccount.newPasswordPlaceholder" = "password";
-"createAccount.repeatPasswordPlaceholder" = "confirm password";
+"createAccount.enterNewUsernamePlaceholder" = "Username";
+"createAccount.newPasswordPlaceholder" = "Password";
+"createAccount.repeatPasswordPlaceholder" = "Confirm password";
"createAccount.passwordCharactersNumberError" = "6 characters minimum";
"createAccount.passwordNotMatchingError" = "passwords do not match";
-"createAccount.lookingForUsernameAvailability" = "looking for username availability";
+"createAccount.lookingForUsernameAvailability" = "looking for availability…";
"createAccount.invalidUsername" = "invalid username";
"createAccount.usernameAlreadyTaken" = "username already taken";
"createAccount.loading" = "Loading";
"createAccount.waitCreateAccountTitle" = "Adding account";
+"createAccount.RegisterAUsername" = "Register a username";
+"createAccount.ChooseAPassword" = "Encrypt my account";
+"createAccount.PasswordInformation" = "Choose a password to encrypt your local account. Don’t forget it or you will not be able to recover your account";
+"createAccount.EnableNotifications" = "Notifications";
+"createAccount.Recommended" = "(Recommended)";
//Link To Account form
"linkToAccount.waitLinkToAccountTitle" = "Account linking";
diff --git a/Ring/Ring/Resources/fr-BE.lproj/Localizable.strings b/Ring/Ring/Resources/fr-BE.lproj/Localizable.strings
index 7e1cac0..2041fff 100644
--- a/Ring/Ring/Resources/fr-BE.lproj/Localizable.strings
+++ b/Ring/Ring/Resources/fr-BE.lproj/Localizable.strings
@@ -1,4 +1,4 @@
- /*
+ /*
* Copyright (C) 2017 Savoir-faire Linux Inc.
*
* Author: Silbino Gonçalves Matado <silbino.gmatado@savoirfairelinux.com>
@@ -57,11 +57,16 @@
"createAccount.repeatPasswordPlaceholder" = "confirm password";
"createAccount.passwordCharactersNumberError" = "6 characters minimum";
"createAccount.passwordNotMatchingError" = "passwords do not match";
-"createAccount.lookingForUsernameAvailability" = "looking for username availability";
+"createAccount.lookingForUsernameAvailability" = "looking for availability…";
"createAccount.invalidUsername" = "invalid username";
"createAccount.usernameAlreadyTaken" = "username already taken";
"createAccount.loading" = "Loading";
"createAccount.waitCreateAccountTitle" = "Adding account";
+"createAccount.RegisterAUsername" = "Enregistrer un nom";
+"createAccount.ChooseAPassword" = "Chiffrer mon compte";
+"createAccount.PasswordInformation" = "Choisissez un mot de passe pour chiffrer votre compte local. Ne l'oubliez pas ou vous perdrez l'accès à votre compte";
+"createAccount.EnableNotifications" = "Notifications";
+"createAccount.Recommended" = "(Recommandé)";
//Link To Account form
"linkToAccount.waitLinkToAccountTitle" = "Account linking";
diff --git a/Ring/Ring/Resources/fr-CA.lproj/Localizable.strings b/Ring/Ring/Resources/fr-CA.lproj/Localizable.strings
index ca17821..b69e238 100644
--- a/Ring/Ring/Resources/fr-CA.lproj/Localizable.strings
+++ b/Ring/Ring/Resources/fr-CA.lproj/Localizable.strings
@@ -40,33 +40,39 @@
// Walkthrough
//Welcome Screen
-"welcome.title" = "Bienvenue sur Ring";
+"welcome.title" = "Bienvenue sur Jami !";
"welcome.text" = "Ring est une plateforme de communication universelle qui préserve la vie privée et les libertés des utilisateurs";
"welcome.linkDevice" = "Associer cet appareil à un compte";
-"welcome.createAccount" = "Créer un compte Ring";
+"welcome.createAccount" = "Créer un compte Jami";
//Creation Profile Screen
"createProfile.skipCreateProfile" = "Skip";
"createProfile.profileCreated" = "Suivant";
//Create Account form
-"createAccount.createAccountFormTitle" = "Créer votre compte Ring";
+"createAccount.createAccountFormTitle" = "Créer votre compte";
"createAccount.chooseStrongPassword" = "Choisir un mot de passe fort que vous allez mémoriser pour protéger votre compte RIng.";
"createAccount.enterNewUsernamePlaceholder" = "Nom d'utilisateur";
-"createAccount.newPasswordPlaceholder" = "mot de passe";
-"createAccount.repeatPasswordPlaceholder" = "confirmez le mot de passe";
+"createAccount.newPasswordPlaceholder" = "Mot de passe";
+"createAccount.repeatPasswordPlaceholder" = "Confirmez le mot de passe";
"createAccount.passwordCharactersNumberError" = "Minimum de 6 caractères";
"createAccount.passwordNotMatchingError" = "les mots de passe ne correspondent pas";
-"createAccount.lookingForUsernameAvailability" = "recherche de disponibilité pour le nom d'utilisateur";
+"createAccount.lookingForUsernameAvailability" = "recherche de disponibilité…";
"createAccount.invalidUsername" = "nom d'utilisateur invalide ";
"createAccount.usernameAlreadyTaken" = "nom d'utilisateur déjà pris";
"createAccount.loading" = "En chargement";
"createAccount.waitCreateAccountTitle" = "Ajouter un compte";
+"createAccount.RegisterAUsername" = "Enregistrer un nom";
+"createAccount.ChooseAPassword" = "Chiffrer mon compte";
+"createAccount.PasswordInformation" = "Choisissez un mot de passe pour chiffrer votre compte local. Ne l'oubliez pas ou vous perdrez l'accès à votre compte";
+"createAccount.EnableNotifications" = "Notifications";
+"createAccount.Recommended" = "(Recommandé)";
+
//Link To Account form
"linkToAccount.waitLinkToAccountTitle" = "Account linking";
"linkToAccount.linkButtonTitle" = "Link device";
-"linkToAccount.passwordPlaceholder" = "mot de passe";
+"linkToAccount.passwordPlaceholder" = "Mot de passe";
"linkToAccount.pinPlaceholder" = "NIP";
"linkToAccount.passwordLabel" = "Enter Password";
"linkToAccount.pinLabel" = "Entrer le NIP";
diff --git a/Ring/Ring/Resources/fr-CH.lproj/Localizable.strings b/Ring/Ring/Resources/fr-CH.lproj/Localizable.strings
index 7e1cac0..2041fff 100644
--- a/Ring/Ring/Resources/fr-CH.lproj/Localizable.strings
+++ b/Ring/Ring/Resources/fr-CH.lproj/Localizable.strings
@@ -1,4 +1,4 @@
- /*
+ /*
* Copyright (C) 2017 Savoir-faire Linux Inc.
*
* Author: Silbino Gonçalves Matado <silbino.gmatado@savoirfairelinux.com>
@@ -57,11 +57,16 @@
"createAccount.repeatPasswordPlaceholder" = "confirm password";
"createAccount.passwordCharactersNumberError" = "6 characters minimum";
"createAccount.passwordNotMatchingError" = "passwords do not match";
-"createAccount.lookingForUsernameAvailability" = "looking for username availability";
+"createAccount.lookingForUsernameAvailability" = "looking for availability…";
"createAccount.invalidUsername" = "invalid username";
"createAccount.usernameAlreadyTaken" = "username already taken";
"createAccount.loading" = "Loading";
"createAccount.waitCreateAccountTitle" = "Adding account";
+"createAccount.RegisterAUsername" = "Enregistrer un nom";
+"createAccount.ChooseAPassword" = "Chiffrer mon compte";
+"createAccount.PasswordInformation" = "Choisissez un mot de passe pour chiffrer votre compte local. Ne l'oubliez pas ou vous perdrez l'accès à votre compte";
+"createAccount.EnableNotifications" = "Notifications";
+"createAccount.Recommended" = "(Recommandé)";
//Link To Account form
"linkToAccount.waitLinkToAccountTitle" = "Account linking";
diff --git a/Ring/Ring/Resources/fr-FR.lproj/Localizable.strings b/Ring/Ring/Resources/fr-FR.lproj/Localizable.strings
index 9e4e86f..60ae135 100644
--- a/Ring/Ring/Resources/fr-FR.lproj/Localizable.strings
+++ b/Ring/Ring/Resources/fr-FR.lproj/Localizable.strings
@@ -1,4 +1,4 @@
- /*
+ /*
* Copyright (C) 2017 Savoir-faire Linux Inc.
*
* Author: Silbino Gonçalves Matado <silbino.gmatado@savoirfairelinux.com>
@@ -40,28 +40,33 @@
// Walkthrough
//Welcome Screen
-"welcome.title" = "Bienvenue sur ring";
+"welcome.title" = "Bienvenue sur jami";
"welcome.text" = "Ring is a free and universal communication platform which preserves the users' privacy and freedoms";
"welcome.linkDevice" = "Link this device to an account";
-"welcome.createAccount" = "Créer un compte Ring";
+"welcome.createAccount" = "Créer un compte Jami";
//Creation Profile Screen
"createProfile.skipCreateProfile" = "Skip";
"createProfile.profileCreated" = "Suivant";
//Create Account form
-"createAccount.createAccountFormTitle" = "Create your Ring account";
-"createAccount.chooseStrongPassword" = "Choose strong password you will remember to protect your Ring account.";
-"createAccount.enterNewUsernamePlaceholder" = "username";
-"createAccount.newPasswordPlaceholder" = "password";
-"createAccount.repeatPasswordPlaceholder" = "confirm password";
-"createAccount.passwordCharactersNumberError" = "6 characters minimum";
-"createAccount.passwordNotMatchingError" = "passwords do not match";
-"createAccount.lookingForUsernameAvailability" = "looking for username availability";
-"createAccount.invalidUsername" = "invalid username";
-"createAccount.usernameAlreadyTaken" = "username already taken";
-"createAccount.loading" = "Loading";
-"createAccount.waitCreateAccountTitle" = "Adding account";
+"createAccount.createAccountFormTitle" = "Créer votre compte";
+"createAccount.chooseStrongPassword" = "Choisir un mot de passe fort que vous allez mémoriser pour protéger votre compte RIng.";
+"createAccount.enterNewUsernamePlaceholder" = "Nom d'utilisateur";
+"createAccount.newPasswordPlaceholder" = "Mot de passe";
+"createAccount.repeatPasswordPlaceholder" = "Confirmez le mot de passe";
+"createAccount.passwordCharactersNumberError" = "Minimum de 6 caractères";
+"createAccount.passwordNotMatchingError" = "les mots de passe ne correspondent pas";
+"createAccount.lookingForUsernameAvailability" = "recherche de disponibilité…";
+"createAccount.invalidUsername" = "nom d'utilisateur invalide ";
+"createAccount.usernameAlreadyTaken" = "nom d'utilisateur déjà pris";
+"createAccount.loading" = "En chargement";
+"createAccount.waitCreateAccountTitle" = "Ajouter un compte";
+"createAccount.RegisterAUsername" = "Enregistrer un nom";
+"createAccount.ChooseAPassword" = "Chiffrer mon compte";
+"createAccount.PasswordInformation" = "Choisissez un mot de passe pour chiffrer votre compte local. Ne l'oubliez pas ou vous perdrez l'accès à votre compte";
+"createAccount.EnableNotifications" = "Notifications";
+"createAccount.Recommended" = "(Recommandé)";
//Link To Account form
"linkToAccount.waitLinkToAccountTitle" = "Account linking";
diff --git a/Ring/Ring/Resources/fr.lproj/Localizable.strings b/Ring/Ring/Resources/fr.lproj/Localizable.strings
index 8e2efe0..c7ecb4a 100644
--- a/Ring/Ring/Resources/fr.lproj/Localizable.strings
+++ b/Ring/Ring/Resources/fr.lproj/Localizable.strings
@@ -1,4 +1,4 @@
- /*
+ /*
* Copyright (C) 2017 Savoir-faire Linux Inc.
*
* Author: Silbino Gonçalves Matado <silbino.gmatado@savoirfairelinux.com>
@@ -40,33 +40,38 @@
// Walkthrough
//Welcome Screen
-"welcome.title" = "Bienvenue sur Ring";
+"welcome.title" = "Bienvenue sur Jami !";
"welcome.text" = "Ring est un logiciel libre de communication universelle qui respecte les libertés et la vie privée de ses utilisateurs.";
"welcome.linkDevice" = "Lier cet appareil à un compte";
-"welcome.createAccount" = "Créer un compte Ring";
+"welcome.createAccount" = "Créer un compte Jami";
//Creation Profile Screen
"createProfile.skipCreateProfile" = "Passez";
"createProfile.profileCreated" = "Suivant";
//Create Account form
-"createAccount.createAccountFormTitle" = "Créer votre compte Ring";
+"createAccount.createAccountFormTitle" = "Créer votre compte";
"createAccount.chooseStrongPassword" = "Pour protéger votre compte Ring, choisissez un mot de passe robuste";
-"createAccount.enterNewUsernamePlaceholder" = "nom d’utilisateur";
-"createAccount.newPasswordPlaceholder" = "mot de passe";
+"createAccount.enterNewUsernamePlaceholder" = "Nom d’utilisateur";
+"createAccount.newPasswordPlaceholder" = "Mot de passe";
"createAccount.repeatPasswordPlaceholder" = "Confirmer le mot de passe";
"createAccount.passwordCharactersNumberError" = "Au moins 6 caractères";
"createAccount.passwordNotMatchingError" = "Les mots de passe ne sont pas identiques";
-"createAccount.lookingForUsernameAvailability" = "Vérification de la disponibilité du nom d'utilisateur";
+"createAccount.lookingForUsernameAvailability" = "Vérification de la disponibilité…";
"createAccount.invalidUsername" = "Nom d'utilisateur invalide";
"createAccount.usernameAlreadyTaken" = "Ce nom d'utilisateur est déjà utilisé";
"createAccount.loading" = "Chargement";
"createAccount.waitCreateAccountTitle" = "Ajout du compte";
+"createAccount.RegisterAUsername" = "Enregistrer un nom";
+"createAccount.ChooseAPassword" = "Chiffrer mon compte";
+"createAccount.PasswordInformation" = "Choisissez un mot de passe pour chiffrer votre compte local. Ne l'oubliez pas ou vous perdrez l'accès à votre compte";
+"createAccount.EnableNotifications" = "Notifications";
+"createAccount.Recommended" = "(Recommandé)";
//Link To Account form
"linkToAccount.waitLinkToAccountTitle" = "Association du compte";
"linkToAccount.linkButtonTitle" = "Associer l'appareil";
-"linkToAccount.passwordPlaceholder" = "mot de passe";
+"linkToAccount.passwordPlaceholder" = "Mot de passe";
"linkToAccount.pinPlaceholder" = "NIP";
"linkToAccount.passwordLabel" = "Entrez le mot de passe";
"linkToAccount.pinLabel" = "Entrer votre NIP";
diff --git a/Ring/Ring/Services/AccountsService.swift b/Ring/Ring/Services/AccountsService.swift
index df40b06..3d5bcea 100644
--- a/Ring/Ring/Services/AccountsService.swift
+++ b/Ring/Ring/Services/AccountsService.swift
@@ -192,13 +192,14 @@
- Parameter password: the password chosen by the user
*/
- func addRingAccount(withUsername username: String?, password: String) {
+ func addRingAccount(withUsername username: String?, password: String, enable: Bool) {
do {
var ringDetails = try self.getRingInitialAccountDetails()
if username != nil {
ringDetails.updateValue(username!, forKey: ConfigKey.accountRegisteredName.rawValue)
}
ringDetails.updateValue(password, forKey: ConfigKey.archivePassword.rawValue)
+ ringDetails.updateValue(enable.toString(), forKey: ConfigKey.proxyEnabled.rawValue)
let accountId = self.accountAdapter.addAccount(ringDetails)
guard accountId != nil else {
throw AddAccountError.unknownError